summaryrefslogtreecommitdiffstats
path: root/mod_perl.pl
diff options
context:
space:
mode:
authorDylan Hardison <dylan@mozilla.com>2016-04-27 17:14:06 +0200
committerDylan Hardison <dylan@mozilla.com>2016-04-27 17:14:06 +0200
commitf885e904ca8ed2982d0f1182100b4e0c86389df3 (patch)
tree936984e6210b1da461e7a90b8741bd9c759a9536 /mod_perl.pl
parentdacce0f73894bae5b7c4df2594ca4dd48dfeec0d (diff)
downloadbugzilla-f885e904ca8ed2982d0f1182100b4e0c86389df3.tar.gz
bugzilla-f885e904ca8ed2982d0f1182100b4e0c86389df3.tar.xz
Bug 1225214 - Implement very simple request time logging
Diffstat (limited to 'mod_perl.pl')
-rw-r--r--mod_perl.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/mod_perl.pl b/mod_perl.pl
index 15230f615..83784d3fe 100644
--- a/mod_perl.pl
+++ b/mod_perl.pl
@@ -119,6 +119,7 @@ use strict;
use base qw(ModPerl::Registry);
use Bugzilla;
use Bugzilla::Constants qw(USAGE_MODE_REST);
+use Time::HiRes;
sub handler : method {
my $class = shift;
@@ -136,7 +137,9 @@ sub handler : method {
use warnings;
Bugzilla::init_page();
+ my $start = Time::HiRes::time();
my $result = $class->SUPER::handler(@_);
+ warn "[request_time] ", Bugzilla->cgi->request_uri, " took ", Time::HiRes::time() - $start, " seconds to execute";
# When returning data from the REST api we must only return 200 or 304,
# which tells Apache not to append its error html documents to the