r109830 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109829‎ | r109830 | r109831 >
Date:16:27, 23 January 2012
Author:ialex
Status:ok
Tags:core 
Comment:
Cleanup to statistics:
* Removed 'pcache_miss_invalid' from stats.php and clear_stats.php, no longer used
* Added missing 'job-insert' and 'job-pop' to clear_stats.php
* Added missing call to wfIncrStats( 'pcache_miss_absent' ) when there's no key in ParserCacge::get()
* Removed useless 'pcache_not_possible' stat from OutputPage::addWikiTextTitle() since that function is mostly used for interface messages
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/parser/ParserCache.php (modified) (history)
  • /trunk/phase3/maintenance/clear_stats.php (modified) (history)
  • /trunk/phase3/maintenance/stats.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/stats.php
@@ -54,14 +54,12 @@
5555
5656 $this->output( "\nParser cache\n" );
5757 $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_hit' ) ) );
58 - $invalid = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_invalid' ) ) );
5958 $expired = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_expired' ) ) );
6059 $absent = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_absent' ) ) );
6160 $stub = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_stub' ) ) );
62 - $total = $hits + $invalid + $expired + $absent + $stub;
 61+ $total = $hits + $expired + $absent + $stub;
6362 if ( $total ) {
6463 $this->output( sprintf( "hits: %-10d %6.2f%%\n", $hits, $hits / $total * 100 ) );
65 - $this->output( sprintf( "invalid: %-10d %6.2f%%\n", $invalid, $invalid / $total * 100 ) );
6664 $this->output( sprintf( "expired: %-10d %6.2f%%\n", $expired, $expired / $total * 100 ) );
6765 $this->output( sprintf( "absent: %-10d %6.2f%%\n", $absent, $absent / $total * 100 ) );
6866 $this->output( sprintf( "stub threshold: %-10d %6.2f%%\n", $stub, $stub / $total * 100 ) );
Index: trunk/phase3/maintenance/clear_stats.php
@@ -36,7 +36,6 @@
3737 $wgMemc->delete( "$db:stats:request_with_session" );
3838 $wgMemc->delete( "$db:stats:request_without_session" );
3939 $wgMemc->delete( "$db:stats:pcache_hit" );
40 - $wgMemc->delete( "$db:stats:pcache_miss_invalid" );
4140 $wgMemc->delete( "$db:stats:pcache_miss_expired" );
4241 $wgMemc->delete( "$db:stats:pcache_miss_absent" );
4342 $wgMemc->delete( "$db:stats:pcache_miss_stub" );
@@ -46,6 +45,8 @@
4746 $wgMemc->delete( "$db:stats:diff_cache_hit" );
4847 $wgMemc->delete( "$db:stats:diff_cache_miss" );
4948 $wgMemc->delete( "$db:stats:diff_uncacheable" );
 49+ $wgMemc->delete( "$db:stats:job-insert" );
 50+ $wgMemc->delete( "$db:stats:job-pop" );
5051 }
5152 }
5253 }
Index: trunk/phase3/includes/parser/ParserCache.php
@@ -158,6 +158,7 @@
159159
160160 $parserOutputKey = $this->getKey( $article, $popts, $useOutdated );
161161 if ( $parserOutputKey === false ) {
 162+ wfIncrStats( 'pcache_miss_absent' );
162163 wfProfileOut( __METHOD__ );
163164 return false;
164165 }
Index: trunk/phase3/includes/OutputPage.php
@@ -1467,8 +1467,6 @@
14681468
14691469 wfProfileIn( __METHOD__ );
14701470
1471 - wfIncrStats( 'pcache_not_possible' );
1472 -
14731471 $popts = $this->parserOptions();
14741472 $oldTidy = $popts->setTidy( $tidy );
14751473 $popts->setInterfaceMessage( (bool) $interface );

Sign-offs

UserFlagDate
Nikerabbitinspected06:51, 24 January 2012

Status & tagging log