Profiling using DProf

Discussion in 'Perl Misc' started by howa, Oct 31, 2008.

  1. howa

    howa Guest

    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.
     
    howa, Oct 31, 2008
    #1
    1. Advertising

  2. howa

    Guest

    howa <> wrote:
    > 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.
     
    , Oct 31, 2008
    #2
    1. Advertising

  3. howa

    brian d foy Guest

    In article
    <>,
    howa <> wrote:

    > 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. :)
     
    brian d foy, Oct 31, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Walter Roberson

    DProf %time ?

    Walter Roberson, Feb 3, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    112
    Ilya Zakharevich
    Feb 3, 2004
  2. flazan

    Dprof in a multiprocess script

    flazan, May 4, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    158
    flazan
    May 4, 2004
  3. crez

    System::DProf and system()

    crez, Oct 27, 2006, in forum: Perl Misc
    Replies:
    1
    Views:
    86
  4. ++imanshu

    #calls to main::BEGIN = 6 with -d:DProf

    ++imanshu, Jan 1, 2010, in forum: Perl Misc
    Replies:
    0
    Views:
    109
    ++imanshu
    Jan 1, 2010
  5. zikester

    dprof: alternate path

    zikester, Feb 22, 2010, in forum: Perl Misc
    Replies:
    0
    Views:
    107
    zikester
    Feb 22, 2010
Loading...

Share This Page