Abolished $wgDBname as a unique wiki identifier, it doesn't work with the new-fangled...
[lhc/web/wiklou.git] / maintenance / stats.php
1 <?php
2 require_once('commandLine.inc');
3
4 print "Requests\n";
5 $session = intval($wgMemc->get(wfMemcKey('stats','request_with_session')));
6 $noSession = intval($wgMemc->get(wfMemcKey('stats','request_without_session')));
7 $total = $session + $noSession;
8 printf( "with session: %-10d %6.2f%%\n", $session, $session/$total*100 );
9 printf( "without session: %-10d %6.2f%%\n", $noSession, $noSession/$total*100 );
10 printf( "total: %-10d %6.2f%%\n", $total, 100 );
11
12
13 print "\nParser cache\n";
14 $hits = intval($wgMemc->get(wfMemcKey('stats','pcache_hit')));
15 $invalid = intval($wgMemc->get(wfMemcKey('stats','pcache_miss_invalid')));
16 $expired = intval($wgMemc->get(wfMemcKey('stats','pcache_miss_expired')));
17 $absent = intval($wgMemc->get(wfMemcKey('stats','pcache_miss_absent')));
18 $stub = intval($wgMemc->get(wfMemcKey('stats','pcache_miss_stub')));
19 $total = $hits + $invalid + $expired + $absent + $stub;
20 printf( "hits: %-10d %6.2f%%\n", $hits, $hits/$total*100 );
21 printf( "invalid: %-10d %6.2f%%\n", $invalid, $invalid/$total*100 );
22 printf( "expired: %-10d %6.2f%%\n", $expired, $expired/$total*100 );
23 printf( "absent: %-10d %6.2f%%\n", $absent, $absent/$total*100 );
24 printf( "stub threshold: %-10d %6.2f%%\n", $stub, $stub/$total*100 );
25 printf( "total: %-10d %6.2f%%\n", $total, 100 );
26
27 $hits = intval($wgMemc->get(wfMemcKey('stats','image_cache_hit')));
28 $misses = intval($wgMemc->get(wfMemcKey('stats','image_cache_miss')));
29 $updates = intval($wgMemc->get(wfMemcKey('stats','image_cache_update')));
30 $total = $hits + $misses;
31 print("\nImage cache\n");
32 printf( "hits: %-10d %6.2f%%\n", $hits, $hits/$total*100 );
33 printf( "misses: %-10d %6.2f%%\n", $misses, $misses/$total*100 );
34 printf( "updates: %-10d\n", $updates );
35
36 $hits = intval($wgMemc->get(wfMemcKey('stats','diff_cache_hit')));
37 $misses = intval($wgMemc->get(wfMemcKey('stats','diff_cache_miss')));
38 $uncacheable = intval($wgMemc->get(wfMemcKey('stats','diff_uncacheable')));
39 $total = $hits + $misses + $uncacheable;
40 print("\nDiff cache\n");
41 printf( "hits: %-10d %6.2f%%\n", $hits, $hits/$total*100 );
42 printf( "misses: %-10d %6.2f%%\n", $misses, $misses/$total*100 );
43 printf( "uncacheable: %-10d %6.2f%%\n", $uncacheable, $uncacheable/$total*100 );
44
45 ?>