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
Fix typo in tables.sql, pointed out by Jidanni
[lhc/web/wiklou.git]
/
maintenance
/
mctest.php
diff --git
a/maintenance/mctest.php
b/maintenance/mctest.php
index
7deaa07
..
64fea06
100644
(file)
--- a/
maintenance/mctest.php
+++ b/
maintenance/mctest.php
@@
-1,16
+1,28
@@
<?php
<?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');
$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] );
#$wgDebugLogFile = '/dev/stdout';
if ( isset( $args[0] ) ) {
$wgMemCachedServers = array( $args[0] );
-} else {
- $wgMemCachedServers[] = 'localhost';
}
if ( isset( $options['i'] ) ) {
$iterations = $options['i'];
}
if ( isset( $options['i'] ) ) {
$iterations = $options['i'];
@@
-49,11
+61,5
@@
foreach ( $wgMemCachedServers as $server ) {
print "set: $set incr: $incr get: $get time: $exectime\n";
}
print "set: $set incr: $incr get: $get time: $exectime\n";
}
-function microtime_float()
-{
- list($usec, $sec) = explode(" ", microtime());
- return ((float)$usec + (float)$sec);
-}
-?>