NAME
Plack::Middleware::ProcessTimes - Include process times of a request in the Plack env
VERSION
version 0.001000
SYNOPSIS
# in app.psgi
use Plack::Builder;
builder {
enable 'AccessLog::Timed',
format => '%r %t [%{x-time-real}o %{x-time-cpu-user}o %{x-time-cpu-sys}o]';
enable 'ProcessTimes';
$app
};
DESCRIPTION
Plack::Middleware::ProcessTimes
defines some response headers based on the "times" in perlfunc function. The following times are defined:
X-Time-Real
- Actual recorded wallclock timeX-Time-CPU-User
X-Time-CPU-Sys
X-Time-CPU-CUser
X-Time-CPU-CSys
Look up times(2)
in your system manual for what these all mean.
CONFIGURATION
measure_children
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 -
.
THANKS
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!
AUTHOR
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
COPYRIGHT AND LICENSE
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.