← Index
NYTProf Performance Profile   « line view »
For /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/bin/perlcritic
  Run on Sat Mar 19 22:12:22 2016
Reported on Sat Mar 19 22:14:10 2016

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Readonly/Array.pm
StatementsExecuted 14920 statements in 22.7ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
434915106.03ms6.03msReadonly::Array::::FETCHReadonly::Array::FETCH
212111.50ms1.75msReadonly::Array::::TIEARRAYReadonly::Array::TIEARRAY
4052415482µs482µsReadonly::Array::::FETCHSIZEReadonly::Array::FETCHSIZE
21211251µs251µsReadonly::Array::::CORE:matchReadonly::Array::CORE:match (opcode)
11146µs46µsReadonly::Array::::BEGIN@24Readonly::Array::BEGIN@24
0000s0sReadonly::Array::::__ANON__[:34]Readonly::Array::__ANON__[:34]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Readonly::Array;
21600nsour $VERSION = '1.04';
3
4
# spent 1.75ms (1.50+251µs) within Readonly::Array::TIEARRAY which was called 212 times, avg 8µs/call: # 212 times (1.50ms+251µs) by Readonly::Array at line 144 of Readonly.pm, avg 8µs/call
sub TIEARRAY {
5212406µs my $whence
6 = (caller 1)[3]; # Check if naughty user is trying to tie directly.
7212631µs212251µs Readonly::croak "Invalid tie" unless $whence =~ /^Readonly::Array1?$/;
# spent 251µs making 212 calls to Readonly::Array::CORE:match, avg 1µs/call
821246µs my $class = shift;
9212251µs my @self = @_;
10212515µs return bless \@self, $class;
11}
12
13
# spent 6.03ms within Readonly::Array::FETCH which was called 4349 times, avg 1µs/call: # 3413 times (4.78ms+0s) by Exporter::Heavy::heavy_export at line 87 of Exporter/Heavy.pm, avg 1µs/call # 249 times (319µs+0s) by Perl::Critic::Utils::hashify at line 327 of Perl/Critic/Utils.pm, avg 1µs/call # 147 times (195µs+0s) by Exporter::import at line 49 of Exporter.pm, avg 1µs/call # 130 times (186µs+0s) by Exporter::import at line 45 of Exporter.pm, avg 1µs/call # 130 times (173µs+0s) by Exporter::Heavy::heavy_export at line 163 of Exporter/Heavy.pm, avg 1µs/call # 70 times (89µs+0s) by Perl::Critic::Policy::Variables::ProhibitPunctuationVars::_create_magic_detector at line 307 of Perl/Critic/Policy/Variables/ProhibitPunctuationVars.pm, avg 1µs/call # 65 times (88µs+0s) by Perl::Critic::Exception::Parse::BEGIN@18 at line 111 of Perl/Critic/Utils.pm, avg 1µs/call # 65 times (83µs+0s) by Perl::Critic::Exception::Parse::BEGIN@18 at line 114 of Perl/Critic/Utils.pm, avg 1µs/call # 27 times (37µs+0s) by Perl::Critic::Policy::ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters::supported_parameters at line 51 of Perl/Critic/Policy/ValuesAndExpressions/ProhibitQuotesAsQuotelikeOperatorDelimiters.pm, avg 1µs/call # 24 times (33µs+0s) by Readonly::Hash at line 165 of Readonly.pm, avg 1µs/call # 15 times (23µs+0s) by Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::supported_parameters at line 64 of Perl/Critic/Policy/ControlStructures/ProhibitMutatingListFunctions.pm, avg 2µs/call # 5 times (9µs+0s) by Perl::Critic::Command::_get_options at line 92 of Perl/Critic/Command.pm, avg 2µs/call # 4 times (6µs+0s) by Perl::Critic::Policy::InputOutput::RequireCheckedSyscalls::supported_parameters at line 47 of Perl/Critic/Policy/InputOutput/RequireCheckedSyscalls.pm, avg 2µs/call # 4 times (5µs+0s) by Module::Pluggable::Object::_require at line 43 of Perl/Critic/Policy/Variables/ProhibitEvilVariables.pm, avg 1µs/call # once (2µs+0s) by main::BEGIN@19 at line 39 of Perl/Critic/Command.pm
sub FETCH {
144349553µs my $self = shift;
154349177µs my $index = shift;
16434916.5ms return $self->[$index];
17}
18
19
# spent 482µs within Readonly::Array::FETCHSIZE which was called 405 times, avg 1µs/call: # 362 times (420µs+0s) by Exporter::Heavy::heavy_export at line 87 of Exporter/Heavy.pm, avg 1µs/call # 15 times (24µs+0s) by Exporter::import at line 49 of Exporter.pm, avg 2µs/call # 3 times (4µs+0s) by Perl::Critic::Policy::ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters::supported_parameters at line 51 of Perl/Critic/Policy/ValuesAndExpressions/ProhibitQuotesAsQuotelikeOperatorDelimiters.pm, avg 1µs/call # 2 times (3µs+0s) by Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions::supported_parameters at line 64 of Perl/Critic/Policy/ControlStructures/ProhibitMutatingListFunctions.pm, avg 2µs/call # 2 times (3µs+0s) by Exporter::Heavy::heavy_export at line 163 of Exporter/Heavy.pm, avg 1µs/call # 2 times (3µs+0s) by Exporter::import at line 45 of Exporter.pm, avg 1µs/call # 2 times (2µs+0s) by Readonly::Hash at line 165 of Readonly.pm, avg 1µs/call # once (2µs+0s) by main::BEGIN@19 at line 39 of Perl/Critic/Command.pm # once (2µs+0s) by Perl::Critic::Command::_get_options at line 92 of Perl/Critic/Command.pm # once (2µs+0s) by Perl::Critic::Exception::Parse::BEGIN@18 at line 111 of Perl/Critic/Utils.pm # once (2µs+0s) by Perl::Critic::Policy::InputOutput::RequireCheckedSyscalls::supported_parameters at line 47 of Perl/Critic/Policy/InputOutput/RequireCheckedSyscalls.pm # once (1µs+0s) by Perl::Critic::Exception::Parse::BEGIN@18 at line 114 of Perl/Critic/Utils.pm # once (1µs+0s) by Module::Pluggable::Object::_require at line 26 of Perl/Critic/Policy/Variables/ProhibitMatchVars.pm # once (1µs+0s) by Perl::Critic::Exception::Parse::BEGIN@18 at line 404 of Perl/Critic/Utils.pm # once (1µs+0s) by Perl::Critic::Exception::Parse::BEGIN@18 at line 1085 of Perl/Critic/Utils.pm # once (1µs+0s) by Module::Pluggable::Object::_require at line 58 of Perl/Critic/Policy/CodeLayout/ProhibitParensWithBuiltins.pm # once (1µs+0s) by Module::Pluggable::Object::_require at line 27 of Perl/Critic/Policy/CodeLayout/ProhibitParensWithBuiltins.pm # once (1µs+0s) by Module::Pluggable::Object::_require at line 21 of Perl/Critic/Policy/ControlStructures/ProhibitUnreachableCode.pm # once (1µs+0s) by Module::Pluggable::Object::_require at line 25 of Perl/Critic/Policy/Subroutines/ProhibitBuiltinHomonyms.pm # once (1µs+0s) by Module::Pluggable::Object::_require at line 23 of Perl/Critic/Policy/InputOutput/RequireBracedFileHandleWithPrint.pm # once (1µs+0s) by Perl::Critic::Policy::Variables::ProhibitPunctuationVars::_create_magic_detector at line 307 of Perl/Critic/Policy/Variables/ProhibitPunctuationVars.pm # once (1µs+0s) by Module::Pluggable::Object::_require at line 24 of Perl/Critic/Policy/ControlStructures/ProhibitUnreachableCode.pm # once (1µs+0s) by Module::Pluggable::Object::_require at line 43 of Perl/Critic/Policy/Variables/ProhibitEvilVariables.pm # once (1µs+0s) by Module::Pluggable::Object::_require at line 27 of Perl/Critic/Policy/ControlStructures/ProhibitUnreachableCode.pm
sub FETCHSIZE {
2040567µs my $self = shift;
214053.43ms return scalar @$self;
22}
23
24
# spent 46µs within Readonly::Array::BEGIN@24 which was called: # once (46µs+0s) by Perl::Critic::Command::BEGIN@15 at line 32
BEGIN {
25142µs eval q{
# spent 0s executing statements in string eval
26 sub EXISTS {
27 my $self = shift;
28 my $index = shift;
29 return exists $self->[$index];
30 }
31 } if $] >= 5.006; # couldn't do "exists" on arrays before then
32149µs146µs}
# spent 46µs making 1 call to Readonly::Array::BEGIN@24
33*STORE = *STORESIZE = *EXTEND = *PUSH = *POP = *UNSHIFT = *SHIFT = *SPLICE
3418µs = *CLEAR = *UNTIE = sub { Readonly::croak $Readonly::MODIFY};
 
# spent 251µs within Readonly::Array::CORE:match which was called 212 times, avg 1µs/call: # 212 times (251µs+0s) by Readonly::Array::TIEARRAY at line 7, avg 1µs/call
sub Readonly::Array::CORE:match; # opcode