Remove request_with_session/request_without_session from showCacheStats.php
authorAlexandre Emsenhuber <mediawiki@emsenhuber.ch>
Thu, 13 Mar 2014 09:34:41 +0000 (10:34 +0100)
committerAlexandre Emsenhuber <mediawiki@emsenhuber.ch>
Thu, 13 Mar 2014 09:34:41 +0000 (10:34 +0100)
Fix for I0ed1e87574 (42fcd43).

Since request_with_session/request_without_session were removed in the
mentionned commit, the maintenance/showCacheStats.php refuses to show
the other statistics.

Change-Id: I955cc537f8bc9116f759af5a5c3005aa7d60c83b

maintenance/showCacheStats.php

index 9168d6f..854910f 100644 (file)
@@ -46,16 +46,6 @@ class ShowCacheStats extends Maintenance {
                if ( get_class( $wgMemc ) == 'EmptyBagOStuff' ) {
                        $this->error( "You are running EmptyBagOStuff, I can not provide any statistics.", true );
                }
-               $session = intval( $wgMemc->get( wfMemcKey( 'stats', 'request_with_session' ) ) );
-               $noSession = intval( $wgMemc->get( wfMemcKey( 'stats', 'request_without_session' ) ) );
-               $total = $session + $noSession;
-               if ( $total == 0 ) {
-                       $this->error( "You either have no stats or the cache isn't running. Aborting.", true );
-               }
-               $this->output( "Requests\n" );
-               $this->output( sprintf( "with session:      %-10d %6.2f%%\n", $session, $session / $total * 100 ) );
-               $this->output( sprintf( "without session:   %-10d %6.2f%%\n", $noSession, $noSession / $total * 100 ) );
-               $this->output( sprintf( "total:             %-10d %6.2f%%\n", $total, 100 ) );
 
                $this->output( "\nParser cache\n" );
                $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_hit' ) ) );