summaryrefslogtreecommitdiff
path: root/maintenance/clear_stats.php
blob: 5c1dce97232a5cc71e2a2e40c6e5642d8e9ad0df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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);
}