- COMMAND-LINE OPTIONS
- SAMPLE OUTPUT
- SEE ALSO
- COPYRIGHT AND LICENSE
nytprofhtml - Generate reports from Devel::NYTProf data
$ perl -d:NYTProf some_perl_app.pl $ nytprofhtml --open
$ nytprofhtml [-h] [-d] [-o <output directory>] [-f <input file>] [--open]
Devel::NYTProf is a powerful feature-rich perl source code profiler. See Devel::NYTProf for details.
nytprofhtml generates html a set of html reports from the data collected by Devel::NYTProf.
The reports include dynamic runtime analysis wherein each line and each file is analyzed based on the preformance of the other lines and files. As a result, you can quickly find the slowest module and the slowest line in a module. Slowness is measured in three ways: total calls, total time and average time per call.
Coloring is based on absolute deviations from the median. See http://en.wikipedia.org/wiki/Median_absolute_deviation for more details.
That might sound complicated, but in reality you can just run the command and enjoy your report!
- -f, --file <filename>
Specifies the location of the file generated by Devel::NYTProf. Default: ./nytprof.out
- -o, --out <dir>
The directory in which to place the generated report files. Default: ./nytprof/
- -d, --delete
Purge any existing contents of the report output directory.
- -l, --lib <dir>
Add a path to the beginning of @INC to help nytprofhtml find the source files used by the code. Should not be needed in practice.
Make your web browser visit the report after it has been generated.
- -h, --help
Print the help message
You can see a complete report for a large application (over 200 files and 2000 subroutines) at http://idisk.mac.com/tim.bunce-Public/perl/NYTProf/nytprof-perlcritic-20080812/index.html
The report was generated by profiling perlcritic 1.088 checking it's own source code.
A bit of history and a shameless plug...
NYTProf stands for 'New York Times Profiler'. Indeed, this module was initially developed from Devel::FastProf by The New York Times Co. to help our developers quickly identify bottlenecks in large Perl applications. The NY Times loves Perl and we hope the community will benefit from our work as much as we have from theirs.
Please visit http://open.nytimes.com, our open source blog to see what we are up to, http://code.nytimes.com to see some of our open projects and then check out http://nytimes.com for the latest news!
Devel::DProf | 1995-10-31 | ILYAZ Devel::AutoProfiler | 2002-04-07 | GSLONDON Devel::Profiler | 2002-05-20 | SAMTREGAR Devel::Profile | 2003-04-13 | JAW Devel::DProfLB | 2006-05-11 | JAW Devel::WxProf | 2008-04-14 | MKUTTER
Devel::SmallProf | 1997-07-30 | ASHTED Devel::FastProf | 2005-09-20 | SALVA Devel::NYTProf | 2008-03-04 | AKAPLAN Devel::Profit | 2008-05-19 | LBROCARD
Devel::NYTProf is a (now distant) fork of Devel::FastProf, which was itself an evolution of Devel::SmallProf.
Adam Kaplan took Devel::FastProf and added html report generation (based on Devel::Cover) and a test suite - a tricky thing to do for a profiler. Meanwhile Tim Bunce had been extending Devel::FastProf to add novel per-sub and per-block timing, plus subroutine caller tracking.
When Devel::NYTProf was released Tim switched to working on Devel::NYTProf because the html report would be a good way to show the extra profile data, and the test suite made development much easier and safer.
Then he went a little crazy and added a slew of new features, in addition to per-sub and per-block timing and subroutine caller tracking. These included the 'opcode interception' method of profiling, ultra-fast and robust inclusive subroutine timing, doubling performance, plus major changes to html reporting to display all the extra profile call and timing data in richly annotated and cross-linked reports.
Steve Peters came on board along the way with patches for portability and to keep NYTProf working with the latest development perl versions.
Mailing list and discussion at http://groups.google.com/group/develnytprof-dev
Public SVN Repository and hacking instructions at http://code.google.com/p/perl-devel-nytprof/
COPYRIGHT AND LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.