]> granicus.if.org Git - pgbadger/commitdiff
Fix missing report of slowest normalized queries.
authorDarold Gilles <gilles@darold.net>
Thu, 21 Feb 2013 22:55:16 +0000 (23:55 +0100)
committerDarold Gilles <gilles@darold.net>
Thu, 21 Feb 2013 22:55:16 +0000 (23:55 +0100)
pgbadger

index b50cfa90294ff7f8a5b6833d4695f71bdb496ad8..62f9e589ede1cd5651fe08ea6233f6146e4d8a85 100755 (executable)
--- 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]), "</div></td></tr>\n";
                }
                print $fh "</table>\n";
-               @top_slowest = ();
 
                print $fh qq{
 <h2 id="NormalizedQueriesMostTimeReport">Queries that took up the most time (N) <a href="#top" title="Back to top">^</a></h2>
@@ -3778,6 +3777,7 @@ sub dump_as_html
                }
                print $fh "</table>\n";
        }
+       @top_slowest = ();
 
        if (!$disable_error) {
                &show_error_as_html();