]> granicus.if.org Git - pgbadger/commitdiff
Fix bad average size of temporary file in Overall statistics report. Thanks to Jehan...
authorDarold Gilles <gilles@darold.net>
Fri, 12 Apr 2013 10:23:35 +0000 (12:23 +0200)
committerDarold Gilles <gilles@darold.net>
Fri, 12 Apr 2013 10:23:35 +0000 (12:23 +0200)
pgbadger

index cf8d6b68f1f0f984dc6ff266f3c7d8f6555775e9..0b795c046de1bea9edde587842e0fbb64ef7e985 100755 (executable)
--- 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{
 <li>Number temporary file: $tempfile_info{count}</li>
 <li>Max size of temporary file: $fmt_temp_maxsise</li>