MediaWiki
REL1_24
|
Profiler base class that defines the interface and some trivial functionality. More...
Public Member Functions | |
__construct (array $params) | |
close () | |
Close opened profiling sections. | |
getOutput () | |
Returns a profiling output to be stored in debug file. | |
getProfileID () | |
getRawData () | |
isPersistent () | |
Return whether this profiler stores data. | |
isStub () | |
Return whether this a stub profiler. | |
logData () | |
Log the data to some store or even the page output. | |
profileIn ($functionname) | |
Called by wfProfieIn() | |
profileOut ($functionname) | |
Called by wfProfieOut() | |
setProfileID ($id) | |
setTemplated ($t) | |
Mark this call as templated or not. | |
transactionWritingIn ($server, $db, $id= '') | |
Mark a DB as in a transaction with one or more writes pending. | |
transactionWritingOut ($server, $db, $id= '') | |
Mark a DB as no longer in a transaction. | |
Static Public Member Functions | |
static | instance () |
Singleton. | |
static | setInstance (Profiler $p) |
Set the profiler to a specific profiler instance. | |
Static Public Attributes | |
static | $__instance = null |
Protected Member Functions | |
debug ($s) | |
Add an entry in the debug log file. | |
debugGroup ($group, $s) | |
Add an entry in the debug log group. | |
getInitialTime ($metric= 'wall') | |
Get the initial time of the request, based either on $wgRequestTime or $wgRUstart. | |
getTime ($metric= 'wall') | |
Get the initial time of the request, based either on $wgRequestTime or $wgRUstart. | |
Protected Attributes | |
string bool | $mProfileID = false |
Profiler ID for bucketing data *. | |
bool | $mTemplated = false |
Whether MediaWiki is in a SkinTemplate output context *. | |
TransactionProfiler | $trxProfiler |
* |
Profiler base class that defines the interface and some trivial functionality.
Definition at line 112 of file Profiler.php.
Profiler::__construct | ( | array $ | params | ) |
array | $params |
Reimplemented in ProfilerStandard.
Definition at line 126 of file Profiler.php.
Profiler::close | ( | ) | [abstract] |
Close opened profiling sections.
Reimplemented in ProfilerStandard, ProfilerMwprof, and ProfilerStub.
Profiler::debug | ( | $ | s | ) | [protected] |
Add an entry in the debug log file.
string | $s | String to output |
Definition at line 345 of file Profiler.php.
Profiler::debugGroup | ( | $ | group, |
$ | s | ||
) | [protected] |
Add an entry in the debug log group.
string | $group | Group to send the message to |
string | $s | String to output |
Definition at line 357 of file Profiler.php.
Profiler::getInitialTime | ( | $ | metric = 'wall' | ) | [protected] |
Get the initial time of the request, based either on $wgRequestTime or $wgRUstart.
Will return null if not able to find data.
string | bool | $metric | Metric to use, with the following possibilities:
|
Definition at line 316 of file Profiler.php.
Profiler::getOutput | ( | ) | [abstract] |
Returns a profiling output to be stored in debug file.
Reimplemented in ProfilerStandard, ProfilerMwprof, and ProfilerStub.
Definition at line 195 of file Profiler.php.
Referenced by ProfilerSimpleUDP\logData().
Profiler::getRawData | ( | ) | [abstract] |
Reimplemented in ProfilerStandard, ProfilerMwprof, and ProfilerStub.
Profiler::getTime | ( | $ | metric = 'wall' | ) | [protected] |
Get the initial time of the request, based either on $wgRequestTime or $wgRUstart.
Will return null if not able to find data.
string | bool | $metric | Metric to use, with the following possibilities:
|
Definition at line 287 of file Profiler.php.
Referenced by ProfilerSimpleTrace\profileOut().
static Profiler::instance | ( | ) | [static, final] |
Singleton.
Definition at line 137 of file Profiler.php.
Referenced by ProfileSection\__construct(), DatabaseBase\doRollback(), TestFileOpPerformance\execute(), Maintenance\finalSetup(), MWDebug\getDebugInfo(), wfLogProfilingData(), wfProfileIn(), and wfProfileOut().
Profiler::isPersistent | ( | ) | [abstract] |
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.
Reimplemented in ProfilerStandard, ProfilerMwprof, ProfilerSimpleUDP, ProfilerSimpleDB, and ProfilerStub.
Profiler::isStub | ( | ) | [abstract] |
Return whether this a stub profiler.
Reimplemented in ProfilerStandard, ProfilerMwprof, and ProfilerStub.
Profiler::logData | ( | ) | [abstract] |
Log the data to some store or even the page output.
Reimplemented in ProfilerStandard, ProfilerMwprof, ProfilerSimpleTrace, ProfilerStub, ProfilerSimpleText, ProfilerSimpleDB, and ProfilerSimpleUDP.
Profiler::profileIn | ( | $ | functionname | ) | [abstract] |
Called by wfProfieIn()
string | $functionname |
Reimplemented in ProfilerStandard, ProfilerMwprof, ProfilerStub, and ProfilerSimpleTrace.
Profiler::profileOut | ( | $ | functionname | ) | [abstract] |
Called by wfProfieOut()
string | $functionname |
Reimplemented in ProfilerStandard, ProfilerMwprof, ProfilerSimpleTrace, and ProfilerStub.
static Profiler::setInstance | ( | Profiler $ | p | ) | [static, final] |
Set the profiler to a specific profiler instance.
Mostly for dumpHTML
Profiler | $p |
Definition at line 162 of file Profiler.php.
Referenced by TestFileOpPerformance\execute(), and Maintenance\finalSetup().
Profiler::setProfileID | ( | $ | id | ) |
string | $id |
Definition at line 188 of file Profiler.php.
Profiler::setTemplated | ( | $ | t | ) |
Profiler::transactionWritingIn | ( | $ | server, |
$ | db, | ||
$ | id = '' |
||
) |
Mark a DB as in a transaction with one or more writes pending.
Note that there can be multiple connections to a single DB.
string | $server | DB server |
string | $db | DB name |
string | $id | Resource ID string of connection |
Reimplemented in ProfilerStub.
Definition at line 226 of file Profiler.php.
Profiler::transactionWritingOut | ( | $ | server, |
$ | db, | ||
$ | id = '' |
||
) |
Mark a DB as no longer in a transaction.
This will check if locks are possibly held for longer than needed and log any affected transactions to a special DB log. Note that there can be multiple connections to a single DB.
string | $server | DB server |
string | $db | DB name |
string | $id | Resource ID string of connection |
Reimplemented in ProfilerStub.
Definition at line 241 of file Profiler.php.
Profiler::$__instance = null [static] |
Definition at line 120 of file Profiler.php.
Referenced by ProfileSection\__construct(), ProfileSection\__destruct(), wfProfileIn(), and wfProfileOut().
string bool Profiler::$mProfileID = false [protected] |
Profiler ID for bucketing data *.
Definition at line 113 of file Profiler.php.
bool Profiler::$mTemplated = false [protected] |
Whether MediaWiki is in a SkinTemplate output context *.
Definition at line 114 of file Profiler.php.
TransactionProfiler Profiler::$trxProfiler [protected] |
*
Definition at line 116 of file Profiler.php.