Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/PolicyParameter/Behavior/Boolean.pm |
Statements | Executed 226 statements in 489µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
20 | 1 | 1 | 256µs | 527µs | _parse | Perl::Critic::PolicyParameter::Behavior::Boolean::
20 | 1 | 1 | 87µs | 131µs | initialize_parameter | Perl::Critic::PolicyParameter::Behavior::Boolean::
1 | 1 | 1 | 15µs | 15µs | BEGIN@10 | Perl::Critic::PolicyParameter::Behavior::Boolean::
1 | 1 | 1 | 12µs | 962µs | BEGIN@13 | Perl::Critic::PolicyParameter::Behavior::Boolean::
1 | 1 | 1 | 8µs | 62µs | BEGIN@15 | Perl::Critic::PolicyParameter::Behavior::Boolean::
1 | 1 | 1 | 7µs | 18µs | BEGIN@11 | Perl::Critic::PolicyParameter::Behavior::Boolean::
1 | 1 | 1 | 7µs | 10µs | BEGIN@12 | Perl::Critic::PolicyParameter::Behavior::Boolean::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | ############################################################################## | ||||
2 | # $URL$ | ||||
3 | # $Date$ | ||||
4 | # $Author$ | ||||
5 | # $Revision$ | ||||
6 | ############################################################################## | ||||
7 | |||||
8 | package Perl::Critic::PolicyParameter::Behavior::Boolean; | ||||
9 | |||||
10 | 2 | 39µs | 1 | 15µs | # spent 15µs within Perl::Critic::PolicyParameter::Behavior::Boolean::BEGIN@10 which was called:
# once (15µs+0s) by Perl::Critic::PolicyParameter::BEGIN@24 at line 10 # spent 15µs making 1 call to Perl::Critic::PolicyParameter::Behavior::Boolean::BEGIN@10 |
11 | 2 | 19µs | 2 | 29µs | # spent 18µs (7+11) within Perl::Critic::PolicyParameter::Behavior::Boolean::BEGIN@11 which was called:
# once (7µs+11µs) by Perl::Critic::PolicyParameter::BEGIN@24 at line 11 # spent 18µs making 1 call to Perl::Critic::PolicyParameter::Behavior::Boolean::BEGIN@11
# spent 11µs making 1 call to strict::import |
12 | 2 | 17µs | 2 | 14µs | # spent 10µs (7+4) within Perl::Critic::PolicyParameter::Behavior::Boolean::BEGIN@12 which was called:
# once (7µs+4µs) by Perl::Critic::PolicyParameter::BEGIN@24 at line 12 # spent 10µs making 1 call to Perl::Critic::PolicyParameter::Behavior::Boolean::BEGIN@12
# spent 4µs making 1 call to warnings::import |
13 | 2 | 26µs | 2 | 1.91ms | # spent 962µs (12+950) within Perl::Critic::PolicyParameter::Behavior::Boolean::BEGIN@13 which was called:
# once (12µs+950µs) by Perl::Critic::PolicyParameter::BEGIN@24 at line 13 # spent 962µs making 1 call to Perl::Critic::PolicyParameter::Behavior::Boolean::BEGIN@13
# spent 950µs making 1 call to Exporter::import |
14 | |||||
15 | 2 | 128µs | 2 | 62µs | # spent 62µs (8+54) within Perl::Critic::PolicyParameter::Behavior::Boolean::BEGIN@15 which was called:
# once (8µs+54µs) by Perl::Critic::PolicyParameter::BEGIN@24 at line 15 # spent 62µs making 1 call to Perl::Critic::PolicyParameter::Behavior::Boolean::BEGIN@15
# spent 54µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 54µs |
16 | |||||
17 | 1 | 500ns | our $VERSION = '1.121'; | ||
18 | |||||
19 | #----------------------------------------------------------------------------- | ||||
20 | |||||
21 | # spent 527µs (256+271) within Perl::Critic::PolicyParameter::Behavior::Boolean::_parse which was called 20 times, avg 26µs/call:
# 20 times (256µs+271µs) by Perl::Critic::PolicyParameter::parse_and_validate_config_value at line 231 of Perl/Critic/PolicyParameter.pm, avg 26µs/call | ||||
22 | 20 | 6µs | my ($policy, $parameter, $config_string) = @_; | ||
23 | |||||
24 | 20 | 1µs | my $value; | ||
25 | 20 | 26µs | 20 | 28µs | my $value_string = $parameter->get_default_string(); # spent 28µs making 20 calls to Perl::Critic::PolicyParameter::get_default_string, avg 1µs/call |
26 | |||||
27 | 20 | 3µs | if (defined $config_string) { | ||
28 | $value_string = $config_string; | ||||
29 | } | ||||
30 | |||||
31 | 20 | 20µs | 6 | 7µs | if ( $value_string ) { # spent 7µs making 6 calls to Readonly::Scalar::FETCH, avg 1µs/call |
32 | $value = $TRUE; | ||||
33 | } else { | ||||
34 | 14 | 29µs | 14 | 16µs | $value = $FALSE; # spent 16µs making 14 calls to Readonly::Scalar::FETCH, avg 1µs/call |
35 | } | ||||
36 | |||||
37 | 20 | 57µs | 20 | 221µs | $policy->__set_parameter_value($parameter, $value); # spent 221µs making 20 calls to Perl::Critic::Policy::__set_parameter_value, avg 11µs/call |
38 | |||||
39 | 20 | 38µs | return; | ||
40 | } | ||||
41 | |||||
42 | #----------------------------------------------------------------------------- | ||||
43 | |||||
44 | # spent 131µs (87+44) within Perl::Critic::PolicyParameter::Behavior::Boolean::initialize_parameter which was called 20 times, avg 7µs/call:
# 20 times (87µs+44µs) by Perl::Critic::PolicyParameter::_initialize_from_behavior at line 115 of Perl/Critic/PolicyParameter.pm, avg 7µs/call | ||||
45 | 20 | 6µs | my ($self, $parameter, $specification) = @_; | ||
46 | |||||
47 | 20 | 28µs | 20 | 44µs | $parameter->_set_parser(\&_parse); # spent 44µs making 20 calls to Perl::Critic::PolicyParameter::_set_parser, avg 2µs/call |
48 | |||||
49 | 20 | 43µs | return; | ||
50 | } | ||||
51 | |||||
52 | #----------------------------------------------------------------------------- | ||||
53 | |||||
54 | 1 | 2µs | 1; | ||
55 | |||||
56 | __END__ |