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

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/BuiltinFunctions/ProhibitSleepViaSelect.pm
StatementsExecuted 27125 statements in 45.7ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
134811149.5ms305msPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::::violatesPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::violates
14411320µs320µsPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::::applies_toPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::applies_to
11117µs17µsPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::::BEGIN@10Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@10
11110µs15µsPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::::BEGIN@12Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@12
1117µs18µsPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::::BEGIN@11Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@11
1117µs28µsPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::::BEGIN@13Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@13
1117µs428µsPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::::BEGIN@15Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@15
1117µs58µsPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::::BEGIN@16Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@16
1117µs8µsPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::::default_severityPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::default_severity
1112µs2µsPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::::supported_parametersPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::supported_parameters
0000s0sPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::::default_themesPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::default_themes
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1##############################################################################
2# $URL$
3# $Date$
4# $Author$
5# $Revision$
6##############################################################################
7
8package Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect;
9
10245µs117µs
# spent 17µs within Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@10 which was called: # once (17µs+0s) by Module::Pluggable::Object::_require at line 10
use 5.006001;
11221µs230µs
# spent 18µs (7+11) within Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@11 which was called: # once (7µs+11µs) by Module::Pluggable::Object::_require at line 11
use strict;
# spent 18µs making 1 call to Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@11 # spent 11µs making 1 call to strict::import
12220µs219µs
# spent 15µs (10+5) within Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@12 which was called: # once (10µs+5µs) by Module::Pluggable::Object::_require at line 12
use warnings;
# spent 15µs making 1 call to Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@12 # spent 4µs making 1 call to warnings::import
13223µs248µs
# spent 28µs (7+21) within Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@13 which was called: # once (7µs+21µs) by Module::Pluggable::Object::_require at line 13
use Readonly;
# spent 28µs making 1 call to Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@13 # spent 21µs making 1 call to Exporter::import
14
15224µs2848µs
# spent 428µs (7+421) within Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@15 which was called: # once (7µs+421µs) by Module::Pluggable::Object::_require at line 15
use Perl::Critic::Utils qw{ :severities :classification :ppi };
# spent 428µs making 1 call to Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@15 # spent 421µs making 1 call to Exporter::import
162188µs2108µs
# spent 58µs (7+50) within Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@16 which was called: # once (7µs+50µs) by Module::Pluggable::Object::_require at line 16
use base 'Perl::Critic::Policy';
# spent 58µs making 1 call to Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::BEGIN@16 # spent 50µs making 1 call to base::import
17
181500nsour $VERSION = '1.121';
19
20#-----------------------------------------------------------------------------
21
2212µs129µsReadonly::Scalar my $DESC => q{"select" used to emulate "sleep"};
# spent 29µs making 1 call to Readonly::Scalar
2312µs142µsReadonly::Scalar my $EXPL => [168];
# spent 42µs making 1 call to Readonly::Scalar
241800ns120µsReadonly::Scalar my $SELECT_ARGUMENT_COUNT => 4;
# spent 20µs making 1 call to Readonly::Scalar
25
26#-----------------------------------------------------------------------------
27
2814µs
# spent 2µs within Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::supported_parameters which was called: # once (2µs+0s) by Perl::Critic::Policy::new at line 88 of Perl/Critic/Policy.pm
sub supported_parameters { return () }
2912µs
# spent 8µs (7+1) within Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::default_severity which was called: # once (7µs+1µs) by Perl::Critic::Policy::get_severity at line 331 of Perl/Critic/Policy.pm
sub default_severity { return $SEVERITY_HIGHEST }
30sub default_themes { return qw( core pbp bugs ) }
31144416µs
# spent 320µs within Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::applies_to which was called 144 times, avg 2µs/call: # 144 times (320µs+0s) by Perl::Critic::_critique at line 165 of Perl/Critic.pm, avg 2µs/call
sub applies_to { return 'PPI::Token::Word' }
32
33#-----------------------------------------------------------------------------
34
35
# spent 305ms (49.5+255) within Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect::violates which was called 13481 times, avg 23µs/call: # 13481 times (49.5ms+255ms) by Perl::Critic::_critique at line 183 of Perl/Critic.pm, avg 23µs/call
sub violates {
36134813.03ms my ($self, $elem, undef) = @_;
37
381348142.0ms13481255ms return if ($elem ne 'select');
# spent 255ms making 13481 calls to PPI::Element::__ne, avg 19µs/call
39 return if ! is_function_call($elem);
40
41 my @arguments = parse_arg_list($elem);
42 return if $SELECT_ARGUMENT_COUNT != @arguments;
43
44 foreach my $argument ( @arguments[0..2] ) {
45 return if $argument->[0] ne 'undef';
46 }
47
48 if ( $arguments[-1]->[0] ne 'undef' ) {
49 return $self->violation( $DESC, $EXPL, $elem );
50 }
51
52 return; #ok!
53}
54
5513µs1;
56
57__END__