Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Profiling using DProf

Reply
Thread Tools

Profiling using DProf

 
 
howa
Guest
Posts: n/a
 
      10-31-2008
I am using the command :

perl -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:umper::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.
 
Reply With Quote
 
 
 
 
xhoster@gmail.com
Guest
Posts: n/a
 
      10-31-2008
howa <> wrote:
> I am using the command :
>
> perl -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.
 
Reply With Quote
 
 
 
 
brian d foy
Guest
Posts: n/a
 
      10-31-2008
In article
<5b468b5e-d500-4204-a6cc->,
howa <> wrote:

> I am using the command :
>
> perl -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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dprof: alternate path zikester Perl Misc 0 02-22-2010 09:26 PM
#calls to main::BEGIN = 6 with -d:DProf ++imanshu Perl Misc 0 01-01-2010 08:41 AM
System::DProf and system() crez Perl Misc 1 10-27-2006 05:59 PM
Dprof in a multiprocess script flazan Perl Misc 0 05-04-2004 10:28 AM
DProf %time ? Walter Roberson Perl Misc 1 02-03-2004 08:55 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57