'db' => 'ProfilerOutputDb',
'text' => 'ProfilerOutputText',
'udp' => 'ProfilerOutputUdp',
+ 'dump' => 'ProfilerOutputDump',
);
/** @var Profiler */
if ( !is_array( $output ) ) {
$output = array( $output );
}
-
+ $stats = null;
foreach ( $output as $outType ) {
if ( !isset( self::$outputTypes[$outType] ) ) {
throw new MWException( "'$outType' is an invalid output type" );
/** @var ProfilerOutput $profileOut */
$profileOut = new $class( $this, $this->params );
if ( $profileOut->canUse() ) {
- $profileOut->log( $this->getFunctionStats() );
+ if ( is_null( $stats ) ) {
+ $stats = $this->getFunctionStats();
+ }
+ $profileOut->log( $stats );
}
}
}