Filename | /usr/local/share/perl/5.18.2/Plack/Middleware/ContentLength.pm |
Statements | Executed 600015 statements in 4.93s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
100001 | 1 | 1 | 3.02s | 947s | call | Plack::Middleware::ContentLength::
100001 | 1 | 1 | 2.70s | 8.70s | __ANON__[:21] | Plack::Middleware::ContentLength::
1 | 1 | 1 | 10µs | 21µs | BEGIN@2 | Plack::Middleware::ContentLength::
1 | 1 | 1 | 8µs | 12µs | BEGIN@3 | Plack::Middleware::ContentLength::
1 | 1 | 1 | 7µs | 31µs | BEGIN@4 | Plack::Middleware::ContentLength::
1 | 1 | 1 | 4µs | 4µs | BEGIN@6 | Plack::Middleware::ContentLength::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Plack::Middleware::ContentLength; | ||||
2 | 2 | 19µs | 2 | 33µs | # spent 21µs (10+11) within Plack::Middleware::ContentLength::BEGIN@2 which was called:
# once (10µs+11µs) by HTTP::Server::PSGI::BEGIN@14 at line 2 # spent 21µs making 1 call to Plack::Middleware::ContentLength::BEGIN@2
# spent 11µs making 1 call to strict::import |
3 | 2 | 20µs | 2 | 17µs | # spent 12µs (8+5) within Plack::Middleware::ContentLength::BEGIN@3 which was called:
# once (8µs+5µs) by HTTP::Server::PSGI::BEGIN@14 at line 3 # spent 12µs making 1 call to Plack::Middleware::ContentLength::BEGIN@3
# spent 5µs making 1 call to warnings::import |
4 | 2 | 20µs | 2 | 31µs | # spent 31µs (7+24) within Plack::Middleware::ContentLength::BEGIN@4 which was called:
# once (7µs+24µs) by HTTP::Server::PSGI::BEGIN@14 at line 4 # spent 31µs making 1 call to Plack::Middleware::ContentLength::BEGIN@4
# spent 24µs making 1 call to parent::import, recursion: max depth 2, sum of overlapping time 24µs |
5 | |||||
6 | 2 | 108µs | 1 | 4µs | # spent 4µs within Plack::Middleware::ContentLength::BEGIN@6 which was called:
# once (4µs+0s) by HTTP::Server::PSGI::BEGIN@14 at line 6 # spent 4µs making 1 call to Plack::Middleware::ContentLength::BEGIN@6 |
7 | |||||
8 | # spent 947s (3.02+944) within Plack::Middleware::ContentLength::call which was called 100001 times, avg 9.47ms/call:
# 100001 times (3.02s+944s) by Plack::Component::__ANON__[/usr/local/share/perl/5.18.2/Plack/Component.pm:50] at line 50 of Plack/Component.pm, avg 9.47ms/call | ||||
9 | 100001 | 78.9ms | my $self = shift; | ||
10 | 100001 | 675ms | 200002 | 932s | my $res = $self->app->(@_); # spent 931s making 100001 calls to Plack::Component::__ANON__[Plack/Component.pm:50], avg 9.31ms/call
# spent 550ms making 100001 calls to Plack::Util::Accessor::__ANON__[Plack/Util/Accessor.pm:19], avg 6µs/call |
11 | |||||
12 | # spent 8.70s (2.70+6.01) within Plack::Middleware::ContentLength::__ANON__[/usr/local/share/perl/5.18.2/Plack/Middleware/ContentLength.pm:21] which was called 100001 times, avg 87µs/call:
# 100001 times (2.70s+6.01s) by Plack::Util::__ANON__[/usr/local/share/perl/5.18.2/Plack/Util.pm:313] at line 290 of Plack/Util.pm, avg 87µs/call | ||||
13 | 100001 | 38.1ms | my $res = shift; | ||
14 | 100001 | 258ms | 100001 | 2.62s | my $h = Plack::Util::headers($res->[1]); # spent 2.62s making 100001 calls to Plack::Util::headers, avg 26µs/call |
15 | 100001 | 2.27s | 200002 | 3.38s | if (!Plack::Util::status_with_no_entity_body($res->[0]) && # spent 3.04s making 100001 calls to Plack::Util::Prototype::AUTOLOAD, avg 30µs/call
# spent 341ms making 100001 calls to Plack::Util::status_with_no_entity_body, avg 3µs/call |
16 | !$h->exists('Content-Length') && | ||||
17 | !$h->exists('Transfer-Encoding') && | ||||
18 | defined(my $content_length = Plack::Util::content_length($res->[2]))) { | ||||
19 | $h->push('Content-Length' => $content_length); | ||||
20 | } | ||||
21 | 100001 | 1.61s | 100001 | 12.5s | }); # spent 12.5s making 100001 calls to Plack::Component::response_cb, avg 125µs/call |
22 | } | ||||
23 | |||||
24 | 1 | 2µs | 1; | ||
25 | |||||
26 | __END__ |