首页 > Perl > The Perl Profiler

The Perl Profiler

2008年6月7日 Galaxy 发表评论 阅读评论

Perl 带着一个调节器,Devel::DProf 模块。你可以键入下面的命令调节在 mycode.pl 里的 Perl 程序:

 

   perl -d:DProf mycode.pl

虽然我们管它叫调节器——它的作用就是调节器,但 DProf 采用的机制和我们在本章早些时候讨论的内容完全一样。DProf 只是一个记录 Perl 进入和离开每个子过程的时间的调试器。 

当你调节的脚本结束的时候,DProf 会向一个叫 tmon.out 的文件倾倒计时信息。和 Perl 一起发布的 dprofpp 程序知道如何分析 tmon.out 以及产生输出。你还可以把带 -p 开关的 dprofpp 用做整个处理过程的前端(见稍后的描述)。 

 

way1:

perl -d:DProf mycode.pl

dprofpp tmon.out

 

way2

dprofpp -p mycode.pl

 
Tags: , , , ,

Related posts

分类: Perl 标签: , , , , 175 views
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.

Locations of visitors to this page