Profiling using DProf

H

howa

I am using the command :

perl -d:DProf index.cgi


Using "dprofpp", it give me...


Total Elapsed Time = 0.270455 Seconds
User+System Time = 0.120455 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
41.5 0.050 0.089 7 0.0071 0.0127 MyModule::BEGI
N
16.6 0.020 0.020 48 0.0004 0.0004 Exporter::import
8.30 0.010 0.010 4 0.0025 0.0025 utf8::SWASHNEW
8.30 0.010 0.010 4 0.0025 0.0025 Data::Dumper::BEGIN
8.30 0.010 0.010 2 0.0050 0.0050 lib::BEGIN
8.30 0.010 0.010 5 0.0020 0.0020 IO::Seekable::BEGIN
8.30 0.010 0.010 159 0.0001 0.0001 XML::Twig::Elt::set_gi
7.47 0.009 0.008 89 0.0001 0.0001 XML::Twig::_twig_end
0.00 0.000 0.000 1 0.0000 0.0000 File::Glob::GLOB_BRACE
0.00 0.000 0.000 1 0.0000 0.0000 File::Glob::GLOB_NOMAGIC
0.00 0.000 0.000 1 0.0000 0.0000 File::Glob::GLOB_QUOTE
0.00 0.000 0.000 1 0.0000 0.0000 File::Glob::GLOB_TILDE
0.00 0.000 0.000 1 0.0000 0.0000
File::Glob::GLOB_ALPHASORT
0.00 0.000 0.000 1 0.0000 0.0000
Exporter::Heavy::heavy_export_to_l
evel
0.00 0.000 0.000 1 0.0000 0.0000 LWP::Simple::_get



However, what is "MyModule::BEGIN"? Can I see more detail how to time
was spent?

Thanks.
 
X

xhoster

howa said:
I am using the command :

perl -d:DProf index.cgi

Using "dprofpp", it give me...

Total Elapsed Time = 0.270455 Seconds
User+System Time = 0.120455 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
41.5 0.050 0.089 7 0.0071 0.0127 MyModule::BEGIN

However, what is "MyModule::BEGIN"?

The union of all BEGIN blocks encountered in package MyModule.
Can I see more detail how to time
was spent?

You can look at the options for dprofpp, like -S. And in probably -r, as
more than half the time in your program seems to be off the CPU.

There is also SmallProf, and some newer profiling modules I haven't looked
into yet myself.

But don't underestimate the usefulness of just looking at the code and
using your judgment about what parts are likely to be slow.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
 
B

brian d foy

howa said:
I am using the command :

perl -d:DProf index.cgi


DProf is rather long in the tooth. The new hotness is Devel::NYTProf.
It has much nicer (and layered) reports that record at a much finer
granularity. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Speed ain't bad 14

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top