David Brown wrote:
> I've been profiling my MySQL driven Mod_Perl website by adding debug
> messages throughout the code which relays what time has elapsed since the
> script was invoked (using Time::HiRes)
> 
> Now the script is pretty whizzy, serving up complete pages in circa 0.010
> seconds.
> 
> I got to wondering how those 0.010 were being made up.  Interestingly, all
> of the database access is complete within 0.002  so I thought where do the
> other 0.008 come from ?

You cannot reliably measure CPU clocks with wallclock on the 
multi-processor machine, unless you are running on Dos :)

See the performance chapter in the mod_perl guide.

Also search the archives, about a year ago I've posted a subclass to DBI 
that measures the SQL execution profiling. I'm not sure if Tim has this 
functionality in the latest DBI. Though it also measures wallclock time 
if I remember correctly :(

You best bet is to use DProf as suggested Garth.

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/

Reply via email to