diff options
Diffstat (limited to 'maintenance/clear_stats.php')
-rw-r--r-- | maintenance/clear_stats.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/maintenance/clear_stats.php b/maintenance/clear_stats.php new file mode 100644 index 00000000..00cfd0ce --- /dev/null +++ b/maintenance/clear_stats.php @@ -0,0 +1,31 @@ +<?php +require_once('commandLine.inc'); + +foreach ( $wgLocalDatabases as $db ) { + noisyDelete("$db:stats:request_with_session"); + noisyDelete("$db:stats:request_without_session"); + noisyDelete("$db:stats:pcache_hit"); + noisyDelete("$db:stats:pcache_miss_invalid"); + noisyDelete("$db:stats:pcache_miss_expired"); + noisyDelete("$db:stats:pcache_miss_absent"); + noisyDelete("$db:stats:pcache_miss_stub"); + noisyDelete("$db:stats:image_cache_hit"); + noisyDelete("$db:stats:image_cache_miss"); + noisyDelete("$db:stats:image_cache_update"); + noisyDelete("$db:stats:diff_cache_hit"); + noisyDelete("$db:stats:diff_cache_miss"); + noisyDelete("$db:stats:diff_uncacheable"); +} + +function noisyDelete( $key ) { + global $wgMemc; + /* + print "$key "; + if ( $wgMemc->delete($key) ) { + print "deleted\n"; + } else { + print "FAILED\n"; + }*/ + $wgMemc->delete($key); +} +?> |