From: Alexandre Emsenhuber Date: Mon, 23 Jan 2012 16:27:13 +0000 (+0000) Subject: Cleanup to statistics: X-Git-Tag: 1.31.0-rc.0~25119 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=f5b75f1e987c0276d791e70edecc0783d3f56a49;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index e7364ea684..54f6f33a42 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1467,8 +1467,6 @@ class OutputPage extends ContextSource { wfProfileIn( __METHOD__ ); - wfIncrStats( 'pcache_not_possible' ); - $popts = $this->parserOptions(); $oldTidy = $popts->setTidy( $tidy ); $popts->setInterfaceMessage( (bool) $interface ); diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index f91f26a2ff..493d1dfbc6 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -158,6 +158,7 @@ class ParserCache { $parserOutputKey = $this->getKey( $article, $popts, $useOutdated ); if ( $parserOutputKey === false ) { + wfIncrStats( 'pcache_miss_absent' ); wfProfileOut( __METHOD__ ); return false; } diff --git a/maintenance/clear_stats.php b/maintenance/clear_stats.php index 8f91864ebd..61314e6732 100644 --- a/maintenance/clear_stats.php +++ b/maintenance/clear_stats.php @@ -36,7 +36,6 @@ class clear_stats extends Maintenance { $wgMemc->delete( "$db:stats:request_with_session" ); $wgMemc->delete( "$db:stats:request_without_session" ); $wgMemc->delete( "$db:stats:pcache_hit" ); - $wgMemc->delete( "$db:stats:pcache_miss_invalid" ); $wgMemc->delete( "$db:stats:pcache_miss_expired" ); $wgMemc->delete( "$db:stats:pcache_miss_absent" ); $wgMemc->delete( "$db:stats:pcache_miss_stub" ); @@ -46,6 +45,8 @@ class clear_stats extends Maintenance { $wgMemc->delete( "$db:stats:diff_cache_hit" ); $wgMemc->delete( "$db:stats:diff_cache_miss" ); $wgMemc->delete( "$db:stats:diff_uncacheable" ); + $wgMemc->delete( "$db:stats:job-insert" ); + $wgMemc->delete( "$db:stats:job-pop" ); } } } diff --git a/maintenance/stats.php b/maintenance/stats.php index 1fb46fa91f..46926dd07b 100644 --- a/maintenance/stats.php +++ b/maintenance/stats.php @@ -54,14 +54,12 @@ class CacheStats extends Maintenance { $this->output( "\nParser cache\n" ); $hits = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_hit' ) ) ); - $invalid = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_invalid' ) ) ); $expired = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_expired' ) ) ); $absent = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_absent' ) ) ); $stub = intval( $wgMemc->get( wfMemcKey( 'stats', 'pcache_miss_stub' ) ) ); - $total = $hits + $invalid + $expired + $absent + $stub; + $total = $hits + $expired + $absent + $stub; if ( $total ) { $this->output( sprintf( "hits: %-10d %6.2f%%\n", $hits, $hits / $total * 100 ) ); - $this->output( sprintf( "invalid: %-10d %6.2f%%\n", $invalid, $invalid / $total * 100 ) ); $this->output( sprintf( "expired: %-10d %6.2f%%\n", $expired, $expired / $total * 100 ) ); $this->output( sprintf( "absent: %-10d %6.2f%%\n", $absent, $absent / $total * 100 ) ); $this->output( sprintf( "stub threshold: %-10d %6.2f%%\n", $stub, $stub / $total * 100 ) );