MediaWiki master
|
An interface to help developers measure the performance of their applications. More...
Inherits LoggerAwareInterface.
Public Member Functions | |
__construct (array $params=[]) | |
clearMarks ( $markName=null) | |
getEntries () | |
getEntriesByType ( $entryType) | |
getEntryByName ( $name) | |
mark ( $markName) | |
Store a timestamp with the associated name (a "mark") | |
measure ( $measureName, $startMark='requestStart', $endMark=null) | |
This method stores the duration between two marks along with the associated name (a "measure"). | |
setLogger (LoggerInterface $logger) | |
Sets a logger instance on the object. | |
Protected Attributes | |
LoggerInterface | $logger |
An interface to help developers measure the performance of their applications.
This interface closely matches the W3C's User Timing specification. The key differences are:
The in-line documentation incorporates content from the User Timing Specification https://www.w3.org/TR/user-timing/ Copyright © 2013 World Wide Web Consortium, (MIT, ERCIM, Keio, Beihang). https://www.w3.org/Consortium/Legal/2015/doc-license
Definition at line 45 of file Timing.php.
Timing::__construct | ( | array | $params = [] | ) |
Definition at line 53 of file Timing.php.
References $params, clearMarks(), and setLogger().
Timing::clearMarks | ( | $markName = null | ) |
string | null | $markName | The name of the mark that should be cleared. If not specified, all marks will be cleared. |
Definition at line 88 of file Timing.php.
Referenced by __construct().
Timing::getEntries | ( | ) |
Definition at line 164 of file Timing.php.
Timing::getEntriesByType | ( | $entryType | ) |
string | $entryType |
Definition at line 174 of file Timing.php.
Timing::getEntryByName | ( | $name | ) |
string | $name |
Definition at line 189 of file Timing.php.
Referenced by measure().
Timing::mark | ( | $markName | ) |
Store a timestamp with the associated name (a "mark")
string | $markName | The name associated with the timestamp. If there already exists an entry by that name, it is overwritten. |
Definition at line 74 of file Timing.php.
Timing::measure | ( | $measureName, | |
$startMark = 'requestStart', | |||
$endMark = null ) |
This method stores the duration between two marks along with the associated name (a "measure").
If neither the startMark nor the endMark argument is specified, measure() will store the duration from $_SERVER['REQUEST_TIME_FLOAT'] to the current time. If the startMark argument is specified, but the endMark argument is not specified, measure() will store the duration from the most recent occurrence of the start mark to the current time. If both the startMark and endMark arguments are specified, measure() will store the duration from the most recent occurrence of the start mark to the most recent occurrence of the end mark.
string | $measureName | |
string | $startMark | |
string | null | $endMark |
Definition at line 123 of file Timing.php.
References getEntryByName().
Timing::setLogger | ( | LoggerInterface | $logger | ) |
Sets a logger instance on the object.
LoggerInterface | $logger |
Definition at line 63 of file Timing.php.
Referenced by __construct().
|
protected |
Definition at line 51 of file Timing.php.