chmod 644
[lhc/web/wiklou.git] / maintenance / mctest.php
index 28b041a..da49e55 100644 (file)
@@ -30,7 +30,7 @@ require_once __DIR__ . '/Maintenance.php';
  *
  * @ingroup Maintenance
  */
-class mcTest extends Maintenance {
+class McTest extends Maintenance {
        public function __construct() {
                parent::__construct();
                $this->mDescription = "Makes several 'set', 'incr' and 'get' requests on every"
@@ -67,7 +67,7 @@ class mcTest extends Maintenance {
                foreach ( $servers as $server ) {
                        $this->output(
                                str_pad( $server, $maxSrvLen ),
-                               $server  # output channel
+                               $server # output channel
                        );
 
                        $mcc = new MemCachedClientforWiki( array(
@@ -80,7 +80,7 @@ class mcTest extends Maintenance {
                        $get = 0;
                        $time_start = $this->microtime_float();
                        for ( $i = 1; $i <= $iterations; $i++ ) {
-                               if ( !is_null( $mcc->set( "test$i", $i ) ) ) {
+                               if ( $mcc->set( "test$i", $i ) ) {
                                        $set++;
                                }
                        }
@@ -107,9 +107,10 @@ class mcTest extends Maintenance {
         */
        private function microtime_float() {
                list( $usec, $sec ) = explode( " ", microtime() );
+
                return ( (float)$usec + (float)$sec );
        }
 }
 
-$maintClass = "mcTest";
+$maintClass = "McTest";
 require_once RUN_MAINTENANCE_IF_MAIN;