Filename | /usr/local/share/perl/5.18.2/Plack/Component.pm |
Statements | Executed 800072 statements in 6.28s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
600006 | 6 | 6 | 4.97s | 5431s | __ANON__[:50] | Plack::Component::
100001 | 1 | 1 | 732ms | 12.5s | response_cb | Plack::Component::
6 | 2 | 2 | 77µs | 811ms | to_app | Plack::Component::
6 | 3 | 3 | 51µs | 51µs | new | Plack::Component::
1 | 1 | 1 | 8µs | 18µs | BEGIN@2 | Plack::Component::
1 | 1 | 1 | 8µs | 35µs | BEGIN@6 | Plack::Component::
1 | 1 | 1 | 7µs | 11µs | BEGIN@3 | Plack::Component::
1 | 1 | 1 | 5µs | 5µs | BEGIN@5 | Plack::Component::
4 | 1 | 1 | 5µs | 5µs | prepare_app | Plack::Component::
1 | 1 | 1 | 3µs | 3µs | BEGIN@4 | Plack::Component::
0 | 0 | 0 | 0s | 0s | mk_accessors | Plack::Component::
0 | 0 | 0 | 0s | 0s | to_app_auto | Plack::Component::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Plack::Component; | ||||
2 | 2 | 24µs | 2 | 27µs | # spent 18µs (8+9) within Plack::Component::BEGIN@2 which was called:
# once (8µs+9µs) by parent::import at line 2 # spent 18µs making 1 call to Plack::Component::BEGIN@2
# spent 9µs making 1 call to strict::import |
3 | 2 | 17µs | 2 | 15µs | # spent 11µs (7+4) within Plack::Component::BEGIN@3 which was called:
# once (7µs+4µs) by parent::import at line 3 # spent 11µs making 1 call to Plack::Component::BEGIN@3
# spent 4µs making 1 call to warnings::import |
4 | 2 | 15µs | 1 | 3µs | # spent 3µs within Plack::Component::BEGIN@4 which was called:
# once (3µs+0s) by parent::import at line 4 # spent 3µs making 1 call to Plack::Component::BEGIN@4 |
5 | 2 | 31µs | 1 | 5µs | # spent 5µs within Plack::Component::BEGIN@5 which was called:
# once (5µs+0s) by parent::import at line 5 # spent 5µs making 1 call to Plack::Component::BEGIN@5 |
6 | 2 | 221µs | 2 | 62µs | # spent 35µs (8+27) within Plack::Component::BEGIN@6 which was called:
# once (8µs+27µs) by parent::import at line 6 # spent 35µs making 1 call to Plack::Component::BEGIN@6
# spent 27µs making 1 call to overload::import |
7 | |||||
8 | # spent 51µs within Plack::Component::new which was called 6 times, avg 9µs/call:
# 4 times (26µs+0s) by Plack::Middleware::wrap at line 14 of Plack/Middleware.pm, avg 6µs/call
# once (19µs+0s) by Plack::Middleware::MethodOverride::new at line 17 of Plack/Middleware/MethodOverride.pm
# once (7µs+0s) by PONAPI::CLI::RunServer::run at line 19 of lib/PONAPI/CLI/RunServer.pm | ||||
9 | 6 | 7µs | my $proto = shift; | ||
10 | 6 | 3µs | my $class = ref $proto || $proto; | ||
11 | |||||
12 | 6 | 3µs | my $self; | ||
13 | 6 | 25µs | if (@_ == 1 && ref $_[0] eq 'HASH') { | ||
14 | $self = bless {%{$_[0]}}, $class; | ||||
15 | } else { | ||||
16 | 1 | 2µs | $self = bless {@_}, $class; | ||
17 | } | ||||
18 | |||||
19 | 6 | 24µs | $self; | ||
20 | } | ||||
21 | |||||
22 | sub to_app_auto { | ||||
23 | my $self = shift; | ||||
24 | if (($ENV{PLACK_ENV} || '') eq 'development') { | ||||
25 | my $class = ref($self); | ||||
26 | warn "WARNING: Automatically converting $class instance to a PSGI code reference. " . | ||||
27 | "If you see this warning for each request, you probably need to explicitly call " . | ||||
28 | "to_app() i.e. $class->new(...)->to_app in your PSGI file.\n"; | ||||
29 | } | ||||
30 | $self->to_app(@_); | ||||
31 | } | ||||
32 | |||||
33 | # NOTE: | ||||
34 | # this is for back-compat only, | ||||
35 | # future modules should use | ||||
36 | # Plack::Util::Accessor directly | ||||
37 | # or their own favorite accessor | ||||
38 | # generator. | ||||
39 | # - SL | ||||
40 | sub mk_accessors { | ||||
41 | my $self = shift; | ||||
42 | Plack::Util::Accessor::mk_accessors( ref( $self ) || $self, @_ ) | ||||
43 | } | ||||
44 | |||||
45 | 4 | 14µs | # spent 5µs within Plack::Component::prepare_app which was called 4 times, avg 1µs/call:
# 4 times (5µs+0s) by Plack::Component::to_app at line 49, avg 1µs/call | ||
46 | |||||
47 | # spent 811ms (77µs+811) within Plack::Component::to_app which was called 6 times, avg 135ms/call:
# 5 times (61µs+411µs) by Plack::Middleware::wrap at line 16 of Plack/Middleware.pm, avg 94µs/call
# once (16µs+811ms) by PONAPI::CLI::RunServer::run at line 19 of lib/PONAPI/CLI/RunServer.pm | ||||
48 | 6 | 2µs | my $self = shift; | ||
49 | 6 | 20µs | 6 | 811ms | $self->prepare_app; # spent 811ms making 1 call to PONAPI::Server::prepare_app
# spent 407µs making 1 call to Plack::Middleware::AccessLog::prepare_app
# spent 5µs making 4 calls to Plack::Component::prepare_app, avg 1µs/call |
50 | 600012 | 5.70s | 600006 | 5426s | # spent 5431s (4.97+5426) within Plack::Component::__ANON__[/usr/local/share/perl/5.18.2/Plack/Component.pm:50] which was called 600006 times, avg 9.05ms/call:
# 100001 times (951ms+947s) by Plack::Util::run_app at line 145 of Plack/Util.pm, avg 9.48ms/call
# 100001 times (807ms+931s) by Plack::Middleware::ContentLength::call at line 10 of Plack/Middleware/ContentLength.pm, avg 9.31ms/call
# 100001 times (771ms+908s) by Plack::Middleware::AccessLog::call at line 24 of Plack/Middleware/AccessLog.pm, avg 9.09ms/call
# 100001 times (688ms+894s) by Plack::Middleware::StackTrace::try {...} at line 38 of Plack/Middleware/StackTrace.pm, avg 8.94ms/call
# 100001 times (846ms+875s) by Plack::Middleware::Lint::call at line 24 of Plack/Middleware/Lint.pm, avg 8.76ms/call
# 100001 times (902ms+871s) by Plack::Middleware::MethodOverride::call at line 37 of Plack/Middleware/MethodOverride.pm, avg 8.72ms/call # spent 947s making 100001 calls to Plack::Middleware::ContentLength::call, avg 9.47ms/call
# spent 931s making 100001 calls to Plack::Middleware::AccessLog::call, avg 9.31ms/call
# spent 908s making 100001 calls to Plack::Middleware::StackTrace::call, avg 9.08ms/call
# spent 894s making 100001 calls to Plack::Middleware::Lint::call, avg 8.94ms/call
# spent 875s making 100001 calls to Plack::Middleware::MethodOverride::call, avg 8.75ms/call
# spent 871s making 100001 calls to PONAPI::Server::call, avg 8.71ms/call |
51 | } | ||||
52 | |||||
53 | |||||
54 | # spent 12.5s (732ms+11.8) within Plack::Component::response_cb which was called 100001 times, avg 125µs/call:
# 100001 times (732ms+11.8s) by Plack::Middleware::ContentLength::call at line 21 of Plack/Middleware/ContentLength.pm, avg 125µs/call | ||||
55 | 100001 | 78.8ms | my($self, $res, $cb) = @_; | ||
56 | 100001 | 497ms | 100001 | 11.8s | Plack::Util::response_cb($res, $cb); # spent 11.8s making 100001 calls to Plack::Util::response_cb, avg 118µs/call |
57 | } | ||||
58 | |||||
59 | 1 | 2µs | 1; | ||
60 | |||||
61 | __END__ |