Index: trunk/wikistats/squids/SquidReportArchive.pl |
— | — | @@ -1856,13 +1856,16 @@ |
1857 | 1857 | $perc_html_only = 100*$clientgroups_html_only {$key}/$total_clients_html_only ; |
1858 | 1858 | if ($key =~ /^M/) |
1859 | 1859 | { $perc_threshold = 0.005 ; } |
| 1860 | + elsif ($key =~ /^W/) |
| 1861 | + { $perc_threshold = 0.001 ; } |
1860 | 1862 | else |
1861 | 1863 | { $perc_threshold = 0.02 ; } |
1862 | 1864 | |
1863 | 1865 | if ($perc > $perc_threshold) |
1864 | 1866 | { |
1865 | | - $clientgroups_perc {$key} = sprintf ("%.2f",$perc) . "%" ; |
1866 | | - $clientgroups_perc_html_only {$key} = sprintf ("%.2f",$perc_html_only) . "%" ; |
| 1867 | + $precision = ($key =~ /^W/) ? "%.3f" : "%.2f" ; |
| 1868 | + $clientgroups_perc {$key} = sprintf ($precision,$perc) . "%" ; |
| 1869 | + $clientgroups_perc_html_only {$key} = sprintf ($precision,$perc_html_only) . "%" ; |
1867 | 1870 | } |
1868 | 1871 | else |
1869 | 1872 | { |
— | — | @@ -2150,11 +2153,10 @@ |
2151 | 2154 | } |
2152 | 2155 | $perc_html_only = ".." ; |
2153 | 2156 | $count_html_only = $clientgroups_other_html_only {'-'} ; |
2154 | | - if ($total_clientgroups_html_only {'-'} + $total_clientgroups_html_only {'M'} + |
2155 | | -$total_clientgroups_html_only {'W'} > 0) |
| 2157 | + if ($total_clientgroups_html_only {'-'} + $total_clientgroups_html_only {'M'} + $total_clientgroups_html_only {'W'} > 0) |
2156 | 2158 | { |
2157 | 2159 | $perc_html_only = sprintf ("%.2f", 100 * $clientgroups_other_html_only {'-'} / ($total_clientgroups_html_only {'-'} + $total_clientgroups_html_only {'M'} + |
2158 | | -$total_clientgroups_html_only {'W'})) ; |
| 2160 | + $total_clientgroups_html_only {'W'})) ; |
2159 | 2161 | $perc_total_html_only_nonmobile += $perc_html_only ; |
2160 | 2162 | } |
2161 | 2163 | |
— | — | @@ -2213,7 +2215,7 @@ |
2214 | 2216 | $html .= "<tr><th class=l>Total</th><th class=r>$total</th><th class=r>$perc_total_mobile\%</th><th class=r>$total_html_only</th><th class=r>$perc_total_html_only_mobile\%</th></tr>\n" ; |
2215 | 2217 | |
2216 | 2218 | # CLIENTS SORTED BY FREQUENCY, BROWSERS, WIKIMOBILE |
2217 | | - $html .= "<tr><th class=l> <br>Wiki applications, mobile</th><th colspan=2 class=c> <br>All requests</th><th colspan=2 class=c> <br>Html pages</th></tr>\n" ; |
| 2219 | + $html .= "<tr><th class=l> <br>Mobile applications</th><th colspan=2 class=c> <br>All requests</th><th colspan=2 class=c> <br>Html pages</th></tr>\n" ; |
2218 | 2220 | $perc_total_wiki = 0 ; |
2219 | 2221 | $perc_total_html_only_wiki = 0 ; |
2220 | 2222 | |
— | — | @@ -2290,7 +2292,7 @@ |
2291 | 2293 | ($rectype, $client) = split (',', $key,2) ; |
2292 | 2294 | next if $rectype ne 'M' ; # group |
2293 | 2295 | $perc = $clients_perc {$key} ; |
2294 | | - next if $perc lt "0.02%" ; |
| 2296 | + next if $perc lt "0.005%" ; |
2295 | 2297 | $count = &FormatCount ($count) ; |
2296 | 2298 | |
2297 | 2299 | $perc_html_only = $clients_perc_html_only {$key} ; |
— | — | @@ -2309,14 +2311,14 @@ |
2310 | 2312 | $html .= "<tr><th class=l>Total</th><th class=r>$total</th><th class=r>$perc\%</th><th class=r>$total_html_only</th><th class=r>$perc_html_only\%</th></tr>\n" ; |
2311 | 2313 | |
2312 | 2314 | # CLIENTS SORTED BY FREQUENCY, BROWSER VERSIONS, WIKIMOBILE |
2313 | | - $html .= "<tr><th class=l> <br>Wiki applications, mobile</th><th colspan=2 class=c> <br>All requests</th><th colspan=2 class=c> <br>Html pages</th></tr>\n" ; |
| 2315 | + $html .= "<tr><th class=l> <br>Mobile application versions</th><th colspan=2 class=c> <br>All requests</th><th colspan=2 class=c> <br>Html pages</th></tr>\n" ; |
2314 | 2316 | foreach $key (@clients_sorted_count) |
2315 | 2317 | { |
2316 | 2318 | $count = $clients {$key} ; |
2317 | 2319 | ($rectype, $client) = split (',', $key,2) ; |
2318 | 2320 | next if $rectype ne 'W' ; # group |
2319 | 2321 | $perc = $clients_perc {$key} ; |
2320 | | - next if $perc lt "0.005%" ; |
| 2322 | + next if $perc lt "0.001%" ; |
2321 | 2323 | $count = &FormatCount ($count) ; |
2322 | 2324 | |
2323 | 2325 | $perc_html_only = $clients_perc_html_only {$key} ; |
— | — | @@ -2408,7 +2410,7 @@ |
2409 | 2411 | $html .= "<tr><th class=l>Total</th><th class=r>$total</th><th class=r>$perc_total_mobile\%</th><th class=r>$total_html_only</th><th class=r>$perc_total_html_only_mobile\%</th></tr>\n" ; |
2410 | 2412 | |
2411 | 2413 | # CLIENTS IN ALPHABETHICAL ORDER, BROWSERS, WIKIMOBILE |
2412 | | - $html .= "<tr><th class=l> <br>Applications, mobile</th><th colspan=2 class=c> <br>All requests</th><th colspan=2 class=c> <br>Html pages</th></tr>\n" ; |
| 2414 | + $html .= "<tr><th class=l> <br>Mobile applications</th><th colspan=2 class=c> <br>All requests</th><th colspan=2 class=c> <br>Html pages</th></tr>\n" ; |
2413 | 2415 | foreach $key (@clientgroups_sorted_alpha) |
2414 | 2416 | { |
2415 | 2417 | $count = $clientgroups {$key} ; |
— | — | @@ -2446,7 +2448,7 @@ |
2447 | 2449 | ($rectype, $client) = split (',', $key,2) ; |
2448 | 2450 | next if $rectype ne '-' ; # group |
2449 | 2451 | $perc = $clients_perc {$key} ; |
2450 | | - next if $perc lt "0.02%" ; |
| 2452 | + next if $perc lt "0.005%" ; |
2451 | 2453 | $count = &FormatCount ($count) ; |
2452 | 2454 | |
2453 | 2455 | $count_html_only = $clients_html_only {$key} ; |