← Index
NYTProf Performance Profile   « line view »
For script/ponapi
  Run on Wed Feb 10 15:51:26 2016
Reported on Thu Feb 11 09:43:12 2016

Filename/usr/local/share/perl/5.18.2/Plack/Middleware/ContentLength.pm
StatementsExecuted 600015 statements in 4.93s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
100001113.02s947sPlack::Middleware::ContentLength::::callPlack::Middleware::ContentLength::call
100001112.70s8.70sPlack::Middleware::ContentLength::::__ANON__[:21]Plack::Middleware::ContentLength::__ANON__[:21]
11110µs21µsPlack::Middleware::ContentLength::::BEGIN@2Plack::Middleware::ContentLength::BEGIN@2
1118µs12µsPlack::Middleware::ContentLength::::BEGIN@3Plack::Middleware::ContentLength::BEGIN@3
1117µs31µsPlack::Middleware::ContentLength::::BEGIN@4Plack::Middleware::ContentLength::BEGIN@4
1114µs4µsPlack::Middleware::ContentLength::::BEGIN@6Plack::Middleware::ContentLength::BEGIN@6
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Plack::Middleware::ContentLength;
2219µs233µ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
use strict;
# spent 21µs making 1 call to Plack::Middleware::ContentLength::BEGIN@2 # spent 11µs making 1 call to strict::import
3220µs217µ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
use warnings;
# spent 12µs making 1 call to Plack::Middleware::ContentLength::BEGIN@3 # spent 5µs making 1 call to warnings::import
4220µs231µ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
use parent qw( Plack::Middleware );
# 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
62108µs14µ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
use Plack::Util;
# 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
sub call {
910000178.9ms my $self = shift;
10100001675ms200002932s 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
return $self->response_cb($res, sub {
1310000138.1ms my $res = shift;
14100001258ms1000012.62s my $h = Plack::Util::headers($res->[1]);
# spent 2.62s making 100001 calls to Plack::Util::headers, avg 26µs/call
151000012.27s2000023.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 }
211000011.61s10000112.5s });
# spent 12.5s making 100001 calls to Plack::Component::response_cb, avg 125µs/call
22}
23
2412µs1;
25
26__END__