home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeJava and XSLTSearch this book

8.53. Devel::DProf

Devel::DProf is a Perl code profiler. It collects information on the execution time of a Perl script and of the subroutines in that script. To profile a Perl script, run perl with the -d debugging switch:

perl -d:DProf test.pl

When the script terminates (or when the output buffer is filled) the profiler will dump the profile information to a file called tmon.out. A tool such as dprofpp can be used to interpret the information. The following command will print the top 15 subroutines that used the most time:

dprofpp

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

dprofpp -T


Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.