Apache::Profiler - profiles time seconds needed for every request
<Location /cgi-bin> PerlInitHandler Apache::Profiler </Location>
Apache::Profiler is a mod_perl init (and cleanup) handler to profile time taken to process one request. Profiled data is reported to the Apache Log file. It'd be useful to profile some heavy application taking a long time to proceed.
It uses Time::HiRes to take milliseconds, and outputs profiled data as Apache log notice level like:
notice
[Tue Oct 7 20:52:53 2003] [notice] [client 127.0.0.1] uri: /test.html takes 0.0648910999298096 seconds
PerlSetVar ProfileLongerThan 0.5
specifies lower limit of request time taken to profile. This example only logs requests which takes longer than 0.5 seconds. This value is set to 0 by default, which means it logs all requests.
customizable log format (exportable to some profiling tools)
profiles CPU time rather than gettimeofday
gettimeofday
patches are always welcome!
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Apache::Log, Time::HiRes
To install Apache::Profiler, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::Profiler
CPAN shell
perl -MCPAN -e shell install Apache::Profiler
For more information on module installation, please visit the detailed CPAN module installation guide.