aboutsummaryrefslogtreecommitdiffstats
path: root/lib/LXRng/ModPerl.pm
diff options
context:
space:
mode:
authorArne Georg Gleditsch <argggh@lxr.linpro.no>2008-02-08 10:35:27 +0100
committerArne Georg Gleditsch <argggh@lxr.linpro.no>2008-02-08 10:35:27 +0100
commit7d54768cf46a7055032525695fa3da6bfa5c7631 (patch)
treedac5cf354906bae5de972a93f13f98974fd6ca73 /lib/LXRng/ModPerl.pm
parent8b06651682da715d47e811441f73013033731c4b (diff)
Add profiling and cache id notes to mod_perl request for logging purposes.
Diffstat (limited to 'lib/LXRng/ModPerl.pm')
-rw-r--r--lib/LXRng/ModPerl.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/LXRng/ModPerl.pm b/lib/LXRng/ModPerl.pm
index e5e6f63..1249cb0 100644
--- a/lib/LXRng/ModPerl.pm
+++ b/lib/LXRng/ModPerl.pm
@@ -31,8 +31,15 @@ use Data::Dumper;
sub handler {
my ($req) = @_;
- my $query = CGI->new();
- LXRng::Web->handle($query);
+ my @tstart = times();
+ my $query = CGI->new();
+ my $qident = LXRng::Web->handle($query);
+ my @tstop = times();
+
+ $req->notes->add("lxr_prof" =>
+ sprintf("u:%d, s:%d, cu:%d, cs:%d",
+ map { 1000*($tstop[$_]-$tstart[$_]) } (0 .. 3)));
+ $req->notes->add("lxr_ident" => $qident);
return Apache2::Const::OK;
}