]> granicus.if.org Git - pgbadger/commitdiff
Fix Histogram of session times when there is no data.
authorDarold Gilles <gilles@darold.net>
Fri, 15 Jan 2016 21:49:39 +0000 (22:49 +0100)
committerDarold Gilles <gilles@darold.net>
Fri, 15 Jan 2016 21:49:39 +0000 (22:49 +0100)
pgbadger

index 2a2a55e22855e699086a994a94ae196939a454e1..41eba87bd67f47305b3c4187e14f112f4bf848e0 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -5329,12 +5329,13 @@ sub print_histogram_session_times
                        $most_range = "> $histogram_session_time[-1]ms";
                        $most_range_value = $overall_stat{histogram}{session_time}{"-1"};
                }
+
+               $drawn_graphs{histogram_session_times_graph} = &jqplot_duration_histograph($graphid++, 'graph_histogram_session_times', 'Sessions', \@histogram_session_time, %data);
        } else {
                $histogram_info = qq{<tr><td colspan="3">$NODATA</td></tr>};
+               $drawn_graphs{histogram_session_times_graph} = qq{<tr><td colspan="3">$NODATA</td></tr>};
        }
 
-       $drawn_graphs{histogram_session_times_graph} = &jqplot_duration_histograph($graphid++, 'graph_histogram_session_times', 'Sessions', \@histogram_session_time, %data);
-
        $most_range_value = &comma_numbers($most_range_value) if ($most_range_value);
 
        print $fh qq{