]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1225214 - Implement very simple request time logging
authorDylan Hardison <dylan@mozilla.com>
Wed, 27 Apr 2016 15:14:06 +0000 (11:14 -0400)
committerDylan Hardison <dylan@mozilla.com>
Wed, 27 Apr 2016 15:14:06 +0000 (11:14 -0400)
mod_perl.pl

index 15230f615a2da5670d7b46cceff10e0d8bff85d1..83784d3fe451efb6b3c603f6743f162875098ce4 100644 (file)
@@ -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