MediaWiki master
|
Database load monitoring interface. More...
Inherits LoggerAwareInterface, and Wikimedia\Stats\StatsdAwareInterface.
Inherited by Wikimedia\Rdbms\LoadMonitor.
Public Member Functions | |
__construct (ILoadBalancer $lb, BagOStuff $sCache, WANObjectCache $wCache, $options) | |
Construct a new LoadMonitor with a given LoadBalancer parent. | |
scaleLoads (array &$weightByServer) | |
Perform load ratio adjustment before deciding which server to use. | |
Public Member Functions inherited from Wikimedia\Stats\StatsdAwareInterface | |
setStatsdDataFactory (StatsdDataFactoryInterface $statsFactory) | |
Sets a StatsdDataFactory instance on the object. | |
Public Attributes | |
const | STATE_AS_OF = 'time' |
const | STATE_CONN_COUNT = 'conn_count' |
const | STATE_UP = 'up' |
Database load monitoring interface.
Definition at line 33 of file ILoadMonitor.php.
Wikimedia\Rdbms\ILoadMonitor::__construct | ( | ILoadBalancer | $lb, |
BagOStuff | $sCache, | ||
WANObjectCache | $wCache, | ||
$options ) |
Construct a new LoadMonitor with a given LoadBalancer parent.
ILoadBalancer | $lb | LoadBalancer this instance serves |
BagOStuff | $sCache | Local server memory cache |
WANObjectCache | $wCache | Local cluster memory cache |
array | $options | Additional parameters include:
|
Implemented in Wikimedia\Rdbms\LoadMonitor.
Wikimedia\Rdbms\ILoadMonitor::scaleLoads | ( | array & | $weightByServer | ) |
Perform load ratio adjustment before deciding which server to use.
array<int,int|float> | &$weightByServer Map of (server index => weight) |
Implemented in Wikimedia\Rdbms\LoadMonitor, and Wikimedia\Rdbms\LoadMonitorNull.
const Wikimedia\Rdbms\ILoadMonitor::STATE_AS_OF = 'time' |
Definition at line 36 of file ILoadMonitor.php.
const Wikimedia\Rdbms\ILoadMonitor::STATE_CONN_COUNT = 'conn_count' |
Definition at line 35 of file ILoadMonitor.php.
Referenced by Wikimedia\Rdbms\LoadMonitor\scaleLoads().
const Wikimedia\Rdbms\ILoadMonitor::STATE_UP = 'up' |
Definition at line 34 of file ILoadMonitor.php.