From: Darold Gilles Date: Fri, 12 Apr 2013 10:23:35 +0000 (+0200) Subject: Fix bad average size of temporary file in Overall statistics report. Thanks to Jehan... X-Git-Tag: v3.3~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e57cef18af5cff75500d6a0c2f9099b8baf66361;p=pgbadger Fix bad average size of temporary file in Overall statistics report. Thanks to Jehan Guillaume de Rorthais for the report. --- diff --git a/pgbadger b/pgbadger index cf8d6b6..0b795c0 100755 --- a/pgbadger +++ b/pgbadger @@ -1677,7 +1677,7 @@ Number of unique normalized events: $fmt_unique_error } if ($tempfile_info{count}) { my $fmt_temp_maxsise = &comma_numbers($tempfile_info{maxsize}) || 0; - my $fmt_temp_avsize = &comma_numbers(sprintf("%.2f", ($tempfile_info{maxsize} / $tempfile_info{count}))); + my $fmt_temp_avsize = &comma_numbers(sprintf("%.2f", ($tempfile_info{size} / $tempfile_info{count}))); print $fh qq{Number temporary file: $tempfile_info{count} Max size of temporary file: $fmt_temp_maxsise Average size of temporary file: $fmt_temp_avsize @@ -2517,7 +2517,7 @@ sub dump_as_html }; if ($tempfile_info{count}) { my $fmt_temp_maxsise = &comma_numbers($tempfile_info{maxsize}) || 0; - my $fmt_temp_avsize = &comma_numbers(sprintf("%.2f", $tempfile_info{maxsize} / $tempfile_info{count})); + my $fmt_temp_avsize = &comma_numbers(sprintf("%.2f", $tempfile_info{size} / $tempfile_info{count})); print $fh qq{
  • Number temporary file: $tempfile_info{count}
  • Max size of temporary file: $fmt_temp_maxsise