Profile of Plack/Util/Accessor.pm

← 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:10 2016

Filename | /usr/local/share/perl/5.18.2/Plack/Util/Accessor.pm
Statements | Executed 1400063 statements in 9.45s

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1200014 | 14 | 6 | 3.32s | 3.32s | Plack::Util::Accessor::::__ANON__[:19]Plack::Util::Accessor::__ANON__[:19]
5 | 1 | 1 | 62µs | 62µs | Plack::Util::Accessor::::mk_accessorsPlack::Util::Accessor::mk_accessors
5 | 5 | 5 | 32µs | 95µs | Plack::Util::Accessor::::importPlack::Util::Accessor::import
1 | 1 | 1 | 9µs | 18µs | Plack::Util::Accessor::::BEGIN@2Plack::Util::Accessor::BEGIN@2
1 | 1 | 1 | 6µs | 15µs | Plack::Util::Accessor::::BEGIN@14Plack::Util::Accessor::BEGIN@14
1 | 1 | 1 | 6µs | 9µs | Plack::Util::Accessor::::BEGIN@3Plack::Util::Accessor::BEGIN@3

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package Plack::Util::Accessor;
2 | 2 | 18µs | 2 | 27µs | # spent 18µs (9+9) within Plack::Util::Accessor::BEGIN@2 which was called: # once (9µs+9µs) by Plack::Middleware::BEGIN@7 at line 2 use strict; # spent 18µs making 1 call to Plack::Util::Accessor::BEGIN@2 # spent 9µs making 1 call to strict::import
3 | 2 | 58µs | 2 | 12µs | # spent 9µs (6+3) within Plack::Util::Accessor::BEGIN@3 which was called: # once (6µs+3µs) by Plack::Middleware::BEGIN@7 at line 3 use warnings; # spent 9µs making 1 call to Plack::Util::Accessor::BEGIN@3 # spent 3µs making 1 call to warnings::import
4 |  |  |  |  |
5 |  |  |  |  | # spent 95µs (32+62) within Plack::Util::Accessor::import which was called 5 times, avg 19µs/call: # once (10µs+15µs) by Plack::Middleware::BEGIN@7 at line 7 of Plack/Middleware.pm # once (6µs+17µs) by Plack::Middleware::AccessLog::BEGIN@5 at line 5 of Plack/Middleware/AccessLog.pm # once (8µs+13µs) by Plack::Middleware::StackTrace::BEGIN@9 at line 9 of Plack/Middleware/StackTrace.pm # once (4µs+10µs) by Plack::Response::BEGIN@6 at line 6 of Plack/Response.pm # once (4µs+7µs) by Plack::Middleware::MethodOverride::BEGIN@11 at line 11 of Plack/Middleware/MethodOverride.pm sub import {
6 | 5 | 1µs |  |  | shift;
7 | 5 | 3µs |  |  | return unless @_;
8 | 5 | 5µs |  |  | my $package = caller();
9 | 5 | 26µs | 5 | 62µs | mk_accessors( $package, @_ ); # spent 62µs making 5 calls to Plack::Util::Accessor::mk_accessors, avg 12µs/call
10 |  |  |  |  | }
11 |  |  |  |  |
12 |  |  |  |  | # spent 62µs within Plack::Util::Accessor::mk_accessors which was called 5 times, avg 12µs/call: # 5 times (62µs+0s) by Plack::Util::Accessor::import at line 9, avg 12µs/call sub mk_accessors {
13 | 5 | 1µs |  |  | my $package = shift;
14 | 2 | 78µs | 2 | 24µs | # spent 15µs (6+9) within Plack::Util::Accessor::BEGIN@14 which was called: # once (6µs+9µs) by Plack::Middleware::BEGIN@7 at line 14 no strict 'refs'; # spent 15µs making 1 call to Plack::Util::Accessor::BEGIN@14 # spent 9µs making 1 call to strict::unimport
15 | 5 | 20µs |  |  | foreach my $field ( @_ ) {
16 |  |  |  |  | # spent 3.32s within Plack::Util::Accessor::__ANON__[/usr/local/share/perl/5.18.2/Plack/Util/Accessor.pm:19] which was called 1200014 times, avg 3µs/call: # 100001 times (550ms+0s) by Plack::Middleware::ContentLength::call at line 10 of Plack/Middleware/ContentLength.pm, avg 6µs/call # 100001 times (434ms+0s) by Plack::Response::new at line 20 of Plack/Response.pm, avg 4µs/call # 100001 times (349ms+0s) by Plack::Response::content at line 14 of Plack/Response.pm, avg 3µs/call # 100001 times (310ms+0s) by Plack::Middleware::AccessLog::log_line at line 54 of Plack/Middleware/AccessLog.pm, avg 3µs/call # 100001 times (310ms+0s) by Plack::Middleware::Lint::call at line 24 of Plack/Middleware/Lint.pm, avg 3µs/call # 100001 times (285ms+0s) by Plack::Middleware::StackTrace::try {...} at line 38 of Plack/Middleware/StackTrace.pm, avg 3µs/call # 100001 times (232ms+0s) by Plack::Middleware::MethodOverride::call at line 37 of Plack/Middleware/MethodOverride.pm, avg 2µs/call # 100001 times (228ms+0s) by Plack::Middleware::AccessLog::call at line 29 of Plack/Middleware/AccessLog.pm, avg 2µs/call # 100001 times (206ms+0s) by Plack::Middleware::AccessLog::call at line 24 of Plack/Middleware/AccessLog.pm, avg 2µs/call # 100001 times (145ms+0s) by Plack::Response::finalize at line 87 of Plack/Response.pm, avg 1µs/call # 100001 times (136ms+0s) by Plack::Response::_body at line 115 of Plack/Response.pm, avg 1µs/call # 100001 times (135ms+0s) by Plack::Response::finalize at line 101 of Plack/Response.pm, avg 1µs/call # once (44µs+0s) by Plack::Middleware::AccessLog::prepare_app at line 15 of Plack/Middleware/AccessLog.pm # once (4µs+0s) by Plack::Middleware::AccessLog::prepare_app at line 17 of Plack/Middleware/AccessLog.pm *{ $package . '::' . $field } = sub {
17 | 1200014 | 7.83s |  |  | return $_[0]->{ $field } if scalar( @_ ) == 1;
18 | 200003 | 1.62s |  |  | return $_[0]->{ $field } = scalar( @_ ) == 2 ? $_[1] : [ @_[1..$#_] ];
19 | 9 | 50µs |  |  | };
20 |  |  |  |  | }
21 |  |  |  |  | }
22 |  |  |  |  |
23 | 1 | 2µs |  |  | 1;
24 |  |  |  |  |
25 |  |  |  |  | __END__