Public Member Functions | |
__construct () | |
profileIn ($functionname) | |
Called by wfProfieIn(). | |
profileOut ($functionname) | |
Called by wfProfieOut(). | |
close () | |
called by wfProfileClose() | |
getOutput () | |
called by wfGetProfilingOutput() | |
getCallTree () | |
returns a tree of function call instead of a list of functions | |
remapCallTree ($stack) | |
Recursive function the format the current profiling array into a tree. | |
getCallTreeLine ($entry) | |
Callback to get a formatted line for the call tree. | |
getTime () | |
getUserTime () | |
getFunctionReport () | |
Returns a list of profiled functions. | |
calltreeCount ($stack, $start) | |
Counts the number of profiled function calls sitting under the given point in the call graph. | |
getCurrentSection () | |
Get the function name of the current profiling section. | |
debug ($s) | |
Add an entry in the debug log file. | |
Static Public Member Functions | |
static | logToDB ($name, $timeSum, $eventCount, $memorySum) |
Log a function into the database. | |
static | getCaller ($level) |
Get function caller. | |
Public Attributes | |
$mStack = array () | |
$mWorkStack = array () | |
$mCollated = array () | |
$mCalls = array () | |
$mTotals = array () |
Definition at line 61 of file Profiler.php.
Profiler::__construct | ( | ) |
Reimplemented in ProfilerSimple, and ProfilerSimpleTrace.
Definition at line 65 of file Profiler.php.
References $wgRequestTime, and profileIn().
Profiler::calltreeCount | ( | $ | stack, | |
$ | start | |||
) |
Counts the number of profiled function calls sitting under the given point in the call graph.
Not the most efficient algo.
$stack | Array: | |
$start | Integer: |
Definition at line 340 of file Profiler.php.
References $count, $i, and $start.
Referenced by getFunctionReport().
Profiler::close | ( | ) |
called by wfProfileClose()
Definition at line 130 of file Profiler.php.
References profileOut().
Referenced by getOutput().
Profiler::debug | ( | $ | s | ) |
Add an entry in the debug log file.
$s | string to output |
Definition at line 436 of file Profiler.php.
Referenced by ProfilerSimple::profileIn(), profileIn(), ProfilerSimpleTrace::profileOut(), ProfilerSimple::profileOut(), and profileOut().
static Profiler::getCaller | ( | $ | level | ) | [static] |
Get function caller.
$level | int |
Definition at line 418 of file Profiler.php.
References wfDebugBacktrace().
Profiler::getCallTree | ( | ) |
returns a tree of function call instead of a list of functions
Definition at line 163 of file Profiler.php.
References remapCallTree().
Referenced by getOutput().
Profiler::getCallTreeLine | ( | $ | entry | ) |
Profiler::getCurrentSection | ( | ) |
Get the function name of the current profiling section.
Definition at line 409 of file Profiler.php.
Profiler::getFunctionReport | ( | ) |
Returns a list of profiled functions.
Also log it into the database if $wgProfileToDatabase is set to true.
Reimplemented in ProfilerSimple, ProfilerSimpleText, and ProfilerSimpleUDP.
Definition at line 233 of file Profiler.php.
References $end, $fname, $i, $start, $total, $wgProfileToDatabase, calltreeCount(), logToDB(), wfProfileIn(), and wfProfileOut().
Referenced by getOutput().
Profiler::getOutput | ( | ) |
called by wfGetProfilingOutput()
Reimplemented in ProfilerSimpleTrace.
Definition at line 139 of file Profiler.php.
References $wgDebugFunctionEntry, $wgProfileCallTree, $wgProfileToDatabase, close(), getCallTree(), and getFunctionReport().
Profiler::getTime | ( | ) |
Profiler::getUserTime | ( | ) |
Definition at line 224 of file Profiler.php.
static Profiler::logToDB | ( | $ | name, | |
$ | timeSum, | |||
$ | eventCount, | |||
$ | memorySum | |||
) | [static] |
Log a function into the database.
$name | string: function name | |
$timeSum | float | |
$eventCount | int: number of times that function was called |
Definition at line 356 of file Profiler.php.
References $dbw, $name, $wgProfilePerHost, wfGetDB(), wfHostname(), and wfReadOnly().
Referenced by getFunctionReport().
Profiler::profileIn | ( | $ | functionname | ) |
Called by wfProfieIn().
$functionname | string |
Reimplemented in ProfilerSimple, and ProfilerSimpleTrace.
Definition at line 80 of file Profiler.php.
References $wgDebugFunctionEntry, $wgProfiling, debug(), and getTime().
Referenced by __construct().
Profiler::profileOut | ( | $ | functionname | ) |
Called by wfProfieOut().
$functionname | string |
Reimplemented in ProfilerSimple, and ProfilerSimpleTrace.
Definition at line 94 of file Profiler.php.
References $wgDebugFunctionEntry, $wgProfiling, debug(), and getTime().
Referenced by close().
Profiler::remapCallTree | ( | $ | stack | ) |
Recursive function the format the current profiling array into a tree.
$stack | profiling array |
Definition at line 172 of file Profiler.php.
Referenced by getCallTree().
Profiler::$mCalls = array () |
Definition at line 63 of file Profiler.php.
Profiler::$mCollated = array () |
Definition at line 62 of file Profiler.php.
Profiler::$mStack = array () |
Definition at line 62 of file Profiler.php.
Profiler::$mTotals = array () |
Definition at line 63 of file Profiler.php.
Profiler::$mWorkStack = array () |
Definition at line 62 of file Profiler.php.