Permalink
Browse files

Fix bad average size of temporary file in Overall statistics report. …

…Thanks to Jehan Guillaume de Rorthais for the report.
  • Loading branch information...
darold committed Apr 12, 2013
1 parent cd60ca0 commit e57cef18af5cff75500d6a0c2f9099b8baf66361
Showing with 2 additions and 2 deletions.
  1. +2 −2 pgbadger
View
@@ -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>

0 comments on commit e57cef1

Please sign in to comment.