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

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Path/IsDev/Result.pm
StatementsExecuted 4146 statements in 8.00ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
338437.17ms14.6msPath::IsDev::Result::::add_reasonPath::IsDev::Result::add_reason
33811548µs548µsPath::IsDev::Result::::_debugPath::IsDev::Result::_debug
1111227µs721µsPath::IsDev::Result::::BUILDPath::IsDev::Result::BUILD
111184µs97µsPath::IsDev::Result::::CORE:ftisPath::IsDev::Result::CORE:ftis (opcode)
11115µs15µsPath::IsDev::Object::::BEGIN@1Path::IsDev::Object::BEGIN@1
111113µs13µsPath::IsDev::Result::::__ANON__[:54]Path::IsDev::Result::__ANON__[:54]
1119µs246µsPath::IsDev::Result::::BEGIN@54Path::IsDev::Result::BEGIN@54
1117µs8µsPath::IsDev::Object::::BEGIN@4Path::IsDev::Object::BEGIN@4
1117µs10µsPath::IsDev::Object::::BEGIN@3Path::IsDev::Object::BEGIN@3
1116µs18µsPath::IsDev::Object::::BEGIN@2Path::IsDev::Object::BEGIN@2
0000s0sPath::IsDev::Result::::_croakPath::IsDev::Result::_croak
0000s0sPath::IsDev::Result::::_pathPath::IsDev::Result::_path
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1241µs115µs
# spent 15µs within Path::IsDev::Object::BEGIN@1 which was called: # once (15µs+0s) by Path::IsDev::Object::_matches at line 1
use 5.008;
# spent 15µs making 1 call to Path::IsDev::Object::BEGIN@1
2219µs229µs
# spent 18µs (6+11) within Path::IsDev::Object::BEGIN@2 which was called: # once (6µs+11µs) by Path::IsDev::Object::_matches at line 2
use strict;
# spent 18µs making 1 call to Path::IsDev::Object::BEGIN@2 # spent 11µs making 1 call to strict::import
3218µs214µs
# spent 10µs (7+4) within Path::IsDev::Object::BEGIN@3 which was called: # once (7µs+4µs) by Path::IsDev::Object::_matches at line 3
use warnings;
# spent 10µs making 1 call to Path::IsDev::Object::BEGIN@3 # spent 4µs making 1 call to warnings::import
4270µs210µs
# spent 8µs (7+1) within Path::IsDev::Object::BEGIN@4 which was called: # once (7µs+1µs) by Path::IsDev::Object::_matches at line 4
use utf8;
# spent 8µs making 1 call to Path::IsDev::Object::BEGIN@4 # spent 1µs making 1 call to utf8::import
5
6package Path::IsDev::Result;
71500ns$Path::IsDev::Result::VERSION = '1.001000';
8# ABSTRACT: Result container
9
101200nsour $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
11
- -
5413283µs2482µs
# spent 13µs within Path::IsDev::Result::__ANON__[/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Path/IsDev/Result.pm:54] which was called 11 times, avg 1µs/call: # 11 times (13µs+0s) by Path::IsDev::Result::reasons at line 1 of (eval 292)[Class/Tiny.pm:56], avg 1µs/call # spent 246µs (9+236) within Path::IsDev::Result::BEGIN@54 which was called: # once (9µs+236µs) by Path::IsDev::Object::_matches at line 54
use Class::Tiny 'path', 'result', { reasons => sub { [] }, };
# spent 246µs making 1 call to Path::IsDev::Result::BEGIN@54 # spent 236µs making 1 call to Class::Tiny::import
55
56sub _path { require Path::Tiny; goto &Path::Tiny::path }
57sub _croak { require Carp; goto &Carp::croak }
58## no critic (Subroutines::ProhibitCallsToUnexportedSubs)
5910141.08ms3381.48ms
# spent 548µs within Path::IsDev::Result::_debug which was called 338 times, avg 2µs/call: # 338 times (548µs+0s) by Path::IsDev::Result::add_reason at line 117, avg 2µs/call
sub _debug { require Path::IsDev; shift; goto &Path::IsDev::debug }
# spent 1.48ms making 338 calls to Path::IsDev::Object::__ANON__[Path/IsDev/Object.pm:156], avg 4µs/call
60
- -
65
# spent 721µs (227+494) within Path::IsDev::Result::BUILD which was called 11 times, avg 66µs/call: # 11 times (227µs+494µs) by Class::Tiny::Object::new at line 126 of Class/Tiny.pm, avg 66µs/call
sub BUILD {
66112µs my ( $self, ) = @_;
671143µs2223µs if ( not $self->path ) {
# spent 16µs making 11 calls to Path::IsDev::Result::path, avg 1µs/call # spent 7µs making 11 calls to Path::Tiny::__ANON__, avg 655ns/call
68 return _croak(q[<path> is a mandatory parameter]);
69 }
701117µs1115µs if ( not ref $self->path ) {
# spent 15µs making 11 calls to Path::IsDev::Result::path, avg 1µs/call
71 $self->path( _path( $self->path ) );
72 }
7311108µs33123µs if ( not -e $self->path ) {
# spent 97µs making 11 calls to Path::IsDev::Result::CORE:ftis, avg 9µs/call # spent 14µs making 11 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 1µs/call # spent 12µs making 11 calls to Path::IsDev::Result::path, avg 1µs/call
74 return _croak(q[<path> parameter must exist for heuristics to be performed]);
75 }
761144µs33347µs $self->path( $self->path->absolute );
# spent 308µs making 11 calls to Path::Tiny::absolute, avg 28µs/call # spent 39µs making 22 calls to Path::IsDev::Result::path, avg 2µs/call
771126µs return $self;
78}
79
- -
111
# spent 14.6ms (7.17+7.42) within Path::IsDev::Result::add_reason which was called 338 times, avg 43µs/call: # 137 times (2.85ms+3.02ms) by Path::IsDev::Role::Matcher::Child::Exists::Any::child_exists at line 47 of Path/IsDev/Role/Matcher/Child/Exists/Any.pm, avg 43µs/call # 110 times (2.38ms+2.42ms) by Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::_this_child_matchregexp at line 49 of Path/IsDev/Role/Matcher/Child/BaseName/MatchRegexp.pm, avg 44µs/call # 89 times (1.90ms+1.94ms) by Path::IsDev::Role::Matcher::FullPath::Is::Any::_fullpath_is at line 67 of Path/IsDev/Role/Matcher/FullPath/Is/Any.pm, avg 43µs/call # 2 times (42µs+43µs) by Path::IsDev::Role::Matcher::FullPath::Is::Any::_fullpath_is at line 71 of Path/IsDev/Role/Matcher/FullPath/Is/Any.pm, avg 42µs/call
sub add_reason {
112338149µs my ( $self, $heuristic_name, $heuristic_result, $summary, $context ) = @_;
113338205µs my $name = $heuristic_name;
1143381.53ms6763.90ms if ( $name->can('name') ) {
# spent 2.39ms making 236 calls to Path::IsDev::Role::Heuristic::name, avg 10µs/call # spent 1.06ms making 102 calls to Path::IsDev::Role::NegativeHeuristic::name, avg 10µs/call # spent 445µs making 338 calls to UNIVERSAL::can, avg 1µs/call
115 $name = $name->name;
116 }
117338545µs338548µs $self->_debug("$name => $heuristic_result : $summary ");
# spent 548µs making 338 calls to Path::IsDev::Result::_debug, avg 2µs/call
118
119 # $self->_debug( " > " . $_) for _pp($context);
12033834µs my ($heuristic_type);
121
1223381.46ms676795µs if ( $heuristic_name->can(q[heuristic_type]) ) {
# spent 430µs making 338 calls to UNIVERSAL::can, avg 1µs/call # spent 259µs making 236 calls to Path::IsDev::Role::Heuristic::heuristic_type, avg 1µs/call # spent 106µs making 102 calls to Path::IsDev::Role::NegativeHeuristic::heuristic_type, avg 1µs/call
123 $heuristic_type = $heuristic_name->heuristic_type;
124 }
125
126 my $reason = {
127 heuristic => $heuristic_name,
128 result => $heuristic_result,
129 ( defined $heuristic_type ? ( type => $heuristic_type ) : () ),
1303381.16ms %{ $context || {} },
131 };
132338485µs338695µs push @{ $self->reasons }, $reason;
# spent 695µs making 338 calls to Path::IsDev::Result::reasons, avg 2µs/call
133338685µs return $self;
134}
135
13612µs1;
137
138__END__
 
# spent 97µs (84+14) within Path::IsDev::Result::CORE:ftis which was called 11 times, avg 9µs/call: # 11 times (84µs+14µs) by Path::IsDev::Result::BUILD at line 73, avg 9µs/call
sub Path::IsDev::Result::CORE:ftis; # opcode