Plack::Middleware::Debug::Profiler::NYTProf - Runs NYTProf on your app
use Plack::Builder;
my $app = ...; ## Build your Plack App
builder {
enable 'Debug', panels =>['Profiler::NYTProf'];
$app;
};
# or with options
builder {
enable 'Debug', panels => [
[
'Profiler::NYTProf',
base_URL => 'http://example.com/NYTProf',
root => '/path/to/NYTProf',
minimal => 1,
]
];
$app;
};
Adds a debug panel that runs and displays Devel::NYTProf on your perl source code.
This debug panel defines the following options.
Where to store nytprof.out and nytprofhtml output (default: '/tmp').
By default, this module will grab requests with the string nytprofhtml to the server, and deliver the reports with Plack::App::File. If instead you don't want to serve the reports from the same server you're debugging, then you can set this option to the URL where the root folder above can be reached.
List of excluded paths (default: [qw(..css ..png ..ico ..js)]).
By default, nytprofhtml will generate graphviz .dot files and block/sub-level reports. Setting this to a true value will disable this behaviour and make nytprofhtml considerably faster.
By defaut, nytprofhtml will merge string evals in the reports. Setting this to a true value will disable this behaviour. Warning: this will make nytprohtml considerably slower, and might timeout the HTTP request.
You can customize Devel::NYTProf's behaviour by setting the NYTPROF environment variable as specified in its documentation. However, this module requires the following to hold:
Plack::Middleware::Debug Devel::NYTProf
Sebastian de Castelberg, <sdecaste@cpan.org>
Nuba Princigalli, <nuba@cpan.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.