Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Readonly/Array.pm |
Statements | Executed 14920 statements in 22.7ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
4349 | 15 | 10 | 6.03ms | 6.03ms | FETCH | Readonly::Array::
212 | 1 | 1 | 1.50ms | 1.75ms | TIEARRAY | Readonly::Array::
405 | 24 | 15 | 482µs | 482µs | FETCHSIZE | Readonly::Array::
212 | 1 | 1 | 251µs | 251µs | CORE:match (opcode) | Readonly::Array::
1 | 1 | 1 | 46µs | 46µs | BEGIN@24 | Readonly::Array::
0 | 0 | 0 | 0s | 0s | __ANON__[:34] | Readonly::Array::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Readonly::Array; | ||||
2 | 1 | 600ns | our $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 | ||||
5 | 212 | 406µs | my $whence | ||
6 | = (caller 1)[3]; # Check if naughty user is trying to tie directly. | ||||
7 | 212 | 631µs | 212 | 251µs | Readonly::croak "Invalid tie" unless $whence =~ /^Readonly::Array1?$/; # spent 251µs making 212 calls to Readonly::Array::CORE:match, avg 1µs/call |
8 | 212 | 46µs | my $class = shift; | ||
9 | 212 | 251µs | my @self = @_; | ||
10 | 212 | 515µ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 | ||||
14 | 4349 | 553µs | my $self = shift; | ||
15 | 4349 | 177µs | my $index = shift; | ||
16 | 4349 | 16.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 | ||||
20 | 405 | 67µs | my $self = shift; | ||
21 | 405 | 3.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 | ||||
25 | 1 | 42µ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 | ||||
32 | 1 | 49µs | 1 | 46µs | } # spent 46µs making 1 call to Readonly::Array::BEGIN@24 |
33 | *STORE = *STORESIZE = *EXTEND = *PUSH = *POP = *UNSHIFT = *SHIFT = *SPLICE | ||||
34 | 1 | 8µ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 |