$class = 'ProfilerOutput' . ucfirst( strtolower( $outType ) );
$profileOut = new $class( $this, $this->params );
if ( $profileOut->canUse() ) {
- $profileOut->log();
+ $profileOut->log( $this->getFunctionStats() );
}
}
}
return true;
}
- /**
- * Delegate to the proper method
- */
- public function log() {
- $this->logStandardData( $this->collector->getFunctionStats() );
- }
-
/**
* Log MediaWiki-style profiling data
*
* @param array $stats Result of Profiler::getFunctionStats()
*/
- abstract protected function logStandardData( array $stats );
+ abstract public function log( array $stats );
}
return !wfReadOnly();
}
- protected function logStandardData( array $stats ) {
+ public function log( array $stats ) {
global $wgProfilePerHost;
if ( $wgProfilePerHost ) {
? $params['thresholdMs']
: .25;
}
- protected function logStandardData( array $stats ) {
+ public function log( array $stats ) {
if ( $this->collector->getTemplated() ) {
$out = '';
return function_exists( 'socket_create' );
}
- protected function logStandardData( array $stats ) {
+ public function log( array $stats ) {
global $wgUDPProfilerHost, $wgUDPProfilerPort, $wgUDPProfilerFormatString;
$sock = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP );