diff options
-rw-r--r-- | .htaccess | 1 | ||||
-rw-r--r-- | Bugzilla.pm | 2 | ||||
-rwxr-xr-x | process_bug.cgi | 4 | ||||
-rwxr-xr-x | show_bug.cgi | 6 | ||||
-rw-r--r-- | template/en/default/list/list.html.tmpl | 2 |
5 files changed, 8 insertions, 7 deletions
@@ -37,6 +37,7 @@ Redirect permanent /etiquette.html https://bugzilla.mozilla.org/page.cgi?id=etiq Redirect permanent /duplicates.html https://bugzilla.mozilla.org/duplicates.cgi RewriteEngine On +RewriteBase /884177/ RewriteRule ^review(.*) page.cgi?id=splinter.html$1 [QSA] RewriteRule ^favicon\.ico$ extensions/BMO/web/images/favicon.ico RewriteRule ^form[\.:](itrequest|mozlist|poweredby|presentation|trademark|recoverykey)$ enter_bug.cgi?product=mozilla.org&format=$1 diff --git a/Bugzilla.pm b/Bugzilla.pm index 8252bed09..29811cf76 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -85,7 +85,7 @@ use constant SHUTDOWNHTML_RETRY_AFTER => 3600; # Global Code ##################################################################### -# $::SIG{__DIE__} = i_am_cgi() ? \&CGI::Carp::confess : \&Carp::confess; +$::SIG{__DIE__} = i_am_cgi() ? \&CGI::Carp::confess : \&Carp::confess; # Note that this is a raw subroutine, not a method, so $class isn't available. sub init_page { diff --git a/process_bug.cgi b/process_bug.cgi index cc6dda130..6731a8395 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -467,11 +467,11 @@ unless (Bugzilla->usage_mode == USAGE_MODE_EMAIL) { sub _log_timings { return unless scalar(@bug_objects) == 1; - $timings->{end_time} = clock_gettime(CLOCK_MONOTONIC); + return unless scalar(keys %$timings) == 8; my $entry = sprintf "process_bug bug-%s user-%s %.6f %.6f %.6f %.6f %.6f %.6f %.6f %s\n", $bug_objects[0]->id, $user->id, - $timings->{end_time} - $timings->{start_time}, + $timings->{template_time} - $timings->{start_time}, $timings->{load_bug} - $timings->{start_time}, $timings->{mid_air} - $timings->{load_bug}, $timings->{update_time} - $timings->{mid_air}, diff --git a/show_bug.cgi b/show_bug.cgi index 66d8bdce7..bdd9dd5f0 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -69,7 +69,6 @@ Bugzilla->switch_to_shadow_db unless $user->id; if ($single) { my $id = $cgi->param('id'); push @bugs, Bugzilla::Bug->check({ id => $id, cache => 1 }); - $timings->{load_bug_time} = clock_gettime(CLOCK_MONOTONIC); if (defined $cgi->param('mark')) { foreach my $range (split ',', $cgi->param('mark')) { if ($range =~ /^(\d+)-(\d+)$/) { @@ -97,6 +96,7 @@ if ($single) { } } } +$timings->{load_bug_time} = clock_gettime(CLOCK_MONOTONIC); Bugzilla::Bug->preload(\@bugs); $timings->{preload_time} = clock_gettime(CLOCK_MONOTONIC); @@ -143,11 +143,11 @@ _log_timings(); sub _log_timings { return unless scalar(@bugs) == 1; - $timings->{end_time} = clock_gettime(CLOCK_MONOTONIC); + return unless scalar(keys %$timings) == 5; my $entry = sprintf "show_bug bug-%s user-%s %.6f %.6f %.6f %.6f %.6f", $bugs[0]->id, $user->id, - $timings->{end_time} - $timings->{start_time}, + $timings->{template_time} - $timings->{start_time}, $timings->{login_time} - $timings->{start_time}, $timings->{load_bug_time} - $timings->{login_time}, $timings->{preload_time} - $timings->{load_bug_time}, diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl index cda06ac21..69dc28a7a 100644 --- a/template/en/default/list/list.html.tmpl +++ b/template/en/default/list/list.html.tmpl @@ -62,7 +62,7 @@ <div class="bz_query_debug"> <p>Total execution time: [% query_time FILTER html %] seconds</p> [% FOREACH query = queries %] - <p>[% query.sql FILTER html %]</p> + <pre>[% query.sql FILTER html %]</pre> <p>Execution time: [% query.time FILTER html %] seconds</p> [% IF query.explain %] <pre>[% query.explain FILTER html %]</pre> |