Commit 6af883e1 authored by Byron Jones's avatar Byron Jones

Bug 732440: Add SQL execution timings to buglist.cgi's debug output

r=LpSolit, r=LpSolit
parent 76c90bb4
......@@ -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);
################################################################################
......
......@@ -107,7 +107,7 @@ td.bz_total {
margin-top: .25em;
}
.bz_query_explain {
.bz_query_debug {
text-align: left;
}
......
......@@ -68,10 +68,13 @@
</span>
[% IF debug %]
<p class="bz_query">[% query FILTER html %]</p>
<div class="bz_query_debug">
<p>[% query FILTER html %]</p>
<p>Execution time: [% query_time FILTER html %] seconds</p>
[% IF query_explain.defined %]
<pre class="bz_query_explain">[% query_explain FILTER html %]</pre>
<pre>[% query_explain FILTER html %]</pre>
[% END %]
</div>
[% END %]
[% IF user.settings.display_quips.value == 'on' %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment