← 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/Hash.pm
StatementsExecuted 95745 statements in 102ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
173896264.6ms84.1msReadonly::Hash::::EXISTSReadonly::Hash::EXISTS
1417510719.6ms19.6msReadonly::Hash::::FETCHReadonly::Hash::FETCH
157111.46ms1.63msReadonly::Hash::::TIEHASHReadonly::Hash::TIEHASH
15711171µs171µsReadonly::Hash::::CORE:matchReadonly::Hash::CORE:match (opcode)
475452µs52µsReadonly::Hash::::NEXTKEYReadonly::Hash::NEXTKEY
55415µs15µsReadonly::Hash::::FIRSTKEYReadonly::Hash::FIRSTKEY
0000s0sReadonly::Hash::::__ANON__[:38]Readonly::Hash::__ANON__[:38]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Readonly::Hash;
21600nsour $VERSION = '1.04';
3
4
# spent 1.63ms (1.46+171µs) within Readonly::Hash::TIEHASH which was called 157 times, avg 10µs/call: # 157 times (1.46ms+171µs) by Readonly::Hash at line 168 of Readonly.pm, avg 10µs/call
sub TIEHASH {
5157302µs my $whence
6 = (caller 1)[3]; # Check if naughty user is trying to tie directly.
7157442µs157171µs Readonly::croak "Invalid tie" unless $whence =~ /^Readonly::Hash1?$/;
# spent 171µs making 157 calls to Readonly::Hash::CORE:match, avg 1µs/call
815735µs my $class = shift;
9
10 # must have an even number of values
1115737µs Readonly::croak $Readonly::ODDHASH unless (@_ % 2 == 0);
12157486µs my %self = @_;
13157378µs return bless \%self, $class;
14}
15
16
# spent 19.6ms within Readonly::Hash::FETCH which was called 14175 times, avg 1µs/call: # 13481 times (18.5ms+0s) by Perl::Critic::Policy::InputOutput::RequireEncodingWithUTF8Layer::violates at line 46 of Perl/Critic/Policy/InputOutput/RequireEncodingWithUTF8Layer.pm, avg 1µs/call # 362 times (644µs+0s) by Exporter::Heavy::heavy_export at line 87 of Exporter/Heavy.pm, avg 2µs/call # 161 times (232µs+0s) by Perl::Critic::Utils::all_perl_files at line 1104 of Perl/Critic/Utils.pm, avg 1µs/call # 97 times (149µs+0s) by Perl::Critic::PolicyParameter::_get_behavior_for_name at line 54 of Perl/Critic/PolicyParameter.pm, avg 2µs/call # 55 times (94µs+0s) by Perl::Critic::Utils::precedence_of at line 701 of Perl/Critic/Utils.pm, avg 2µs/call # 14 times (19µs+0s) by Perl::Critic::Utils::CORE:sort at line 1060 of Perl/Critic/Utils.pm, avg 1µs/call # 2 times (3µs+0s) by Readonly::Hash at line 152 of Readonly.pm, avg 2µs/call # once (2µs+0s) by Readonly::Scalar at line 104 of Readonly.pm # once (2µs+0s) by Perl::Critic::UserProfile::_load_profile at line 162 of Perl/Critic/UserProfile.pm # once (2µs+0s) by Perl::Critic::Config::_validate_and_save_profile_strictness at line 446 of Perl/Critic/Config.pm
sub FETCH {
17141752.40ms my $self = shift;
18141751.57ms my $key = shift;
191417537.7ms return $self->{$key};
20}
21
22
# spent 84.1ms (64.6+19.6) within Readonly::Hash::EXISTS which was called 17389 times, avg 5µs/call: # 9353 times (38.2ms+11.0ms) by Perl::Critic::Utils::McCabe::_count_logic_keywords at line 113 of Perl/Critic/Utils/McCabe.pm, avg 5µs/call # 7354 times (25.2ms+8.62ms) by Perl::Critic::Utils::McCabe::_count_logic_operators at line 130 of Perl/Critic/Utils/McCabe.pm, avg 5µs/call # 527 times (773µs+0s) by Perl::Critic::Exception::Parse::BEGIN@18 at line 655 of Perl/Critic/Utils.pm, avg 1µs/call # 77 times (200µs+0s) by Perl::Critic::Utils::is_perl_bareword at line 379 of Perl/Critic/Utils.pm, avg 3µs/call # 77 times (119µs+0s) by Perl::Critic::Utils::is_perl_filehandle at line 422 of Perl/Critic/Utils.pm, avg 2µs/call # once (3µs+0s) by Perl::Critic::Utils::is_valid_numeric_verbosity at line 1038 of Perl/Critic/Utils.pm
sub EXISTS {
23173893.44ms my $self = shift;
2417389640µs my $key = shift;
251738954.6ms1670719.6ms return exists $self->{$key};
# spent 19.6ms making 16707 calls to PPI::Token::content, avg 1µs/call
26}
27
28
# spent 15µs within Readonly::Hash::FIRSTKEY which was called 5 times, avg 3µs/call: # once (4µs+0s) by Perl::Critic::Exception::Parse::BEGIN@18 at line 477 of Perl/Critic/Utils.pm # once (4µs+0s) by Perl::Critic::Policy::ControlStructures::ProhibitPostfixControls::supported_parameters at line 37 of Perl/Critic/Policy/ControlStructures/ProhibitPostfixControls.pm # once (3µs+0s) by Module::Pluggable::Object::_require at line 34 of Perl/Critic/Policy/RegularExpressions/ProhibitUnusedCapture.pm # once (2µs+0s) by Perl::Critic::Policy::Documentation::RequirePodSections::supported_parameters at line 205 of Perl/Critic/Policy/Documentation/RequirePodSections.pm # once (2µs+0s) by Perl::Critic::Exception::Parse::BEGIN@18 at line 1060 of Perl/Critic/Utils.pm
sub FIRSTKEY {
2952µs my $self = shift;
3054µs my $dummy = keys %$self;
31518µs return scalar each %$self;
32}
33
34
# spent 52µs within Readonly::Hash::NEXTKEY which was called 47 times, avg 1µs/call: # 29 times (30µs+0s) by Perl::Critic::Exception::Parse::BEGIN@18 at line 477 of Perl/Critic/Utils.pm, avg 1µs/call # 7 times (9µs+0s) by Perl::Critic::Policy::ControlStructures::ProhibitPostfixControls::supported_parameters at line 37 of Perl/Critic/Policy/ControlStructures/ProhibitPostfixControls.pm, avg 1µs/call # 5 times (6µs+0s) by Perl::Critic::Exception::Parse::BEGIN@18 at line 1060 of Perl/Critic/Utils.pm, avg 1µs/call # 4 times (4µs+0s) by Perl::Critic::Policy::Documentation::RequirePodSections::supported_parameters at line 205 of Perl/Critic/Policy/Documentation/RequirePodSections.pm, avg 1µs/call # 2 times (3µs+0s) by Module::Pluggable::Object::_require at line 34 of Perl/Critic/Policy/RegularExpressions/ProhibitUnusedCapture.pm, avg 1µs/call
sub NEXTKEY {
35476µs my $self = shift;
364782µs return scalar each %$self;
37}
3816µs*STORE = *DELETE = *CLEAR = *UNTIE = sub { Readonly::croak $Readonly::MODIFY};
 
# spent 171µs within Readonly::Hash::CORE:match which was called 157 times, avg 1µs/call: # 157 times (171µs+0s) by Readonly::Hash::TIEHASH at line 7, avg 1µs/call
sub Readonly::Hash::CORE:match; # opcode