[CMI.PM] Perl Debugger and finding CPU Usage
Arun Bhalla
bhalla at uiuc.edu
Tue Nov 11 11:13:58 CST 2003
I saw Apache::DProf and Apache::SmallProf listed on CPAN, and I can only guess
that they are the mod_perl versions of the same. Worth checking out.
Arun
ryddler writes:
> With all this talk about the profiler, does anyone know how to invoke it
> in a CGI environment, say with mod_perl, and more to the point for me,
> from within Apache::ASP?
>
> On Fri, 2003-11-07 at 15:54, Brandon Bowersox wrote:
> > Mitch,
> >
> > The Perl Profiler is the tool for you and it is distributed with Perl. See
> > http://search.cpan.org/~nwclark/perl-5.8.2/ext/Devel/DProf/DProf.pm
> > http://search.cpan.org/~nwclark/perl-5.8.2/utils/dprofpp.PL
> >
> > Basically, to create a profile file, run your code like:
> > perl -d:DProf script.pl (on the command line)
> > OR
> > #!/usr/bin/perl -d:DProf (at the top of your script)
> >
> > Then the dprofpp command will give you a report. My favorite reports are:
> > dprofpp tmon.out (the basic report including CPU time)
> > dprofpp -S tmon.out (merged subroutine tree)
> >
> > Brandon
> >
> > --
> > Brandon Bowersox
> > brandon at ojctech.com
> > OJC Technologies, Inc.
> > www.ojctech.com, 217-278-3933
> >
> >
> > At 03:33 PM 11/7/2003 -0600, Mitch Kutzko wrote:
> > >Hi, folks -- I have a question about the Perl debugger, which I've
> > >essentially never actually used.
> > >
> > >How do I go about using it to find out where CPU usage is occurring? I've
> > >got a very large, very complex script that's soaking up *way* too much CPU
> > >(but not leaking memory -- already checked for that) for what it's doing,
> > >but I can't figure out where/how it's happening.
> > >
> > >Any ideas on how to get the debugger to show me where all the CPU is going
> ?
> > >
> > >Mitch
> > >--
> > >Mitch Kutzko | mitch at dast.nlanr.net | mitch at ncsa.uiuc.edu | 217-333-1199
> > >http://hobbes.ncsa.uiuc.edu/
> > >_______________________________________________
> > >Champaign-Urbana mailing list
> > >Champaign-Urbana at mail.pm.org
> > >http://mail.pm.org/mailman/listinfo/champaign-urbana
> >
> > _______________________________________________
> > Champaign-Urbana mailing list
> > Champaign-Urbana at mail.pm.org
> > http://mail.pm.org/mailman/listinfo/champaign-urbana
> --
> Keep the turbo spooled!
> ryddler
> http://www.starquestclub.com
>
> _______________________________________________
> Champaign-Urbana mailing list
> Champaign-Urbana at mail.pm.org
> http://mail.pm.org/mailman/listinfo/champaign-urbana
>
--
Arun Bhalla
More information about the Champaign-Urbana
mailing list