MediaWiki REL1_32
ProfilerOutputDb Class Reference

Logs profiling data into the local DB. More...

Inheritance diagram for ProfilerOutputDb:
Collaboration diagram for ProfilerOutputDb:

Public Member Functions

 __construct (Profiler $collector, array $params)
 
 canUse ()
 Can this output type be used?
 
 log (array $stats)
 Log MediaWiki-style profiling data.
 

Private Attributes

bool $perHost = false
 Whether to store host data with profiling calls.
 

Additional Inherited Members

- Protected Attributes inherited from ProfilerOutput
Profiler $collector
 
array $params = []
 Configuration of $wgProfiler.
 

Detailed Description

Logs profiling data into the local DB.

Since
1.25

Definition at line 33 of file ProfilerOutputDb.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from ProfilerOutput.

Definition at line 37 of file ProfilerOutputDb.php.

References ProfilerOutput\$collector, and ProfilerOutput\$params.

Member Function Documentation

◆ canUse()

ProfilerOutputDb::canUse ( )

Can this output type be used?

Returns
bool

Reimplemented from ProfilerOutput.

Definition at line 46 of file ProfilerOutputDb.php.

References wfReadOnly().

◆ log()

ProfilerOutputDb::log ( array $stats)

Log MediaWiki-style profiling data.

Parameters
array$statsResult of Profiler::getFunctionStats()

Reimplemented from ProfilerOutput.

Definition at line 51 of file ProfilerOutputDb.php.

References $e, $fname, DB_MASTER, Wikimedia\Rdbms\Database\endAtomic(), Wikimedia\Rdbms\IDatabase\getType(), Wikimedia\Rdbms\Database\startAtomic(), Wikimedia\Rdbms\Database\upsert(), wfGetDB(), and wfHostname().

Member Data Documentation

◆ $perHost

bool ProfilerOutputDb::$perHost = false
private

Whether to store host data with profiling calls.

Definition at line 35 of file ProfilerOutputDb.php.


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