For When You Can't Have The Real Thing
[ start | index | login ]
start > perl > Perl Profiler

Perl Profiler

Created by dave. Last edited by dave, 13 years and 256 days ago. Viewed 2,536 times. #2
[diff] [history] [edit] [rdf]
labels
attachments

Basic Profiling

>>SmallProf

This module is available on rpmforge as perl-Devel-SmallProf

$ perl5 -d:SmallProf test.pl

This creates a file smallprof.out which for each line of perl code lists the number of times the line was invoked, the total wall time spent in that line, and the total cpu time spent in that line.

To sort by total wall time for each line:

$ sort -k 2nr,2 smallprof.out | less

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt