* Use double quoted consistently on attributes in linker output; preparing for new...
[mediawiki.git] / maintenance / stats.php
blob8ebc38230512255df5eea85413961662997e76e2
1 <?php
2 require_once('commandLine.inc');
4 print "Requests\n";
5 $session = intval($wgMemc->get("$wgDBname:stats:request_with_session"));
6 $noSession = intval($wgMemc->get("$wgDBname: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 );
13 print "\nParser cache\n";
14 $hits = intval($wgMemc->get("$wgDBname:stats:pcache_hit"));
15 $invalid = intval($wgMemc->get("$wgDBname:stats:pcache_miss_invalid"));
16 $expired = intval($wgMemc->get("$wgDBname:stats:pcache_miss_expired"));
17 $absent = intval($wgMemc->get("$wgDBname:stats:pcache_miss_absent"));
18 $stub = intval($wgMemc->get("$wgDBname: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 );
27 $hits = intval($wgMemc->get("$wgDBname:stats:image_cache_hit"));
28 $misses = intval($wgMemc->get("$wgDBname:stats:image_cache_miss"));
29 $updates = intval($wgMemc->get("$wgDBname: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 );
36 $hits = intval($wgMemc->get("$wgDBname:stats:diff_cache_hit"));
37 $misses = intval($wgMemc->get("$wgDBname:stats:diff_cache_miss"));
38 $uncacheable = intval($wgMemc->get("$wgDBname: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 );