diff options
Diffstat (limited to 'includes/db/LoadMonitor.php')
-rw-r--r-- | includes/db/LoadMonitor.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/includes/db/LoadMonitor.php b/includes/db/LoadMonitor.php index 146ac61e..ad7b3b2f 100644 --- a/includes/db/LoadMonitor.php +++ b/includes/db/LoadMonitor.php @@ -37,7 +37,7 @@ interface LoadMonitor { /** * Perform pre-connection load ratio adjustment. * @param $loads array - * @param $group String: the selected query group + * @param string $group the selected query group * @param $wiki String */ function scaleLoads( &$loads, $group = false, $wiki = false ); @@ -159,7 +159,7 @@ class LoadMonitor_MySQL implements LoadMonitor { $times = array(); foreach ( $serverIndexes as $i ) { - if ($i == 0) { # Master + if ( $i == 0 ) { # Master $times[$i] = 0; } elseif ( false !== ( $conn = $this->parent->getAnyOpenConnection( $i ) ) ) { $times[$i] = $conn->getLag(); @@ -173,7 +173,7 @@ class LoadMonitor_MySQL implements LoadMonitor { $wgMemc->set( $memcKey, $times, $expiry ); # But don't give the timestamp to the caller - unset($times['timestamp']); + unset( $times['timestamp'] ); $lagTimes = $times; wfProfileOut( __METHOD__ ); @@ -189,7 +189,7 @@ class LoadMonitor_MySQL implements LoadMonitor { if ( !$threshold ) { return 0; } - $status = $conn->getMysqlStatus("Thread%"); + $status = $conn->getMysqlStatus( "Thread%" ); if ( $status['Threads_running'] > $threshold ) { $server = $conn->getProperty( 'mServer' ); wfLogDBError( "LB backoff from $server - Threads_running = {$status['Threads_running']}\n" ); @@ -199,4 +199,3 @@ class LoadMonitor_MySQL implements LoadMonitor { } } } - |