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

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/Subroutines/ProhibitReturnSort.pm
StatementsExecuted 36099 statements in 60.6ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
134811179.5ms630msPerl::Critic::Policy::Subroutines::ProhibitReturnSort::::violatesPerl::Critic::Policy::Subroutines::ProhibitReturnSort::violates
14411303µs303µsPerl::Critic::Policy::Subroutines::ProhibitReturnSort::::applies_toPerl::Critic::Policy::Subroutines::ProhibitReturnSort::applies_to
11116µs16µsPerl::Critic::Policy::Subroutines::ProhibitReturnSort::::BEGIN@10Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@10
1118µs28µsPerl::Critic::Policy::Subroutines::ProhibitReturnSort::::BEGIN@13Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@13
1118µs389µsPerl::Critic::Policy::Subroutines::ProhibitReturnSort::::BEGIN@15Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@15
1118µs19µsPerl::Critic::Policy::Subroutines::ProhibitReturnSort::::BEGIN@11Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@11
1118µs11µsPerl::Critic::Policy::Subroutines::ProhibitReturnSort::::BEGIN@12Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@12
1117µs58µsPerl::Critic::Policy::Subroutines::ProhibitReturnSort::::BEGIN@16Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@16
1116µs7µsPerl::Critic::Policy::Subroutines::ProhibitReturnSort::::default_severityPerl::Critic::Policy::Subroutines::ProhibitReturnSort::default_severity
1112µs2µsPerl::Critic::Policy::Subroutines::ProhibitReturnSort::::supported_parametersPerl::Critic::Policy::Subroutines::ProhibitReturnSort::supported_parameters
0000s0sPerl::Critic::Policy::Subroutines::ProhibitReturnSort::::default_themesPerl::Critic::Policy::Subroutines::ProhibitReturnSort::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::Subroutines::ProhibitReturnSort;
9
10243µs116µs
# spent 16µs within Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@10 which was called: # once (16µs+0s) by Module::Pluggable::Object::_require at line 10
use 5.006001;
11220µs230µs
# spent 19µs (8+11) within Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@11 which was called: # once (8µs+11µs) by Module::Pluggable::Object::_require at line 11
use strict;
# spent 19µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@11 # spent 11µs making 1 call to strict::import
12221µs215µs
# spent 11µs (8+4) within Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@12 which was called: # once (8µs+4µs) by Module::Pluggable::Object::_require at line 12
use warnings;
# spent 11µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@12 # spent 4µs making 1 call to warnings::import
13226µs248µs
# spent 28µs (8+20) within Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@13 which was called: # once (8µs+20µs) by Module::Pluggable::Object::_require at line 13
use Readonly;
# spent 28µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@13 # spent 20µs making 1 call to Exporter::import
14
15224µs2770µs
# spent 389µs (8+381) within Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@15 which was called: # once (8µs+381µs) by Module::Pluggable::Object::_require at line 15
use Perl::Critic::Utils qw{ :severities :classification };
# spent 389µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitReturnSort::BEGIN@15 # spent 381µs making 1 call to Exporter::import
162156µs2108µs
# spent 58µs (7+50) within Perl::Critic::Policy::Subroutines::ProhibitReturnSort::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::Subroutines::ProhibitReturnSort::BEGIN@16 # spent 50µs making 1 call to base::import
17
181600nsour $VERSION = '1.121';
19
20#-----------------------------------------------------------------------------
21
2212µs128µsReadonly::Scalar my $DESC => q{"return" statement followed by "sort"};
# spent 28µs making 1 call to Readonly::Scalar
231900ns120µsReadonly::Scalar my $EXPL => q{Behavior is undefined if called in scalar context};
# spent 20µs making 1 call to Readonly::Scalar
24
25#-----------------------------------------------------------------------------
26
2714µs
# spent 2µs within Perl::Critic::Policy::Subroutines::ProhibitReturnSort::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 () }
2812µs
# spent 7µs (6+1) within Perl::Critic::Policy::Subroutines::ProhibitReturnSort::default_severity which was called: # once (6µs+1µs) by Perl::Critic::Policy::get_severity at line 331 of Perl/Critic/Policy.pm
sub default_severity { return $SEVERITY_HIGHEST }
29sub default_themes { return qw(core bugs certrule ) }
30144423µs
# spent 303µs within Perl::Critic::Policy::Subroutines::ProhibitReturnSort::applies_to which was called 144 times, avg 2µs/call: # 144 times (303µs+0s) by Perl::Critic::_critique at line 165 of Perl/Critic.pm, avg 2µs/call
sub applies_to { return 'PPI::Token::Word' }
31
32#-----------------------------------------------------------------------------
33
34
# spent 630ms (79.5+551) within Perl::Critic::Policy::Subroutines::ProhibitReturnSort::violates which was called 13481 times, avg 47µs/call: # 13481 times (79.5ms+551ms) by Perl::Critic::_critique at line 183 of Perl/Critic.pm, avg 47µs/call
sub violates {
35134813.26ms my ( $self, $elem, undef ) = @_;
361348134.7ms13481257ms return if ($elem ne 'return');
# spent 257ms making 13481 calls to PPI::Element::__ne, avg 19µs/call
3721012.21ms2101224ms return if is_hash_key($elem);
# spent 224ms making 2101 calls to Perl::Critic::Utils::is_hash_key, avg 106µs/call
38
3921012.31ms210155.5ms my $sib = $elem->snext_sibling();
# spent 55.5ms making 2101 calls to PPI::Element::snext_sibling, avg 26µs/call
4021017.45ms20991.24ms return if !$sib;
# spent 1.24ms making 2099 calls to PPI::Util::TRUE, avg 592ns/call
4120998.25ms20992.64ms return if !$sib->isa('PPI::Token::Word');
# spent 1.91ms making 1944 calls to UNIVERSAL::isa, avg 981ns/call # spent 732µs making 155 calls to PPI::Structure::List::isa, avg 5µs/call
425731.69ms57311.3ms return if $sib ne 'sort';
# spent 11.3ms making 573 calls to PPI::Element::__ne, avg 20µs/call
43
44 # Must be 'return sort'
45 return $self->violation( $DESC, $EXPL, $elem );
46}
47
4813µs1;
49
50__END__