Jeff Weisberg > Devel-DProfLB-0.01 > Devel::DProfLB

Download:
Devel-DProfLB-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Devel::DProfLB - tell me why my perl program runs so slowly

SYNOPSIS ^

    perl -d:DProfLB program.pl
    dprofpp

DESCRIPTION ^

The Devel::DProfLB package is a Perl code profiler.

It is intended to produce output similar to, and compatible with, Devel::DProf, but be 'Less Bad'.

This will collect information on the execution time of a Perl script and of the subs in that script. This information can be used to determine which subroutines are using the most time and which subroutines are being called most often. This information can also be used to create an execution graph of the script, showing subroutine relationships.

To profile a Perl script run the perl interpreter with the -d debugging switch. The profiler uses the debugging hooks. So to profile script test.pl the following command should be used:

    perl5 -d:DProfLB test.pl

When the script terminates the profiler will dump the profile information to a file called tmon.out. A tool like dprofpp can be used to interpret the information which is in that profile. The following command will print the top 15 subroutines which used the most time:

    dprofpp

To print an execution graph of the subroutines in the script use the following command:

    dprofpp -T

Consult the dprofpp manpage for other options.

ENVIRONMENT ^

PERL_DPROF_OUT_FILE_NAME

Filename to save profile data to, default is tmon.out

BUGS ^

Valid profiling data is not saved until the application terminates and runs this modules END{} block. Applications which cause END{} blocks not to run (such as call _exit or exec) will leave a corrupt and/or incomplete temporary data file.

On most systems, the timing data recorded by this profiler has a granularity of 0.01 second. This may or may not be precise enough for your application.

If the program being profiled contains subroutines which do not return in a normal manner (such as by throwing an exception), the timing data is estimated and may be attributed incorrectly.

Et cetera.

SECURITY ISSUES ^

The standard dprofpp program blindly evals portions of the tmon.out datafile.

SEE ALSO ^

    Devel::Profile
    Devel::DProf
    dprofpp
    Yellowstone National Park

AUTHOR ^

    Jeff Weisberg - http://www.tcp4me.com/
syntax highlighting: