Re: Measuring response time Apache request

Torsten Förtsch <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Tuesday, May 24, 2011 17:30:33 marco wrote:
> I want to get the response time that Apache spends to serve a request 
> (from post-read-request phase to the response phase).

PerlPostReadRequestHandler "sub {                \
  use Time::HiRes();                             \
  use Apache2::RequestUtil();                    \
  $_[0]->pnotes->{starttime}=Time::HiRes::time;  \
  0;                                             \
}"

Then in the PerlResponseHandler you can do:

  $elapsed=Time::HiRes::time-$r->pnotes->{starttime};

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.