Wikibase
MediaWiki Wikibase extension
|
Utility class for collecting dispatch statistics. More...
Public Member Functions | |
load ( $now=0) | |
Loads the current dispatch status from the database and calculates statistics. | |
hasStats () | |
getClientStates () | |
Returns the dispatch state for all client wikis. | |
getClientCount () | |
Returns the number of active client wikis. | |
getFreshest () | |
Returns a dispatch status object for the client wiki that was updated most recently. | |
getStalest () | |
Returns a dispatch status object for the client wiki that was updated least recently. | |
getMedian () | |
Returns a dispatch status object for the client wiki that represents the median in terms of dispatch lag. | |
getAverage () | |
Returns a pseudo-status object representing the average (mean) dispatch lag. | |
getLockedCount () | |
Returns the number of client wikis currently locked. | |
getMaxChangeId () | |
Returns the newest change ID from the changes table. | |
getMinChangeId () | |
Returns the oldest change ID from the changes table. | |
getMaxChangeTimestamp () | |
Returns the newest timestamp from the changes table. | |
getMinChangeTimestamp () | |
Returns the oldest timestamp from the changes table. | |
Private Attributes | |
$clientStates = null | |
$changeStats = null | |
$average = null | |
Utility class for collecting dispatch statistics.
Note that you must call load() before accessing any getters.
Wikibase\Repo\Store\Sql\DispatchStats::getAverage | ( | ) |
Returns a pseudo-status object representing the average (mean) dispatch lag.
The status object has the following fields:
Wikibase\Repo\Store\Sql\DispatchStats::getClientCount | ( | ) |
Returns the number of active client wikis.
Wikibase\Repo\Store\Sql\DispatchStats::getClientStates | ( | ) |
Returns the dispatch state for all client wikis.
The state for each wiki is returned as an object containing the following fields:
Wikibase\Repo\Store\Sql\DispatchStats::getFreshest | ( | ) |
Returns a dispatch status object for the client wiki that was updated most recently.
See getClientStates() for the structure of the status object.
Wikibase\Repo\Store\Sql\DispatchStats::getLockedCount | ( | ) |
Returns the number of client wikis currently locked.
Note that this does not probe the locks, so they may be stale.
Wikibase\Repo\Store\Sql\DispatchStats::getMaxChangeId | ( | ) |
Returns the newest change ID from the changes table.
Wikibase\Repo\Store\Sql\DispatchStats::getMaxChangeTimestamp | ( | ) |
Returns the newest timestamp from the changes table.
Wikibase\Repo\Store\Sql\DispatchStats::getMedian | ( | ) |
Returns a dispatch status object for the client wiki that represents the median in terms of dispatch lag.
See getClientStates() for the structure of the status object.
Wikibase\Repo\Store\Sql\DispatchStats::getMinChangeId | ( | ) |
Returns the oldest change ID from the changes table.
Wikibase\Repo\Store\Sql\DispatchStats::getMinChangeTimestamp | ( | ) |
Returns the oldest timestamp from the changes table.
Wikibase\Repo\Store\Sql\DispatchStats::getStalest | ( | ) |
Returns a dispatch status object for the client wiki that was updated least recently.
See getClientStates() for the structure of the status object.
Wikibase\Repo\Store\Sql\DispatchStats::hasStats | ( | ) |
Wikibase\Repo\Store\Sql\DispatchStats::load | ( | $now = 0 | ) |
Loads the current dispatch status from the database and calculates statistics.
Before this method is called, the behavior of the getters is undefined.
int | string | $now | Timestamp to consider the current time. Mostly useful for testing. |
|
private |
|
private |
|
private |