r74543 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74542‎ | r74543 | r74544 >
Date:11:47, 9 October 2010
Author:ialex
Status:ok
Tags:
Comment:
* Added missing call to parent constructor
* Removed trailing whitespaces
Modified paths:
  • /trunk/phase3/maintenance/stats.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/stats.php
@@ -26,12 +26,13 @@
2727
2828 public function __construct() {
2929 $this->mDescription = "Show statistics from the cache";
 30+ parent::__construct();
3031 }
3132
3233 public function execute() {
3334 global $wgMemc;
34 -
35 - // Can't do stats if
 35+
 36+ // Can't do stats if
3637 if ( get_class( $wgMemc ) == 'FakeMemCachedClient' ) {
3738 $this->error( "You are running FakeMemCachedClient, I can not provide any statistics.", true );
3839 }
@@ -45,8 +46,8 @@
4647 $this->output( sprintf( "with session: %-10d %6.2f%%\n", $session, $session / $total * 100 ) );
4748 $this->output( sprintf( "without session: %-10d %6.2f%%\n", $noSession, $noSession / $total * 100 ) );
4849 $this->output( sprintf( "total: %-10d %6.2f%%\n", $total, 100 ) );
49 -
50 -
 50+
 51+
5152 $this->output( "\nParser cache\n" );
5253 $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_hit' ) ) );
5354 $invalid = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_invalid' ) ) );
@@ -60,7 +61,7 @@
6162 $this->output( sprintf( "absent: %-10d %6.2f%%\n", $absent, $absent / $total * 100 ) );
6263 $this->output( sprintf( "stub threshold: %-10d %6.2f%%\n", $stub, $stub / $total * 100 ) );
6364 $this->output( sprintf( "total: %-10d %6.2f%%\n", $total, 100 ) );
64 -
 65+
6566 $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'image_cache_hit' ) ) );
6667 $misses = intval( $wgMemc->get( wfMemcKey( 'stats', 'image_cache_miss' ) ) );
6768 $updates = intval( $wgMemc->get( wfMemcKey( 'stats', 'image_cache_update' ) ) );
@@ -69,7 +70,7 @@
7071 $this->output( sprintf( "hits: %-10d %6.2f%%\n", $hits, $hits / $total * 100 ) );
7172 $this->output( sprintf( "misses: %-10d %6.2f%%\n", $misses, $misses / $total * 100 ) );
7273 $this->output( sprintf( "updates: %-10d\n", $updates ) );
73 -
 74+
7475 $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'diff_cache_hit' ) ) );
7576 $misses = intval( $wgMemc->get( wfMemcKey( 'stats', 'diff_cache_miss' ) ) );
7677 $uncacheable = intval( $wgMemc->get( wfMemcKey( 'stats', 'diff_uncacheable' ) ) );
@@ -83,7 +84,3 @@
8485
8586 $maintClass = "CacheStats";
8687 require_once( DO_MAINTENANCE );
87 -
88 -
89 -
90 -

Status & tagging log