Profile Perl

I was trying to profile a Perl program which runs much longer than what I expected. I did a search on “profile perl”. It turns out it’s pretty easy to do. Here are steps,

1. Run perl program with -d:DProf. The profiling data will be saved to tmon.out.

perl -d:DProf test.perl

2. Run this command to print the time and number of calls for each function.

dprofpp -I tmon.out

References
A full article on this topic.
Perl FAQ on this topic.

3 thoughts on “Profile Perl

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s