|
MediaWiki REL1_39
|
Basic MySQL load monitor with no external dependencies Uses memcached to cache the replication lag for a short time. More...


Public Member Functions | |
| __construct (ILoadBalancer $lb, BagOStuff $srvCache, WANObjectCache $wCache, array $options=[]) | |
Public Member Functions inherited from Wikimedia\Rdbms\LoadMonitor | |
| getLagTimes (array $serverIndexes, $domain) | |
| Get an estimate of replication lag (in seconds) for each server. | |
| scaleLoads (array &$weightByServer, $domain) | |
| Perform load ratio adjustment before deciding which server to use. | |
| setLogger (LoggerInterface $logger) | |
| setMockTime (&$time) | |
| setStatsdDataFactory (StatsdDataFactoryInterface $statsFactory) | |
| Sets a StatsdDataFactory instance on the object. | |
Protected Member Functions | |
| getWeightScale ( $index, IDatabase $conn=null) | |
Protected Member Functions inherited from Wikimedia\Rdbms\LoadMonitor | |
| computeServerStates (array $serverIndexes, $domain, $priorStates) | |
| getCurrentTime () | |
| getNewScaleViaMovingAve ( $lastScale, $naiveScale, $movAveRatio) | |
| Get the moving average weight scale given a naive and the last iteration value. | |
| getServerStates (array $serverIndexes, $domain) | |
Additional Inherited Members | |
Protected Attributes inherited from Wikimedia\Rdbms\LoadMonitor | |
| ILoadBalancer | $lb |
| LoggerInterface | $replLogger |
| BagOStuff | $srvCache |
| StatsdDataFactoryInterface | $statsd |
| WANObjectCache | $wanCache |
Basic MySQL load monitor with no external dependencies Uses memcached to cache the replication lag for a short time.
Definition at line 32 of file LoadMonitorMySQL.php.
| Wikimedia\Rdbms\LoadMonitorMySQL::__construct | ( | ILoadBalancer | $lb, |
| BagOStuff | $srvCache, | ||
| WANObjectCache | $wCache, | ||
| array | $options = [] ) |
| ILoadBalancer | $lb | |
| BagOStuff | $srvCache | |
| WANObjectCache | $wCache | |
| array | $options |
|
Reimplemented from Wikimedia\Rdbms\LoadMonitor.
Definition at line 36 of file LoadMonitorMySQL.php.
References Wikimedia\Rdbms\LoadMonitor\$lb, and Wikimedia\Rdbms\LoadMonitor\$srvCache.
|
protected |
| int | $index | Server index |
| IDatabase | null | $conn | Connection handle or null on connection failure |
Reimplemented from Wikimedia\Rdbms\LoadMonitor.
Definition at line 44 of file LoadMonitorMySQL.php.