Merge "ProfilerOutput: Remove logStandardData() and make log() abstract"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 18 Nov 2014 20:02:06 +0000 (20:02 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 18 Nov 2014 20:02:06 +0000 (20:02 +0000)
1  2 
includes/profiler/Profiler.php

@@@ -157,15 -147,10 +157,15 @@@ abstract class Profiler 
                }
  
                foreach ( $output as $outType ) {
 -                      $class = 'ProfilerOutput' . ucfirst( strtolower( $outType ) );
 +                      if ( isset( self::$outputTypes[$outType] ) ) {
 +                              $class = self::$outputTypes[$outType];
 +                      } else {
 +                              throw new MWException( "'$outType' is an invalid output type" );
 +                      }
 +                      /** @var ProfilerOutput $profileOut */
                        $profileOut = new $class( $this, $this->params );
                        if ( $profileOut->canUse() ) {
-                               $profileOut->log();
+                               $profileOut->log( $this->getFunctionStats() );
                        }
                }
        }