Sunday, August 28, 2011

Profiling Perl Code

I've started using NYTProf to profile and optimise my perl code. It produces a very useful report showing how much time is spent in each subroutine and statement.


perl -d:NYTProf
perl -d:NYTProf -I/path/to/Devel-NYTProf/4.06/lib/perl5
The output of the profiler is written to ./nytprof.out.

Use the following command to create HTML reports from the profiler's results:

/path/Devel-NYTProf/4.06/bin/nytprofhtml --file nytprof.out -out ./htmlReports --delete

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.