Plack::Middleware::ProcessTimes - Include process times of a request in the Plack env
version 1.000000
# in app.psgi use Plack::Builder; builder { enable 'AccessLog::Structured', extra_field => { 'pt.cpu-user' => 'CPU-User-Time', 'pt.cpu-sys' => 'CPU-Sys-Time', }; enable 'ProcessTimes'; $app };
Plack::Middleware::ProcessTimes defines some environment values based on the "times" in perlfunc function. The following values are defined:
Plack::Middleware::ProcessTimes
pt.real - Actual recorded wallclock time
pt.real
pt.cpu-user
pt.cpu-sys
pt.cpu-cuser
pt.cpu-csys
Look up times(2) in your system manual for what these all mean.
times(2)
Setting measure_children to true will "waitpid" in perlfunc for children so that child times can be measured. If set responses will be somewhat slower; if not set, the headers will be set to -.
measure_children
-
This module was originally written for Apache by Randal L. Schwartz <merlyn@stonehenge.com> for the ZipRecruiter codebase. Thanks to both Randal and ZipRecruiter for allowing me to publish this module!
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
This software is copyright (c) 2015 by Arthur Axel "fREW" Schmidt.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Plack::Middleware::ProcessTimes, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::ProcessTimes
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::ProcessTimes
For more information on module installation, please visit the detailed CPAN module installation guide.