MediaWiki master
MediaWiki\Profiler\Output\ProfilerOutput Class Reference

Base class for profiling output. More...

Inherited by MediaWiki\Profiler\Output\ProfilerOutputDump, MediaWiki\Profiler\Output\ProfilerOutputStats, and MediaWiki\Profiler\Output\ProfilerOutputText.

Collaboration diagram for MediaWiki\Profiler\Output\ProfilerOutput:

Public Member Functions

 __construct (Profiler $collector, array $params)
 
 canUse ()
 Can this output type be used?
 
 log (array $stats)
 Log MediaWiki-style profiling data.
 
 logsToOutput ()
 May the log() try to write to standard output?
 

Protected Attributes

Profiler $collector
 
LoggerInterface $logger
 
array $params
 Configuration of $wgProfiler.
 

Detailed Description

Base class for profiling output.

Since
1.25

Definition at line 19 of file ProfilerOutput.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Profiler\Output\ProfilerOutput::__construct ( Profiler $collector,
array $params )
Parameters
Profiler$collectorThe actual profiler
array$paramsConfiguration array, passed down from $wgProfiler

Reimplemented in MediaWiki\Profiler\Output\ProfilerOutputText.

Definition at line 31 of file ProfilerOutput.php.

References MediaWiki\Profiler\Output\ProfilerOutput\$collector, and MediaWiki\Profiler\Output\ProfilerOutput\$params.

Member Function Documentation

◆ canUse()

MediaWiki\Profiler\Output\ProfilerOutput::canUse ( )

Can this output type be used?

Returns
bool

Reimplemented in MediaWiki\Profiler\Output\ProfilerOutputDump.

Definition at line 41 of file ProfilerOutput.php.

◆ log()

MediaWiki\Profiler\Output\ProfilerOutput::log ( array $stats)
abstract

Log MediaWiki-style profiling data.

For classes that enable logsToOutput(), this must not be called unless Profiler::setAllowOutput is enabled.

Parameters
array$statsResult of Profiler::getFunctionStats()

Reimplemented in MediaWiki\Profiler\Output\ProfilerOutputDump, MediaWiki\Profiler\Output\ProfilerOutputStats, and MediaWiki\Profiler\Output\ProfilerOutputText.

◆ logsToOutput()

MediaWiki\Profiler\Output\ProfilerOutput::logsToOutput ( )

May the log() try to write to standard output?

Returns
bool
Since
1.33

Reimplemented in MediaWiki\Profiler\Output\ProfilerOutputText.

Definition at line 50 of file ProfilerOutput.php.

Member Data Documentation

◆ $collector

Profiler MediaWiki\Profiler\Output\ProfilerOutput::$collector
protected

◆ $logger

LoggerInterface MediaWiki\Profiler\Output\ProfilerOutput::$logger
protected

Definition at line 23 of file ProfilerOutput.php.

◆ $params

array MediaWiki\Profiler\Output\ProfilerOutput::$params
protected

The documentation for this class was generated from the following file: