MediaWiki master
MediaWiki\Profiler\Output\ProfilerOutputText Class Reference

Adds profiler output to the HTTP response. More...

Inherits MediaWiki\Profiler\Output\ProfilerOutput.

Collaboration diagram for MediaWiki\Profiler\Output\ProfilerOutputText:

Public Member Functions

 __construct (Profiler $collector, array $params)
 
 log (array $stats)
 Log MediaWiki-style profiling data.
 
 logsToOutput ()
 May the log() try to write to standard output?
Returns
bool
Since
1.33

 
- Public Member Functions inherited from MediaWiki\Profiler\Output\ProfilerOutput
 canUse ()
 Can this output type be used?
 

Additional Inherited Members

- Protected Attributes inherited from MediaWiki\Profiler\Output\ProfilerOutput
Profiler $collector
 
LoggerInterface $logger
 
array $params
 Configuration of $wgProfiler.
 

Detailed Description

Adds profiler output to the HTTP response.

The least sophisticated profiler output class possible, view source! :)

Since
1.25

Definition at line 19 of file ProfilerOutputText.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from MediaWiki\Profiler\Output\ProfilerOutput.

Definition at line 26 of file ProfilerOutputText.php.

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

Member Function Documentation

◆ log()

MediaWiki\Profiler\Output\ProfilerOutputText::log ( array $stats)

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 from MediaWiki\Profiler\Output\ProfilerOutput.

Definition at line 37 of file ProfilerOutputText.php.

References wfIsCLI().

◆ logsToOutput()

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

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

Returns
bool
Since
1.33

Reimplemented from MediaWiki\Profiler\Output\ProfilerOutput.

Definition at line 33 of file ProfilerOutputText.php.


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