From 9b3cf88940c3c2d6811e00d537a1e8d1c586c5c3 Mon Sep 17 00:00:00 2001 From: Darold Gilles Date: Thu, 28 Nov 2013 08:51:44 +0100 Subject: [PATCH] Add "Max number of times the same event was reported" report in Global stats Events tab. --- pgbadger | 10 ++++++++++ 1 file changed, 10 insertions(+) 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
-- 2.50.1