MediaWiki
1.23.5
|
Profiler class for Mwprof. More...
Public Member Functions | |
getFunctionReport () | |
Produce an empty function report. More... | |
isPersistent () | |
Indicate that this Profiler subclass is persistent. More... | |
logData () | |
Serialize profiling data and send to a profiling data aggregator. More... | |
profileIn ( $inName) | |
Start a profiling section. More... | |
profileOut ( $outName) | |
Close a profiling section. More... | |
updateEntry ( $name, $elapsedCpu, $elapsedWall) | |
Update an entry with timing data. More... | |
Public Member Functions inherited from Profiler | |
__construct ( $params) | |
calltreeCount ( $stack, $start) | |
Counts the number of profiled function calls sitting under the given point in the call graph. More... | |
close () | |
Close opened profiling sections. More... | |
debug ( $s) | |
Add an entry in the debug log file. More... | |
debugGroup ( $group, $s) | |
Add an entry in the debug log group. More... | |
getCallTree () | |
Returns a tree of function call instead of a list of functions. More... | |
getCallTreeLine ( $entry) | |
Callback to get a formatted line for the call tree. More... | |
getCurrentSection () | |
Get the function name of the current profiling section. More... | |
getOutput () | |
Returns a profiling output to be stored in debug file. More... | |
getProfileID () | |
getRawData () | |
getTime ( $metric=false) | |
Get the initial time of the request, based either on $wgRequestTime or $wgRUstart. More... | |
isStub () | |
Return whether this a stub profiler. More... | |
remapCallTree ( $stack) | |
Recursive function the format the current profiling array into a tree. More... | |
setProfileID ( $id) | |
setTemplated ( $t) | |
Mark this call as templated or not. More... | |
transactionWritingIn ( $server, $db) | |
Mark a DB as in a transaction with one or more writes pending. More... | |
transactionWritingOut ( $server, $db) | |
Mark a DB as no longer in a transaction. More... | |
Public Attributes | |
const | TYPE_RUNNING = 2 |
const | TYPE_SINGLE = 1 |
Public Attributes inherited from Profiler | |
$mCalls = array() | |
$mCollated = array() | |
$mCollateDone = false | |
$mPeriods = array() | |
$mTemplated = false | |
$mTotals = array() | |
$mWorkStack = array() | |
Additional Inherited Members | |
Static Public Member Functions inherited from Profiler | |
static | instance () |
Singleton. More... | |
static | setInstance (Profiler $p) |
Set the profiler to a specific profiler instance. More... | |
Static Public Attributes inherited from Profiler | |
static | $__instance = null |
Protected Member Functions inherited from Profiler | |
addInitialStack () | |
Add the inital item in the stack. More... | |
collateData () | |
getContentType () | |
Get the content type sent out to the client. More... | |
getInitialTime ( $metric=false) | |
Get the initial time of the request, based either on $wgRequestTime or $wgRUstart. More... | |
updateTrxProfiling ( $method, $realtime) | |
Register the name and time of a method for slow DB trx detection. More... | |
Static Protected Member Functions inherited from Profiler | |
static | calculateOverhead ( $profileCount) |
Dummy calls to wfProfileIn/wfProfileOut to calculate its overhead. More... | |
Protected Attributes inherited from Profiler | |
$mDBLockThreshold = 5.0 | |
$mDBTrxHoldingLocks = array() | |
$mDBTrxMethodTimes = array() | |
$mProfileID = false | |
$mStack = array() | |
$mTimeMetric = 'wall' | |
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.
Definition at line 35 of file ProfilerMwprof.php.
ProfilerMwprof::getFunctionReport | ( | ) |
Produce an empty function report.
ProfileMwprof does not provide a function report.
Reimplemented from Profiler.
Definition at line 75 of file ProfilerMwprof.php.
ProfilerMwprof::isPersistent | ( | ) |
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.
Reimplemented from Profiler.
Definition at line 51 of file ProfilerMwprof.php.
ProfilerMwprof::logData | ( | ) |
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().
ProfilerMwprof::profileIn | ( | $inName | ) |
Start a profiling section.
Marks the beginning of the function or code-block that should be time and logged under some specific name.
string | $inName | Section to start |
Reimplemented from Profiler.
Definition at line 63 of file ProfilerMwprof.php.
References array(), and Profiler\getTime().
ProfilerMwprof::profileOut | ( | $outName | ) |
Close a profiling section.
Marks the end of the function or code-block that should be timed and logged under some specific name.
string | $outName | Section 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.
string | $name | Section name |
float | $elapsedCpu | elapsed CPU time |
float | $elapsedWall | elapsed wall-clock time |
Definition at line 110 of file ProfilerMwprof.php.
References $name, and array().
Referenced by profileOut().
const ProfilerMwprof::TYPE_RUNNING = 2 |
Definition at line 40 of file ProfilerMwprof.php.
const ProfilerMwprof::TYPE_SINGLE = 1 |
Definition at line 39 of file ProfilerMwprof.php.