From: Darold Gilles Date: Thu, 5 Jul 2012 11:35:13 +0000 (+0200) Subject: Add OTHERS type of queries lower than 2% to be include in the sum of types < 2% X-Git-Tag: v3.2~199 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=654743ec9c017240138d588fda095c6ab179c525;p=pgbadger Add OTHERS type of queries lower than 2% to be include in the sum of types < 2% --- diff --git a/pgbadger b/pgbadger index 09aa51e..fbb82a0 100755 --- a/pgbadger +++ b/pgbadger @@ -1769,7 +1769,11 @@ sub dump_as_html $data{"Sum types < $pie_percentage_limit%"} += $overall_stat{$t} || 0; } } - $data{'Others'} = $total - $totala; + if ( ((($total - $totala)*100)/$total) > $pie_percentage_limit) { + $data{'Others'} = $total - $totala; + } else { + $data{"Sum types < $pie_percentage_limit%"} += $total - $totala; + } &flotr2_piegraph(8, 'queriesbytype_graph','Type of queries', %data); } print $fh "\n";