summaryrefslogtreecommitdiffstats
path: root/show_bug.cgi
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-06-19 10:53:50 +0200
committerByron Jones <bjones@mozilla.com>2013-06-19 10:53:50 +0200
commit1df1292cdc4837810703e6ec01a7354bdf82c7a1 (patch)
tree796eb5e69b036235daf5ba5bc4b4e9c1958c4002 /show_bug.cgi
parent8caf466c0cf82a06dc69a29a5e87900e86c2488a (diff)
downloadbugzilla-1df1292cdc4837810703e6ec01a7354bdf82c7a1.tar.gz
bugzilla-1df1292cdc4837810703e6ec01a7354bdf82c7a1.tar.xz
Bug 884177: updates to the timing collectors
Diffstat (limited to 'show_bug.cgi')
-rwxr-xr-xshow_bug.cgi6
1 files changed, 3 insertions, 3 deletions
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},