From: Darold Gilles Date: Thu, 28 Nov 2013 07:51:44 +0000 (+0100) Subject: Add "Max number of times the same event was reported" report in Global stats Events... X-Git-Tag: v5.0~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b3cf88940c3c2d6811e00d537a1e8d1c586c5c3;p=pgbadger Add "Max number of times the same event was reported" report in Global stats Events tab. --- diff --git a/pgbadger b/pgbadger index 6604646..6cd0b3a 100755 --- a/pgbadger +++ b/pgbadger @@ -2682,6 +2682,15 @@ sub print_overall_statistics $session_peak_date = $_; last; } + my $main_error = 0; + my $total = 0; + foreach my $k (sort {$error_info{$b}{count} <=> $error_info{$a}{count}} keys %error_info) { + next if (!$error_info{$k}{count}); + $main_error = &comma_numbers($error_info{$k}{count}) if (!$main_error); + $total += $error_info{$k}{count}; + } + $total = &comma_numbers($total); + my $db_count = scalar keys %database_info; print $fh qq{

Overview

@@ -2712,6 +2721,7 @@ sub print_overall_statistics