aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-03-22 14:15:12 +0800
committerByron Jones <bjones@mozilla.com>2012-03-22 14:15:12 +0800
commit6af883e17f343b8db399befba0cbec21f4f0cee3 (patch)
tree74c353b867a32984cac429292cd17c74782bf73b /buglist.cgi
parentBug 731526: Adds an email event for product and/or component notifications (diff)
downloadbugzilla-6af883e17f343b8db399befba0cbec21f4f0cee3.tar.gz
bugzilla-6af883e17f343b8db399befba0cbec21f4f0cee3.tar.bz2
bugzilla-6af883e17f343b8db399befba0cbec21f4f0cee3.zip
Bug 732440: Add SQL execution timings to buglist.cgi's debug output
r=LpSolit, r=LpSolit
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi3
1 files changed, 3 insertions, 0 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 98b10a75d..3e7aadf2c 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -32,6 +32,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;
@@ -792,8 +793,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);
################################################################################