<?php
-/* $Id$ */
+/**
+ * This script makes several 'set', 'incr' and 'get' requests on every
+ * memcached server and shows a report.
+ *
+ * $Id$
+ * @file
+ * @ingroup Maintenance
+ */
$optionsWithArgs = array( 'i' );
require_once('commandLine.inc');
+function microtime_float()
+{
+ list($usec, $sec) = explode(" ", microtime());
+ return ((float)$usec + (float)$sec);
+}
+
+
#$wgDebugLogFile = '/dev/stdout';
if ( isset( $args[0] ) ) {
$wgMemCachedServers = array( $args[0] );
-} else {
- $wgMemCachedServers[] = 'localhost';
}
if ( isset( $options['i'] ) ) {
$iterations = $options['i'];
print "set: $set incr: $incr get: $get time: $exectime\n";
}
-function microtime_float()
-{
- list($usec, $sec) = explode(" ", microtime());
- return ((float)$usec + (float)$sec);
-}
-?>