I've been using Apache::DProf to figure out where my code in mod_perl is running slow. There are some socket calls out to other services, so I used '-r' to measure real time as opposed to cpu time. My::Apache::Handler::handler calls several subroutines, but I haven't been able to get dprofpp to tell me how much time it is spending in those subs.
I've gone over the docs, and the writeup at perl.com, but have come up empty. I've started to use dtrace, but I'd really like to be able to figure out what I need to know with dprofpp. I've tried SmallProf but it didn't play nice with my application.
Any suggestions?
Total Elapsed Time = 292.7386 Seconds Real Time = 292.7386 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 0.32 0.928 -0.226 3 0.3093 0.0753 My::Handler::handler 0.01 0.039 0.038 2 0.0194 0.0190 DBD::Pg::dr::connect 0.01 0.033 0.074 1 0.0325 0.0743 Apache::DBI::childinit 0.01 0.020 0.020 1 0.0199 0.0199 utf8::AUTOLOAD 0.00 0.005 0.005 38 0.0001 0.0001 DBI::common::DESTROY 0.00 0.000 0.000 1 0.0000 0.0000 Socket::__ANON__ 0.00 0.000 0.000 1 0.0000 0.0000 HTTP::Message::__ANON__ 0.00 - -0.000 1 - - Compress::Raw::Zlib::infl +ateStream 0.0001 ::DESTROY 0.00 - -0.000 1 - - My::Model::Foo::BEGIN 0.00 - -0.000 1 - - warnings::import 0.00 - -0.000 2 - - utf8::SWASHNEW 0.00 - -0.000 1 - - APR::Pool::DESTROY 0.00 - -0.000 1 - - vars::import 0.00 - -0.000 1 - - warnings::unimport 0.00 - -0.000 2 - - Template::Context::stash
p.s. - I'm using Apache::DProf, not Devel::Profiler::Apache because I'm using mod_perl2.
SOLVED - I was doing 'use Apache::DProf' in my startup.pl instead of PerlModule Apache::DProf in my httpd.conf. I added a PerlSection also, here is the total code now:
LoadModule perl_module modules/mod_perl.so <Perl> require Apache::DB; Apache::DB->init; </Perl> PerlModule Apache::DProf
I had this stuff loading conditionally in startup.pl if My::Config->profile was set to true. Sucks to be me, but I'm glad it is working now. Thanks for your help again Monks.
In reply to Measuring mod_perl with Apache::DProf by redhotpenguin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |