MediaWiki  REL1_23
ProfilerMwprof Class Reference

Profiler class for Mwprof. More...

Inheritance diagram for ProfilerMwprof:
Collaboration diagram for ProfilerMwprof:

List of all members.

Public Member Functions

 getFunctionReport ()
 Produce an empty function report.
 isPersistent ()
 Indicate that this Profiler subclass is persistent.
 logData ()
 Serialize profiling data and send to a profiling data aggregator.
 profileIn ($inName)
 Start a profiling section.
 profileOut ($outName)
 Close a profiling section.
 updateEntry ($name, $elapsedCpu, $elapsedWall)
 Update an entry with timing data.

Public Attributes

const TYPE_RUNNING = 2
const TYPE_SINGLE = 1

Detailed Description

Profiler class for Mwprof.

Mwprof is a high-performance MediaWiki profiling data collector, designed to collect profiling data from multiple hosts running in tandem. This class serializes profiling samples into MessagePack arrays and sends them to an Mwprof instance via UDP.

See also:
https://github.com/wikimedia/operations-software-mwprof
Since:
1.23

Definition at line 35 of file ProfilerMwprof.php.


Member Function Documentation

Produce an empty function report.

ProfileMwprof does not provide a function report.

Returns:
string Empty string.

Reimplemented from Profiler.

Definition at line 75 of file ProfilerMwprof.php.

Indicate that this Profiler subclass is persistent.

Called by Parser::braceSubstitution. If true, the parser will not generate per-title profiling sections, to avoid overloading the profiling data collector.

Returns:
bool true

Reimplemented from Profiler.

Definition at line 51 of file ProfilerMwprof.php.

Serialize profiling data and send to a profiling data aggregator.

Individual entries are represented as arrays and then encoded using MessagePack, an efficient binary data-interchange format. Encoded entries are accumulated into a buffer and sent in batch via UDP to the profiling data aggregator.

Reimplemented from Profiler.

Definition at line 149 of file ProfilerMwprof.php.

References $count, $name, array(), as, Profiler\close(), global, and MWMessagePack\pack().

Start a profiling section.

Marks the beginning of the function or code-block that should be time and logged under some specific name.

Parameters:
string$inNameSection to start

Reimplemented from Profiler.

Definition at line 63 of file ProfilerMwprof.php.

References array(), and Profiler\getTime().

Close a profiling section.

Marks the end of the function or code-block that should be timed and logged under some specific name.

Parameters:
string$outNameSection to close

Reimplemented from Profiler.

Definition at line 87 of file ProfilerMwprof.php.

References array(), Profiler\debugGroup(), Profiler\getTime(), list, updateEntry(), and Profiler\updateTrxProfiling().

ProfilerMwprof::updateEntry ( name,
elapsedCpu,
elapsedWall 
)

Update an entry with timing data.

Parameters:
string$nameSection name
float$elapsedCpuelapsed CPU time
float$elapsedWallelapsed wall-clock time

Definition at line 110 of file ProfilerMwprof.php.

References $name, and array().

Referenced by profileOut().


Member Data Documentation

Definition at line 40 of file ProfilerMwprof.php.

Definition at line 39 of file ProfilerMwprof.php.


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