我需要测试Perl Application(文件操作,数据库操作......等).我正在为Perl代码寻找一些配置文件工具
是否有像Perl Code Profling的工具,如Linux中的gprof
小智 16
有些人可能会建议使用Devel :: DProf作为最标准的方法,但如果你仔细观察它实际上是非常糟糕的解决方案.
现在最好的Perl分析器是Devel :: NYTProf.
如果你想谷歌,你会看到一些展示它能够做什么的演示.而且它很多.
Krish:在发布问题之前,至少应该检查一下基本文档.寻找某种东西的一种方法是perldoc -q <something>.该-q标志通过常见问题解答启动关键字搜索.
所以,例如,perldoc -q profile:
Found in /usr/local/lib/perl5/5.10.0/pod/perlfaq3.pod
How do I profile my Perl programs?
You should get the Devel::DProf module from the standard distribution
(or separately on CPAN) and also use Benchmark.pm from the standard
distribution. The Benchmark module lets you time specific portions of
your code, while Devel::DProf gives detailed breakdowns of where your
code spends its time.
Run Code Online (Sandbox Code Playgroud)
它从那里开始.
| 归档时间: |
|
| 查看次数: |
2469 次 |
| 最近记录: |