summaryrefslogtreecommitdiff
path: root/maintenance/mctest.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/mctest.php')
-rw-r--r--maintenance/mctest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/maintenance/mctest.php b/maintenance/mctest.php
index 651b2958..359cd248 100644
--- a/maintenance/mctest.php
+++ b/maintenance/mctest.php
@@ -29,15 +29,16 @@ class mcTest extends Maintenance {
$this->mDescription = "Makes several 'set', 'incr' and 'get' requests on every"
. " memcached server and shows a report";
$this->addOption( 'i', 'Number of iterations', false, true );
- $this->addArg( 'server', 'Memcached server to test', false );
+ $this->addArg( 'server[:port]', 'Memcached server to test, with optional port', false );
}
public function execute() {
global $wgMemCachedServers;
$iterations = $this->getOption( 'i', 100 );
- if ( $this->hasArg() )
+ if ( $this->hasArg() ) {
$wgMemCachedServers = array( $this->getArg() );
+ }
foreach ( $wgMemCachedServers as $server ) {
$this->output( $server . " ", $server );