From: Darold Gilles Date: Thu, 21 Feb 2013 22:55:16 +0000 (+0100) Subject: Fix missing report of slowest normalized queries. X-Git-Tag: v3.2~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b43ad9094ff5ec3934ad25a6f4aef96c72de962d;p=pgbadger Fix missing report of slowest normalized queries. --- diff --git a/pgbadger b/pgbadger index b50cfa9..62f9e58 100755 --- a/pgbadger +++ b/pgbadger @@ -1768,7 +1768,6 @@ Report not supported by text format print $fh $i + 1, ") " . &convert_time($top_slowest[$i]->[0]) . "$db - $top_slowest[$i]->[2]\n"; print $fh "--\n"; } - @top_slowest = (); print $fh "\n- Queries that took up the most time (N) -------------------------------\n\n"; print $fh "Rank Total duration Times executed Av. duration (s) Query\n"; @@ -1870,6 +1869,7 @@ Report not supported by text format $idx++; } } + @top_slowest = (); if (!$disable_error) { &show_error_as_text(); @@ -3554,7 +3554,6 @@ sub dump_as_html &highlight_code($top_slowest[$i]->[2]), "\n"; } print $fh "\n"; - @top_slowest = (); print $fh qq{

Queries that took up the most time (N) ^

@@ -3778,6 +3777,7 @@ sub dump_as_html } print $fh "\n"; } + @top_slowest = (); if (!$disable_error) { &show_error_as_html();