← 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