← 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/Role/Matcher/FullPath/Is/Any.pm
StatementsExecuted 1733 statements in 3.67ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
91117.48ms18.0msPath::IsDev::Role::Matcher::FullPath::Is::Any::::_fullpath_isPath::IsDev::Role::Matcher::FullPath::Is::Any::_fullpath_is
9111460µs896µsPath::IsDev::Role::Matcher::FullPath::Is::Any::::_pathPath::IsDev::Role::Matcher::FullPath::Is::Any::_path
2122457µs19.3msPath::IsDev::Role::Matcher::FullPath::Is::Any::::fullpath_is_anyPath::IsDev::Role::Matcher::FullPath::Is::Any::fullpath_is_any
11117µs17µsRole::Tiny::::BEGIN@1.41 Role::Tiny::BEGIN@1.41
11116µs20µsRole::Tiny::::BEGIN@3.43 Role::Tiny::BEGIN@3.43
11110µs12µsRole::Tiny::::BEGIN@4.44 Role::Tiny::BEGIN@4.44
1117µs23µsRole::Tiny::::BEGIN@2.42 Role::Tiny::BEGIN@2.42
1117µs85µsPath::IsDev::Role::Matcher::FullPath::Is::Any::::BEGIN@18Path::IsDev::Role::Matcher::FullPath::Is::Any::BEGIN@18
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1240µs117µ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
use 5.008; # utf8
# spent 17µs making 1 call to Role::Tiny::BEGIN@1.41
2220µs238µ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
use strict;
# spent 23µs making 1 call to Role::Tiny::BEGIN@2.42 # spent 15µs making 1 call to strict::import
3218µs224µ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
use warnings;
# spent 20µs making 1 call to Role::Tiny::BEGIN@3.43 # spent 4µs making 1 call to warnings::import
4280µs213µ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
use utf8;
# spent 12µs making 1 call to Role::Tiny::BEGIN@4.44 # spent 1µs making 1 call to utf8::import
5
6package Path::IsDev::Role::Matcher::FullPath::Is::Any;
71600ns$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
101200nsour $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
sub _path {
139117µs require Path::Tiny;
1491752µs91436µs Path::Tiny->VERSION('0.004');
# spent 436µs making 91 calls to UNIVERSAL::VERSION, avg 5µs/call
1591270µs911.37ms goto &Path::Tiny::path;
# spent 1.37ms making 91 calls to Path::Tiny::path, avg 15µs/call
16}
17
182245µs2163µ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
use Role::Tiny;
# 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
sub _fullpath_is {
429135µs my ( $self, $result_object, $this, $comparator ) = @_;
43
449128µs my $context = {};
45
469155µs $context->{tests} = [];
47
489142µs $context->{test_path} = "$comparator";
49
509190µs91896µ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
5291109µs91635µ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
5891118µs push @{ $context->{tests} }, { 'test_path_exists?' => 1 };
59
6091108µs913.03ms my $realpath = $path->realpath;
# spent 3.03ms making 91 calls to Path::Tiny::realpath, avg 33µs/call
61
6291204µs91137µs $context->{source_realpath} = "$this";
# spent 137µs making 91 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 2µs/call
6391147µs91109µs $context->{test_realpath} = "$realpath";
# spent 109µs making 91 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 1µs/call
64
6591205µs182200µs if ( not $realpath eq $this ) {
# spent 200µs making 182 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 1µs/call
668998µs push @{ $context->{tests} }, { 'test_realpath_eq_source_realpath?' => 0 };
6789324µs2674.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
6889312µs return;
69 }
7023µs push @{ $context->{tests} }, { 'test_realpath_eq_source_realpath?' => 1 };
7129µs689µ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
7228µ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
sub fullpath_is_any {
882127µs my ( $self, $result_object, @dirnames ) = @_;
892146µs42837µ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
902111µs for my $dirname (@dirnames) {
9191184µs9118.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 }
931956µs return;
94}
95
9612µs1;
97
98__END__