MediaWiki master
ProfilerOutput Class Reference

Base class for profiling output. More...

Inherited by ProfilerOutputDump, ProfilerOutputStats, and ProfilerOutputText.

Collaboration diagram for 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 30 of file ProfilerOutput.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented in ProfilerOutputText.

Definition at line 42 of file ProfilerOutput.php.

References $collector, and $params.

Member Function Documentation

◆ canUse()

ProfilerOutput::canUse ( )

Can this output type be used?

Returns
bool

Reimplemented in ProfilerOutputDump.

Definition at line 52 of file ProfilerOutput.php.

◆ log()

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 ProfilerOutputDump, ProfilerOutputStats, and ProfilerOutputText.

◆ logsToOutput()

ProfilerOutput::logsToOutput ( )

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

Returns
bool
Since
1.33

Reimplemented in ProfilerOutputText.

Definition at line 61 of file ProfilerOutput.php.

Member Data Documentation

◆ $collector

Profiler ProfilerOutput::$collector
protected

Definition at line 32 of file ProfilerOutput.php.

Referenced by __construct(), and ProfilerOutputText\__construct().

◆ $logger

LoggerInterface ProfilerOutput::$logger
protected

Definition at line 34 of file ProfilerOutput.php.

◆ $params

array ProfilerOutput::$params
protected

Configuration of $wgProfiler.

Definition at line 36 of file ProfilerOutput.php.

Referenced by __construct(), and ProfilerOutputText\__construct().


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