| Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Path/IsDev/Role/Matcher/FullPath/Is/Any.pm |
| Statements | Executed 1733 statements in 3.67ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 91 | 1 | 1 | 7.48ms | 18.0ms | Path::IsDev::Role::Matcher::FullPath::Is::Any::_fullpath_is |
| 91 | 1 | 1 | 460µs | 896µs | Path::IsDev::Role::Matcher::FullPath::Is::Any::_path |
| 21 | 2 | 2 | 457µs | 19.3ms | Path::IsDev::Role::Matcher::FullPath::Is::Any::fullpath_is_any |
| 1 | 1 | 1 | 17µs | 17µs | Role::Tiny::BEGIN@1.41 |
| 1 | 1 | 1 | 16µs | 20µs | Role::Tiny::BEGIN@3.43 |
| 1 | 1 | 1 | 10µs | 12µs | Role::Tiny::BEGIN@4.44 |
| 1 | 1 | 1 | 7µs | 23µs | Role::Tiny::BEGIN@2.42 |
| 1 | 1 | 1 | 7µs | 85µs | Path::IsDev::Role::Matcher::FullPath::Is::Any::BEGIN@18 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | 2 | 40µs | 1 | 17µs | # spent 17µs within Role::Tiny::BEGIN@1.41 which was called:
# once (17µs+0s) by Role::Tiny::_load_module at line 1 # spent 17µs making 1 call to Role::Tiny::BEGIN@1.41 |
| 2 | 2 | 20µs | 2 | 38µs | # spent 23µs (7+15) within Role::Tiny::BEGIN@2.42 which was called:
# once (7µs+15µs) by Role::Tiny::_load_module at line 2 # spent 23µs making 1 call to Role::Tiny::BEGIN@2.42
# spent 15µs making 1 call to strict::import |
| 3 | 2 | 18µs | 2 | 24µs | # spent 20µs (16+4) within Role::Tiny::BEGIN@3.43 which was called:
# once (16µs+4µs) by Role::Tiny::_load_module at line 3 # spent 20µs making 1 call to Role::Tiny::BEGIN@3.43
# spent 4µs making 1 call to warnings::import |
| 4 | 2 | 80µs | 2 | 13µs | # spent 12µs (10+1) within Role::Tiny::BEGIN@4.44 which was called:
# once (10µs+1µs) by Role::Tiny::_load_module at line 4 # spent 12µs making 1 call to Role::Tiny::BEGIN@4.44
# spent 1µs making 1 call to utf8::import |
| 5 | |||||
| 6 | package Path::IsDev::Role::Matcher::FullPath::Is::Any; | ||||
| 7 | 1 | 600ns | $Path::IsDev::Role::Matcher::FullPath::Is::Any::VERSION = '1.001000'; | ||
| 8 | # ABSTRACT: Match if the current directory is the same directory from a list of absolute paths. | ||||
| 9 | |||||
| 10 | 1 | 200ns | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | ||
| 11 | |||||
| 12 | # spent 896µs (460+436) within Path::IsDev::Role::Matcher::FullPath::Is::Any::_path which was called 91 times, avg 10µs/call:
# 91 times (460µs+436µs) by Path::IsDev::Role::Matcher::FullPath::Is::Any::_fullpath_is at line 50, avg 10µs/call | ||||
| 13 | 91 | 17µs | require Path::Tiny; | ||
| 14 | 91 | 752µs | 91 | 436µs | Path::Tiny->VERSION('0.004'); # spent 436µs making 91 calls to UNIVERSAL::VERSION, avg 5µs/call |
| 15 | 91 | 270µs | 91 | 1.37ms | goto &Path::Tiny::path; # spent 1.37ms making 91 calls to Path::Tiny::path, avg 15µs/call |
| 16 | } | ||||
| 17 | |||||
| 18 | 2 | 245µs | 2 | 163µs | # spent 85µs (7+78) within Path::IsDev::Role::Matcher::FullPath::Is::Any::BEGIN@18 which was called:
# once (7µs+78µs) by Role::Tiny::_load_module at line 18 # spent 85µs making 1 call to Path::IsDev::Role::Matcher::FullPath::Is::Any::BEGIN@18
# spent 78µs making 1 call to Role::Tiny::import |
| 19 | |||||
| - - | |||||
| 41 | # spent 18.0ms (7.48+10.5) within Path::IsDev::Role::Matcher::FullPath::Is::Any::_fullpath_is which was called 91 times, avg 198µs/call:
# 91 times (7.48ms+10.5ms) by Path::IsDev::Role::Matcher::FullPath::Is::Any::fullpath_is_any at line 91, avg 198µs/call | ||||
| 42 | 91 | 35µs | my ( $self, $result_object, $this, $comparator ) = @_; | ||
| 43 | |||||
| 44 | 91 | 28µs | my $context = {}; | ||
| 45 | |||||
| 46 | 91 | 55µs | $context->{tests} = []; | ||
| 47 | |||||
| 48 | 91 | 42µs | $context->{test_path} = "$comparator"; | ||
| 49 | |||||
| 50 | 91 | 90µs | 91 | 896µs | my $path = _path($comparator); # spent 896µs making 91 calls to Path::IsDev::Role::Matcher::FullPath::Is::Any::_path, avg 10µs/call |
| 51 | |||||
| 52 | 91 | 109µs | 91 | 635µs | if ( not $path->exists ) { # spent 635µs making 91 calls to Path::Tiny::exists, avg 7µs/call |
| 53 | push @{ $context->{tests} }, { 'test_path_exists?' => 0 }; | ||||
| 54 | $result_object->add_reason( $self, 0, "comparative path $comparator does not exist", $context ); | ||||
| 55 | return; | ||||
| 56 | } | ||||
| 57 | |||||
| 58 | 91 | 118µs | push @{ $context->{tests} }, { 'test_path_exists?' => 1 }; | ||
| 59 | |||||
| 60 | 91 | 108µs | 91 | 3.03ms | my $realpath = $path->realpath; # spent 3.03ms making 91 calls to Path::Tiny::realpath, avg 33µs/call |
| 61 | |||||
| 62 | 91 | 204µs | 91 | 137µs | $context->{source_realpath} = "$this"; # spent 137µs making 91 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 2µs/call |
| 63 | 91 | 147µs | 91 | 109µs | $context->{test_realpath} = "$realpath"; # spent 109µs making 91 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 1µs/call |
| 64 | |||||
| 65 | 91 | 205µs | 182 | 200µs | if ( not $realpath eq $this ) { # spent 200µs making 182 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 1µs/call |
| 66 | 89 | 98µs | push @{ $context->{tests} }, { 'test_realpath_eq_source_realpath?' => 0 }; | ||
| 67 | 89 | 324µs | 267 | 4.04ms | $result_object->add_reason( $self, 0, "$this ne $realpath", $context ); # spent 3.84ms making 89 calls to Path::IsDev::Result::add_reason, avg 43µs/call
# spent 206µs making 178 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 1µs/call |
| 68 | 89 | 312µs | return; | ||
| 69 | } | ||||
| 70 | 2 | 3µs | push @{ $context->{tests} }, { 'test_realpath_eq_source_realpath?' => 1 }; | ||
| 71 | 2 | 9µs | 6 | 89µs | $result_object->add_reason( $self, 1, "$this eq $realpath", $context ); # spent 85µs making 2 calls to Path::IsDev::Result::add_reason, avg 42µs/call
# spent 4µs making 4 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 1µs/call |
| 72 | 2 | 8µs | return 1; | ||
| 73 | } | ||||
| 74 | |||||
| - - | |||||
| 87 | # spent 19.3ms (457µs+18.8) within Path::IsDev::Role::Matcher::FullPath::Is::Any::fullpath_is_any which was called 21 times, avg 918µs/call:
# 11 times (282µs+9.38ms) by Path::IsDev::NegativeHeuristic::HomeDir::excludes at line 71 of Path/IsDev/NegativeHeuristic/HomeDir.pm, avg 878µs/call
# 10 times (175µs+9.45ms) by Path::IsDev::NegativeHeuristic::PerlINC::excludes at line 61 of Path/IsDev/NegativeHeuristic/PerlINC.pm, avg 962µs/call | ||||
| 88 | 21 | 27µs | my ( $self, $result_object, @dirnames ) = @_; | ||
| 89 | 21 | 46µs | 42 | 837µs | my $current = $result_object->path->realpath; # spent 807µs making 21 calls to Path::Tiny::realpath, avg 38µs/call
# spent 30µs making 21 calls to Path::IsDev::Result::path, avg 1µs/call |
| 90 | 21 | 11µs | for my $dirname (@dirnames) { | ||
| 91 | 91 | 184µs | 91 | 18.0ms | return 1 if $self->_fullpath_is( $result_object, $current, $dirname ); # spent 18.0ms making 91 calls to Path::IsDev::Role::Matcher::FullPath::Is::Any::_fullpath_is, avg 198µs/call |
| 92 | } | ||||
| 93 | 19 | 56µs | return; | ||
| 94 | } | ||||
| 95 | |||||
| 96 | 1 | 2µs | 1; | ||
| 97 | |||||
| 98 | __END__ |