← 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/Child/Exists/Any/Dir.pm
StatementsExecuted 95 statements in 631µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1822133µs2.65msPath::IsDev::Role::Matcher::Child::Exists::Any::Dir::::child_exists_any_dirPath::IsDev::Role::Matcher::Child::Exists::Any::Dir::child_exists_any_dir
11124µs24µsRole::Tiny::::BEGIN@1.85 Role::Tiny::BEGIN@1.85
11117µs138µsPath::IsDev::Role::Matcher::Child::Exists::Any::Dir::::BEGIN@24Path::IsDev::Role::Matcher::Child::Exists::Any::Dir::BEGIN@24
11111µs14µsRole::Tiny::::BEGIN@4.88 Role::Tiny::BEGIN@4.88
11111µs17µsRole::Tiny::::BEGIN@3.87 Role::Tiny::BEGIN@3.87
11110µs28µsRole::Tiny::::BEGIN@2.86 Role::Tiny::BEGIN@2.86
0000s0sPath::IsDev::Role::Matcher::Child::Exists::Any::Dir::::child_exists_dirPath::IsDev::Role::Matcher::Child::Exists::Any::Dir::child_exists_dir
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1258µs124µs
# spent 24µs within Role::Tiny::BEGIN@1.85 which was called: # once (24µs+0s) by Role::Tiny::_load_module at line 1
use 5.008; # utf8
# spent 24µs making 1 call to Role::Tiny::BEGIN@1.85
2230µs246µs
# spent 28µs (10+18) within Role::Tiny::BEGIN@2.86 which was called: # once (10µs+18µs) by Role::Tiny::_load_module at line 2
use strict;
# spent 28µs making 1 call to Role::Tiny::BEGIN@2.86 # spent 18µs making 1 call to strict::import
3234µs223µs
# spent 17µs (11+6) within Role::Tiny::BEGIN@3.87 which was called: # once (11µs+6µs) by Role::Tiny::_load_module at line 3
use warnings;
# spent 17µs making 1 call to Role::Tiny::BEGIN@3.87 # spent 6µs making 1 call to warnings::import
4284µs216µs
# spent 14µs (11+2) within Role::Tiny::BEGIN@4.88 which was called: # once (11µs+2µs) by Role::Tiny::_load_module at line 4
use utf8;
# spent 14µs making 1 call to Role::Tiny::BEGIN@4.88 # spent 2µs making 1 call to utf8::import
5
6package Path::IsDev::Role::Matcher::Child::Exists::Any::Dir;
71900ns$Path::IsDev::Role::Matcher::Child::Exists::Any::Dir::VERSION = '1.001000';
8# ABSTRACT: Match if a path contains one of any of a list of directories
9
101300nsour $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
11
- -
242306µs2259µs
# spent 138µs (17+121) within Path::IsDev::Role::Matcher::Child::Exists::Any::Dir::BEGIN@24 which was called: # once (17µs+121µs) by Role::Tiny::_load_module at line 24
use Role::Tiny qw( with );
# spent 138µs making 1 call to Path::IsDev::Role::Matcher::Child::Exists::Any::Dir::BEGIN@24 # spent 121µs making 1 call to Role::Tiny::import
2513µs1174µswith 'Path::IsDev::Role::Matcher::Child::Exists::Any';
# spent 174µs making 1 call to Role::Tiny::__ANON__[Role/Tiny.pm:67]
26
- -
35sub child_exists_dir {
36 my ( $self, $result_object, $child ) = @_;
37
38 my $child_path = $result_object->path->child($child);
39 my $ctx = { 'child_name' => $child, child_path => "$child_path", tests => [] };
40 my $tests = $ctx->{tests};
41
42 if ( -d $child_path ) {
43 push @{$tests}, { 'child_path_isdir?' => 1 };
44 $result_object->add_reason( $self, 1, "$child_path is a dir", $ctx );
45 return 1;
46 }
47 push @{$tests}, { 'child_path_isdir?' => 0 };
48 $result_object->add_reason( $self, 0, "$child_path is not a dir", $ctx );
49
50 return;
51}
52
- -
61
# spent 2.65ms (133µs+2.52) within Path::IsDev::Role::Matcher::Child::Exists::Any::Dir::child_exists_any_dir which was called 18 times, avg 147µs/call: # 9 times (82µs+1.68ms) by Path::IsDev::Heuristic::TestDir::matches at line 54 of Path/IsDev/Heuristic/TestDir.pm, avg 196µs/call # 9 times (50µs+839µs) by Path::IsDev::Heuristic::VCS::Git::matches at line 49 of Path/IsDev/Heuristic/VCS/Git.pm, avg 99µs/call
sub child_exists_any_dir {
621814µs my ( $self, $result_object, @children ) = @_;
63188µs for my $child (@children) {
642746µs272.52ms return 1 if $self->child_exists( $result_object, $child ) and $self->child_exists_dir( $result_object, $child );
# spent 2.52ms making 27 calls to Path::IsDev::Role::Matcher::Child::Exists::Any::child_exists, avg 93µs/call
65 }
661841µs return;
67}
68
6916µs1;
70
71__END__