|
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 33 of file Timing.php.
| Wikimedia\Timing\Timing::__construct | ( | array | $params = [] | ) |
Definition at line 41 of file Timing.php.
References Wikimedia\Timing\Timing\clearMarks(), and Wikimedia\Timing\Timing\setLogger().
| Wikimedia\Timing\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 74 of file Timing.php.
Referenced by Wikimedia\Timing\Timing\__construct().
| Wikimedia\Timing\Timing::getEntries | ( | ) |
Definition at line 150 of file Timing.php.
| Wikimedia\Timing\Timing::getEntriesByType | ( | $entryType | ) |
| string | $entryType |
Definition at line 160 of file Timing.php.
| Wikimedia\Timing\Timing::getEntryByName | ( | $name | ) |
| string | $name |
Definition at line 175 of file Timing.php.
| Wikimedia\Timing\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 60 of file Timing.php.
| Wikimedia\Timing\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 109 of file Timing.php.
| Wikimedia\Timing\Timing::setLogger | ( | LoggerInterface | $logger | ) |
Sets a logger instance on the object.
Definition at line 49 of file Timing.php.
Referenced by Wikimedia\Timing\Timing\__construct().
|
protected |
Definition at line 39 of file Timing.php.