1NYTPROFHTML(1)        User Contributed Perl Documentation       NYTPROFHTML(1)
2
3
4

NAME

6       nytprofhtml - Generate reports from Devel::NYTProf data
7

SYNOPSIS

9       Typical usage:
10
11        $ perl -d:NYTProf some_perl_app.pl
12        $ nytprofhtml --open
13
14       Options synopsis:
15
16        $ nytprofhtml [-h] [-d] [-m] [-o <output directory>] [-f <input file>] [--open]
17

DESCRIPTION

19       Devel::NYTProf is a powerful feature-rich Perl source code profiler.
20       See Devel::NYTProf for details.
21
22       "nytprofhtml" generates a set of html reports from a single data file
23       generated by Devel::NYTProf. (If your process forks you'll probably
24       have multiple files. See Devel::NYTProf and nytprofmerge.)
25
26       The reports include dynamic runtime analysis wherein each line and each
27       file is analyzed based on the performance of the other lines and files.
28       As a result, you can quickly find the slowest module and the slowest
29       line in a module.  Slowness is measured in three ways: total calls,
30       total time, and average time per call.
31
32       Coloring is based on absolute deviations from the median.  See
33       <http://en.wikipedia.org/wiki/Median_absolute_deviation> for more
34       details.
35
36       That might sound complicated, but in reality you can just run the
37       command and enjoy your report!
38

COMMAND-LINE OPTIONS

40       -f, --file <filename>
41           Specifies the location of the file generated by Devel::NYTProf.
42           Default: ./nytprof.out
43
44       -o, --out <dir>
45           The directory in which to place the generated report files.
46           Default: ./nytprof/
47
48       -d, --delete
49           Purge any existing contents of the report output directory.
50
51       -l, --lib <dir>
52           Add a path to the beginning of @INC to help nytprofhtml find the
53           source files used by the code. Should not be needed in practice.
54
55       --open
56           Make your web browser visit the report after it has been generated.
57
58           If this doesn't work well for you, try installing the Browser::Open
59           module.
60
61       -m, --minimal
62           Don't generate graphviz .dot files or block/sub-level reports.
63
64       --no-flame
65           Disable generation of the flamegraph on the index page.  Also
66           disables calculation of distinct call stacks that are used to
67           produce the flamegraph.
68
69       -h, --help
70           Print the help message.
71

SAMPLE OUTPUT

73       You can see a complete report for a large application at
74       <http://timbunce.github.io/devel-nytprof/sample-report/nytprof-20160319/index.html>
75
76       The report was generated by profiling perlcritic 1.121 checking its own
77       source code using perl v5.18.2.
78

DIAGNOSTICS

80   "Unable to open '... (autosplit into ...)'"
81       The profiled application executed code in a module that used AutoLoader
82       to load the code from a separate .al file.  NYTProf automatically
83       recognises this situation and tries to determine the 'parent' module
84       file so it can associate the profile data with it.  In order to do that
85       the parent module file must already be 'known' to NYTProf, typically by
86       already having some code profiled.
87
88       You're only likely to see this warning if you're using the "start"
89       option to start profiling after compile-time. The effect is that times
90       spent in autoloaded subs won't be associated with the parent module
91       file and you won't get annotated reports for them.
92
93       You can avoid this by using the default "start=begin" option, or by
94       ensuring you execute some non-autoloaded code in the parent module,
95       while the profiler is running, before an autoloaded sub is called.
96
97   Background
98       Subroutine-level profilers:
99
100         Devel::DProf        | 1995-10-31 | ILYAZ
101         Devel::AutoProfiler | 2002-04-07 | GSLONDON
102         Devel::Profiler     | 2002-05-20 | SAMTREGAR
103         Devel::Profile      | 2003-04-13 | JAW
104         Devel::DProfLB      | 2006-05-11 | JAW
105         Devel::WxProf       | 2008-04-14 | MKUTTER
106
107       Statement-level profilers:
108
109         Devel::SmallProf    | 1997-07-30 | ASHTED
110         Devel::FastProf     | 2005-09-20 | SALVA
111         Devel::NYTProf      | 2008-03-04 | AKAPLAN
112         Devel::Profit       | 2008-05-19 | LBROCARD
113
114       Devel::NYTProf is a (now distant) fork of Devel::FastProf, which was
115       itself an evolution of Devel::SmallProf.
116
117       Adam Kaplan took Devel::FastProf and added html report generation
118       (based on Devel::Cover) and a test suite - a tricky thing to do for a
119       profiler.  Meanwhile Tim Bunce had been extending Devel::FastProf to
120       add novel per-sub and per-block timing, plus subroutine caller
121       tracking.
122
123       When Devel::NYTProf was released Tim switched to working on
124       Devel::NYTProf because the html report would be a good way to show the
125       extra profile data, and the test suite made development much easier and
126       safer.
127
128       Then he went a little crazy and added a slew of new features, in
129       addition to per-sub and per-block timing and subroutine caller
130       tracking. These included the 'opcode interception' method of profiling,
131       ultra-fast and robust inclusive subroutine timing, doubling
132       performance, plus major changes to html reporting to display all the
133       extra profile call and timing data in richly annotated and cross-linked
134       reports.
135
136       Steve Peters came on board along the way with patches for portability
137       and to keep NYTProf working with the latest development Perl versions.
138
139       Adam's work is sponsored by The New York Times Co.
140       <http://open.nytimes.com>.  Tim's work was partly sponsored by
141       Shopzilla. <http://www.shopzilla.com>.
142

SEE ALSO

144       Mailing list and discussion at
145       <http://groups.google.com/group/develnytprof-dev>
146
147       Public Github Repository and hacking instructions at
148       <https://github.com/timbunce/devel-nytprof/>
149
150       Devel::NYTProf, Devel::NYTProf::Reader, nytprofcsv
151

AUTHOR

153       Adam Kaplan, "<akaplan at nytimes.com>".  Tim Bunce,
154       <http://www.tim.bunce.name> and <http://blog.timbunce.org>.  Steve
155       Peters, "<steve at fisharerojo.org>".
156
158       This program is free software; you can redistribute it and/or modify it
159       under the same terms as Perl itself, either Perl version 5.8.8 or, at
160       your option, any later version of Perl 5 you may have available.
161
162
163
164perl v5.30.1                      2019-12-10                    NYTPROFHTML(1)
Impressum