MediaWiki
1.28.0
|
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, BagOStuff $cache, array $options=[]) | |
Construct a new LoadMonitor with a given LoadBalancer parent. More... | |
Public Member Functions inherited from LoadMonitor | |
__construct (ILoadBalancer $lb, BagOStuff $srvCache, BagOStuff $cache, array $options=[]) | |
Construct a new LoadMonitor with a given LoadBalancer parent. More... | |
getLagTimes (array $serverIndexes, $domain) | |
Get an estimate of replication lag (in seconds) for each server. More... | |
scaleLoads (array &$weightByServer, $domain) | |
Perform load ratio adjustment before deciding which server to use. More... | |
setLogger (LoggerInterface $logger) | |
Protected Member Functions | |
getWeightScale ($index, IDatabase $conn=null) | |
Protected Member Functions inherited from LoadMonitor | |
getServerStates (array $serverIndexes, $domain) | |
getWeightScale ($index, IDatabase $conn=null) | |
Private Attributes | |
float | $warmCacheRatio |
What buffer pool use ratio counts as "warm" (e.g. More... | |
Additional Inherited Members | |
Public Attributes inherited from LoadMonitor | |
const | VERSION = 1 |
Protected Attributes inherited from LoadMonitor | |
BagOStuff | $mainCache |
ILoadBalancer | $parent |
LoggerInterface | $replLogger |
BagOStuff | $srvCache |
Basic MySQL load monitor with no external dependencies Uses memcached to cache the replication lag for a short time.
Definition at line 28 of file LoadMonitorMySQL.php.
LoadMonitorMySQL::__construct | ( | ILoadBalancer | $lb, |
BagOStuff | $sCache, | ||
BagOStuff | $cCache, | ||
array | $options = [] |
||
) |
Construct a new LoadMonitor with a given LoadBalancer parent.
ILoadBalancer | $lb | LoadBalancer this instance serves |
BagOStuff | $sCache | Local server memory cache |
BagOStuff | $cCache | Local cluster memory cache |
array | $options | Options map |
Implements ILoadMonitor.
Definition at line 32 of file LoadMonitorMySQL.php.
References $options.
|
protected |
Definition at line 42 of file LoadMonitorMySQL.php.
|
private |
What buffer pool use ratio counts as "warm" (e.g.
0.5 for 50% usage)
Definition at line 30 of file LoadMonitorMySQL.php.