dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mw.widgets.DateInputWidget: Fix label dimensions for Apex theme skins
[lhc/web/wiklou.git]
/
maintenance
/
lag.php
diff --git
a/maintenance/lag.php
b/maintenance/lag.php
index
410bf75
..
9d92794
100644
(file)
--- a/
maintenance/lag.php
+++ b/
maintenance/lag.php
@@
-31,7
+31,7
@@
require_once __DIR__ . '/Maintenance.php';
class DatabaseLag extends Maintenance {
public function __construct() {
parent::__construct();
class DatabaseLag extends Maintenance {
public function __construct() {
parent::__construct();
- $this->
mDescription = "Shows database lag"
;
+ $this->
addDescription( 'Shows database lag' )
;
$this->addOption( 'r', "Don't exit immediately, but show the lag every 5 seconds" );
}
$this->addOption( 'r', "Don't exit immediately, but show the lag every 5 seconds" );
}
@@
-39,7
+39,9
@@
class DatabaseLag extends Maintenance {
if ( $this->hasOption( 'r' ) ) {
$lb = wfGetLB();
echo 'time ';
if ( $this->hasOption( 'r' ) ) {
$lb = wfGetLB();
echo 'time ';
- for ( $i = 1; $i < $lb->getServerCount(); $i++ ) {
+
+ $serverCount = $lb->getServerCount();
+ for ( $i = 1; $i < $serverCount; $i++ ) {
$hostname = $lb->getServerName( $i );
printf( "%-12s ", $hostname );
}
$hostname = $lb->getServerName( $i );
printf( "%-12s ", $hostname );
}