MediaWiki  1.23.2
ProfilerStub Class Reference

Stub profiler that does nothing. More...

Inheritance diagram for ProfilerStub:
Collaboration diagram for ProfilerStub:

Public Member Functions

 close ()
 Close opened profiling sections. More...
 
 getCurrentSection ()
 Get the function name of the current profiling section. More...
 
 getOutput ()
 Returns a profiling output to be stored in debug file. More...
 
 getRawData ()
 
 isPersistent ()
 Return whether this profiler stores data. More...
 
 isStub ()
 Return whether this a stub profiler. More...
 
 logData ()
 Log the whole profiling data into the database. More...
 
 profileIn ( $fn)
 Called by wfProfieIn() More...
 
 profileOut ( $fn)
 Called by wfProfieOut() 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 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...
 
 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...
 
 getFunctionReport ()
 Returns a list of profiled functions. More...
 
 getProfileID ()
 
 getTime ( $metric=false)
 Get the initial time of the request, based either on $wgRequestTime or $wgRUstart. 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...
 

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...
 
- Public Attributes inherited from Profiler
 $mCalls = array()
 
 $mCollated = array()
 
 $mCollateDone = false
 
 $mPeriods = array()
 
 $mTemplated = false
 
 $mTotals = array()
 
 $mWorkStack = array()
 
- 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'
 

Detailed Description

Stub profiler that does nothing.

Definition at line 29 of file ProfilerStub.php.

Member Function Documentation

◆ close()

ProfilerStub::close ( )

Close opened profiling sections.

Reimplemented from Profiler.

Definition at line 39 of file ProfilerStub.php.

◆ getCurrentSection()

ProfilerStub::getCurrentSection ( )

Get the function name of the current profiling section.

Returns

Reimplemented from Profiler.

Definition at line 41 of file ProfilerStub.php.

◆ getOutput()

ProfilerStub::getOutput ( )

Returns a profiling output to be stored in debug file.

Returns
String

Reimplemented from Profiler.

Definition at line 38 of file ProfilerStub.php.

◆ getRawData()

ProfilerStub::getRawData ( )
Returns
array

Reimplemented from Profiler.

Definition at line 44 of file ProfilerStub.php.

References array().

◆ isPersistent()

ProfilerStub::isPersistent ( )

Return whether this profiler stores data.

See also
Profiler::logData()
Returns
Boolean

Reimplemented from Profiler.

Definition at line 33 of file ProfilerStub.php.

◆ isStub()

ProfilerStub::isStub ( )

Return whether this a stub profiler.

Returns
Boolean

Reimplemented from Profiler.

Definition at line 30 of file ProfilerStub.php.

◆ logData()

ProfilerStub::logData ( )

Log the whole profiling data into the database.

Reimplemented from Profiler.

Definition at line 40 of file ProfilerStub.php.

◆ profileIn()

ProfilerStub::profileIn (   $functionname)

Called by wfProfieIn()

Parameters
$functionnameString

Reimplemented from Profiler.

Definition at line 36 of file ProfilerStub.php.

◆ profileOut()

ProfilerStub::profileOut (   $functionname)

Called by wfProfieOut()

Parameters
$functionnameString

Reimplemented from Profiler.

Definition at line 37 of file ProfilerStub.php.

◆ transactionWritingIn()

ProfilerStub::transactionWritingIn (   $server,
  $db 
)

Mark a DB as in a transaction with one or more writes pending.

Note that there can be multiple connections to a single DB.

Parameters
string$serverDB server
string$dbDB name

Reimplemented from Profiler.

Definition at line 42 of file ProfilerStub.php.

◆ transactionWritingOut()

ProfilerStub::transactionWritingOut (   $server,
  $db 
)

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.

Parameters
string$serverDB server
string$dbDB name

Reimplemented from Profiler.

Definition at line 43 of file ProfilerStub.php.


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