Became unused layer of abtraction as I266ed820 went through iterations
Change-Id: Ic739fb4519bb2e23e679828b191c11c0158ade78
$class = 'ProfilerOutput' . ucfirst( strtolower( $outType ) );
$profileOut = new $class( $this, $this->params );
if ( $profileOut->canUse() ) {
$class = 'ProfilerOutput' . ucfirst( strtolower( $outType ) );
$profileOut = new $class( $this, $this->params );
if ( $profileOut->canUse() ) {
+ $profileOut->log( $this->getFunctionStats() );
- /**
- * 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()
*/
/**
* Log MediaWiki-style profiling data
*
* @param array $stats Result of Profiler::getFunctionStats()
*/
- abstract protected function logStandardData( array $stats );
+ abstract public function log( array $stats );
- protected function logStandardData( array $stats ) {
+ public function log( array $stats ) {
global $wgProfilePerHost;
if ( $wgProfilePerHost ) {
global $wgProfilePerHost;
if ( $wgProfilePerHost ) {
? $params['thresholdMs']
: .25;
}
? $params['thresholdMs']
: .25;
}
- protected function logStandardData( array $stats ) {
+ public function log( array $stats ) {
if ( $this->collector->getTemplated() ) {
$out = '';
if ( $this->collector->getTemplated() ) {
$out = '';
return function_exists( 'socket_create' );
}
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 );
global $wgUDPProfilerHost, $wgUDPProfilerPort, $wgUDPProfilerFormatString;
$sock = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP );