1Devel::NYTProf::Apache(U3s)er Contributed Perl DocumentatDieovnel::NYTProf::Apache(3)
2
3
4

NAME

6       Devel::NYTProf::Apache - Profile mod_perl applications with
7       Devel::NYTProf
8

SYNOPSIS

10         # in your Apache config file with mod_perl installed
11         PerlPassEnv NYTPROF
12         PerlModule Devel::NYTProf::Apache
13
14       If you're using virtual hosts with "PerlOptions" that include either
15       "+Parent" or "+Clone" then see "VIRTUAL HOSTS" below.
16

DESCRIPTION

18       This module allows mod_perl applications to be profiled using
19       "Devel::NYTProf".
20
21       If the NYTPROF environment variable isn't set at the time
22       Devel::NYTProf::Apache is loaded then Devel::NYTProf::Apache will issue
23       a warning and default it to:
24
25         file=/tmp/nytprof.$$.out
26
27       The file actually created by NTProf will also have the process id
28       appended to it because the "addpid" option is enabled by default.
29
30       See "ENVIRONMENT VARIABLES" in Devel::NYTProf for more details on the
31       settings effected by this environment variable.  Try using
32       "PerlPassEnv" so you can set the NYTPROF environment variable
33       externally.
34
35       Each profiled mod_perl process will need to have terminated before you
36       can successfully read the profile data file. The simplest approach is
37       to start the httpd, make some requests (e.g., 100 of the same request),
38       then stop it and process the profile data.
39
40       Alternatively you could send a TERM signal to the httpd worker process
41       to terminate that one process. The parent httpd process will start up
42       another one for you ready for more profiling.
43
44   Example httpd.conf
45       It's often a good idea to use just one child process when profiling,
46       which you can do by setting the "MaxClients" to 1 in httpd.conf.
47
48       Using an "IfDefine" blocks lets you leave the profile configuration in
49       place and enable it whenever it's needed by adding "-D NYTPROF" to the
50       httpd startup command line.
51
52         <IfDefine NYTPROF>
53             MaxClients 1
54             PerlModule Devel::NYTProf::Apache
55         </IfDefine>
56

VIRTUAL HOSTS

58       If your httpd configuration includes virtual hosts with "PerlOptions"
59       that include either "+Parent" or "+Clone" then mod_perl2 will create a
60       new perl interpreter to handle requests for that virtual host.  This
61       causes some issues for profiling.
62
63       If "Devel::NYTProf::Apache" is loaded in the top-level configuration
64       then activity in any virtual hosts that use their own perl interpreter
65       won't be profiled. Normal virtual hosts will be profiled just fine.
66
67       You can profile a single virtual host that uses its own perl
68       interpreter by loading "Devel::NYTProf::Apache" inside the
69       configuration for that virtual host. In this case do not use
70       "PerlModule" directive. You need to use a "Perl" directive instead,
71       like this:
72
73           <VirtualHost *:1234>
74               ...
75               <Perl> use Devel::NYTProf::Apache; </Perl>
76               ...
77           </VirtualHost>
78

LIMITATIONS

80       Profiling mod_perl on Windows is not supported because NYTProf
81       currently doesn't support threads.
82

SEE ALSO

84       Devel::NYTProf
85

AUTHOR

87       Adam Kaplan, "<akaplan at nytimes.com>" Tim Bunce,
88       <http://www.tim.bunce.name> and <http://blog.timbunce.org> Steve
89       Peters, "<steve at fisharerojo.org>"
90
92         Copyright (C) 2008 by Adam Kaplan and The New York Times Company.
93         Copyright (C) 2008 by Steve Peters.
94         Copyright (C) 2008 by Tim Bunce.
95
96       This library is free software; you can redistribute it and/or modify it
97       under the same terms as Perl itself, either Perl version 5.8.8 or, at
98       your option, any later version of Perl 5 you may have available.
99
100
101
102perl v5.12.2                      2010-06-10         Devel::NYTProf::Apache(3)
Impressum