MediaWiki  REL1_24
ProfilerMwprof Class Reference

Profiler class for Mwprof. More...

Inheritance diagram for ProfilerMwprof:
Collaboration diagram for ProfilerMwprof:

List of all members.

Public Member Functions

 close ()
 Close opened profiling sections.
 getOutput ()
 Returns a profiling output to be stored in debug file.
 getRawData ()
 isPersistent ()
 Return whether this profiler stores data.
 isStub ()
 Return whether this a stub profiler.
 logData ()
 Serialize profiling data and send to a profiling data aggregator.
 profileIn ($inName)
 Start a profiling section.
 profileOut ($outName)
 Close a profiling section.
 updateRunningEntry ($name, $elapsedCpu, $elapsedWall)
 Update an entry with timing data.

Public Attributes

const TYPE_RUNNING = 2
const TYPE_SINGLE = 1

Protected Attributes

array $mCollated = array()
 Map of (function name => aggregate data array) *.
array $mErrorEntry
 Cache of a standard broken collation entry *.
array $mWorkStack = array()
 Queue of open profile calls with start data *.

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

Close opened profiling sections.

Reimplemented from Profiler.

Definition at line 244 of file ProfilerMwprof.php.

Returns a profiling output to be stored in debug file.

Returns:
string

Reimplemented from Profiler.

Definition at line 250 of file ProfilerMwprof.php.

Returns:
array

Reimplemented from Profiler.

Definition at line 131 of file ProfilerMwprof.php.

Return whether this profiler stores data.

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

See also:
Profiler::logData()
Returns:
bool

Reimplemented from Profiler.

Definition at line 49 of file ProfilerMwprof.php.

Return whether this a stub profiler.

Returns:
bool

Reimplemented from Profiler.

Definition at line 45 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 195 of file ProfilerMwprof.php.

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 61 of file ProfilerMwprof.php.

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 74 of file ProfilerMwprof.php.

ProfilerMwprof::updateRunningEntry ( 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 97 of file ProfilerMwprof.php.


Member Data Documentation

array ProfilerMwprof::$mCollated = array() [protected]

Map of (function name => aggregate data array) *.

Definition at line 38 of file ProfilerMwprof.php.

array ProfilerMwprof::$mErrorEntry [protected]

Cache of a standard broken collation entry *.

Definition at line 39 of file ProfilerMwprof.php.

array ProfilerMwprof::$mWorkStack = array() [protected]

Queue of open profile calls with start data *.

Definition at line 36 of file ProfilerMwprof.php.

Definition at line 43 of file ProfilerMwprof.php.

Definition at line 42 of file ProfilerMwprof.php.


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