From 654743ec9c017240138d588fda095c6ab179c525 Mon Sep 17 00:00:00 2001 From: Darold Gilles Date: Thu, 5 Jul 2012 13:35:13 +0200 Subject: [PATCH] Add OTHERS type of queries lower than 2% to be include in the sum of types < 2% --- pgbadger | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"; -- 2.40.0