Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Path/IsDev/Result.pm |
Statements | Executed 4146 statements in 8.00ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
338 | 4 | 3 | 7.17ms | 14.6ms | add_reason | Path::IsDev::Result::
338 | 1 | 1 | 548µs | 548µs | _debug | Path::IsDev::Result::
11 | 1 | 1 | 227µs | 721µs | BUILD | Path::IsDev::Result::
11 | 1 | 1 | 84µs | 97µs | CORE:ftis (opcode) | Path::IsDev::Result::
1 | 1 | 1 | 15µs | 15µs | BEGIN@1 | Path::IsDev::Object::
11 | 1 | 1 | 13µs | 13µs | __ANON__[:54] | Path::IsDev::Result::
1 | 1 | 1 | 9µs | 246µs | BEGIN@54 | Path::IsDev::Result::
1 | 1 | 1 | 7µs | 8µs | BEGIN@4 | Path::IsDev::Object::
1 | 1 | 1 | 7µs | 10µs | BEGIN@3 | Path::IsDev::Object::
1 | 1 | 1 | 6µs | 18µs | BEGIN@2 | Path::IsDev::Object::
0 | 0 | 0 | 0s | 0s | _croak | Path::IsDev::Result::
0 | 0 | 0 | 0s | 0s | _path | Path::IsDev::Result::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 2 | 41µs | 1 | 15µ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 # spent 15µs making 1 call to Path::IsDev::Object::BEGIN@1 |
2 | 2 | 19µs | 2 | 29µ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 # spent 18µs making 1 call to Path::IsDev::Object::BEGIN@2
# spent 11µs making 1 call to strict::import |
3 | 2 | 18µs | 2 | 14µ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 # spent 10µs making 1 call to Path::IsDev::Object::BEGIN@3
# spent 4µs making 1 call to warnings::import |
4 | 2 | 70µs | 2 | 10µ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 # spent 8µs making 1 call to Path::IsDev::Object::BEGIN@4
# spent 1µs making 1 call to utf8::import |
5 | |||||
6 | package Path::IsDev::Result; | ||||
7 | 1 | 500ns | $Path::IsDev::Result::VERSION = '1.001000'; | ||
8 | # ABSTRACT: Result container | ||||
9 | |||||
10 | 1 | 200ns | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | ||
11 | |||||
- - | |||||
54 | 13 | 283µs | 2 | 482µ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 # spent 246µs making 1 call to Path::IsDev::Result::BEGIN@54
# spent 236µs making 1 call to Class::Tiny::import |
55 | |||||
56 | sub _path { require Path::Tiny; goto &Path::Tiny::path } | ||||
57 | sub _croak { require Carp; goto &Carp::croak } | ||||
58 | ## no critic (Subroutines::ProhibitCallsToUnexportedSubs) | ||||
59 | 1014 | 1.08ms | 338 | 1.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 # 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 | ||||
66 | 11 | 2µs | my ( $self, ) = @_; | ||
67 | 11 | 43µs | 22 | 23µ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 | } | ||||
70 | 11 | 17µs | 11 | 15µ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 | } | ||||
73 | 11 | 108µs | 33 | 123µ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 | } | ||||
76 | 11 | 44µs | 33 | 347µ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 |
77 | 11 | 26µ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 | ||||
112 | 338 | 149µs | my ( $self, $heuristic_name, $heuristic_result, $summary, $context ) = @_; | ||
113 | 338 | 205µs | my $name = $heuristic_name; | ||
114 | 338 | 1.53ms | 676 | 3.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 | } | ||||
117 | 338 | 545µs | 338 | 548µ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); | ||||
120 | 338 | 34µs | my ($heuristic_type); | ||
121 | |||||
122 | 338 | 1.46ms | 676 | 795µ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 ) : () ), | ||||
130 | 338 | 1.16ms | %{ $context || {} }, | ||
131 | }; | ||||
132 | 338 | 485µs | 338 | 695µs | push @{ $self->reasons }, $reason; # spent 695µs making 338 calls to Path::IsDev::Result::reasons, avg 2µs/call |
133 | 338 | 685µs | return $self; | ||
134 | } | ||||
135 | |||||
136 | 1 | 2µs | 1; | ||
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 |