From 399f0b45f6fb796941b92ed2899fcc17e3ab0ea9 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 22 Mar 2012 14:18:18 +0800 Subject: Bug 732440: add sql timings to buglist.cgi's debug output --- buglist.cgi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'buglist.cgi') diff --git a/buglist.cgi b/buglist.cgi index 7b513e607..d2f9a6904 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -51,6 +51,7 @@ use Bugzilla::Status; use Bugzilla::Token; use Date::Parse; +use Time::HiRes qw(gettimeofday tv_interval); my $cgi = Bugzilla->cgi; my $dbh = Bugzilla->dbh; @@ -830,8 +831,10 @@ $::SIG{TERM} = 'DEFAULT'; $::SIG{PIPE} = 'DEFAULT'; # Execute the query. +my $start_time = [gettimeofday()]; my $buglist_sth = $dbh->prepare($query); $buglist_sth->execute(); +$vars->{query_time} = tv_interval($start_time); ################################################################################ -- cgit v1.2.3-24-g4f1b