← 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/File.pm
StatementsExecuted 346 statements in 774µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
7488502µs10.6msPath::IsDev::Role::Matcher::Child::Exists::Any::File::::child_exists_any_filePath::IsDev::Role::Matcher::Child::Exists::Any::File::child_exists_any_file
11115µs15µsRole::Tiny::::BEGIN@1.29 Role::Tiny::BEGIN@1.29
1117µs8µsRole::Tiny::::BEGIN@4.32 Role::Tiny::BEGIN@4.32
1117µs78µsPath::IsDev::Role::Matcher::Child::Exists::Any::File::::BEGIN@24Path::IsDev::Role::Matcher::Child::Exists::Any::File::BEGIN@24
1117µs10µsRole::Tiny::::BEGIN@3.31 Role::Tiny::BEGIN@3.31
1116µs18µsRole::Tiny::::BEGIN@2.30 Role::Tiny::BEGIN@2.30
0000s0sPath::IsDev::Role::Matcher::Child::Exists::Any::File::::child_exists_filePath::IsDev::Role::Matcher::Child::Exists::Any::File::child_exists_file
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1235µs115µs
# spent 15µs within Role::Tiny::BEGIN@1.29 which was called: # once (15µs+0s) by Role::Tiny::_load_module at line 1
use 5.008; # utf8
# spent 15µs making 1 call to Role::Tiny::BEGIN@1.29
2218µs228µs
# spent 18µs (6+11) within Role::Tiny::BEGIN@2.30 which was called: # once (6µs+11µs) by Role::Tiny::_load_module at line 2
use strict;
# spent 18µs making 1 call to Role::Tiny::BEGIN@2.30 # spent 11µs making 1 call to strict::import
3221µs214µs
# spent 10µs (7+4) within Role::Tiny::BEGIN@3.31 which was called: # once (7µs+4µs) by Role::Tiny::_load_module at line 3
use warnings;
# spent 10µs making 1 call to Role::Tiny::BEGIN@3.31 # spent 4µs making 1 call to warnings::import
4253µs210µs
# spent 8µs (7+2) within Role::Tiny::BEGIN@4.32 which was called: # once (7µs+2µs) by Role::Tiny::_load_module at line 4
use utf8;
# spent 8µs making 1 call to Role::Tiny::BEGIN@4.32 # spent 2µs making 1 call to utf8::import
5
6package Path::IsDev::Role::Matcher::Child::Exists::Any::File;
71600ns$Path::IsDev::Role::Matcher::Child::Exists::Any::File::VERSION = '1.001000';
8# ABSTRACT: Match if a path contains one of any of a list of files
9
101200nsour $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
11
- -
242208µs2150µs
# spent 78µs (7+71) within Path::IsDev::Role::Matcher::Child::Exists::Any::File::BEGIN@24 which was called: # once (7µs+71µs) by Role::Tiny::_load_module at line 24
use Role::Tiny qw( with );
# spent 78µs making 1 call to Path::IsDev::Role::Matcher::Child::Exists::Any::File::BEGIN@24 # spent 71µs making 1 call to Role::Tiny::import
2512µs1650µswith 'Path::IsDev::Role::Matcher::Child::Exists::Any';
# spent 650µs making 1 call to Role::Tiny::__ANON__[Role/Tiny.pm:67]
26
- -
35sub child_exists_file {
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 # For now, yes, files, not things usable as files
43 ## no critic (ValuesAndExpressions::ProhibitFiletest_f)
44 if ( -f $child_path ) {
45 push @{$tests}, { 'child_path_isfile?' => 1 };
46 $result_object->add_reason( $self, 1, "$child_path is a file", $ctx );
47 return 1;
48 }
49 push @{$tests}, { 'child_path_isfile?' => 1 };
50 $result_object->add_reason( $self, 0, "$child_path is not a file", $ctx );
51
52 return;
53}
54
- -
63
# spent 10.6ms (502µs+10.1) within Path::IsDev::Role::Matcher::Child::Exists::Any::File::child_exists_any_file which was called 74 times, avg 143µs/call: # 11 times (64µs+1.17ms) by Path::IsDev::NegativeHeuristic::IsDev::IgnoreFile::excludes at line 72 of Path/IsDev/NegativeHeuristic/IsDev/IgnoreFile.pm, avg 112µs/call # 9 times (100µs+2.44ms) by Path::IsDev::Heuristic::Makefile::matches at line 52 of Path/IsDev/Heuristic/Makefile.pm, avg 282µs/call # 9 times (75µs+1.63ms) by Path::IsDev::Heuristic::MYMETA::matches at line 60 of Path/IsDev/Heuristic/MYMETA.pm, avg 189µs/call # 9 times (71µs+1.54ms) by Path::IsDev::Heuristic::META::matches at line 51 of Path/IsDev/Heuristic/META.pm, avg 179µs/call # 9 times (50µs+863µs) by Path::IsDev::Heuristic::Tool::Dzil::matches at line 48 of Path/IsDev/Heuristic/Tool/Dzil.pm, avg 102µs/call # 9 times (49µs+833µs) by Path::IsDev::Heuristic::DevDirMarker::matches at line 63 of Path/IsDev/Heuristic/DevDirMarker.pm, avg 98µs/call # 9 times (46µs+802µs) by Path::IsDev::Heuristic::Tool::ModuleBuild::matches at line 48 of Path/IsDev/Heuristic/Tool/ModuleBuild.pm, avg 94µs/call # 9 times (46µs+792µs) by Path::IsDev::Heuristic::Tool::MakeMaker::matches at line 48 of Path/IsDev/Heuristic/Tool/MakeMaker.pm, avg 93µs/call
sub child_exists_any_file {
647451µs my ( $self, $result_object, @children ) = @_;
657432µs for my $child (@children) {
66110173µs11010.1ms return 1 if $self->child_exists( $result_object, $child ) and $self->child_exists_file( $result_object, $child );
# spent 10.1ms making 110 calls to Path::IsDev::Role::Matcher::Child::Exists::Any::child_exists, avg 92µs/call
67 }
6874177µs return;
69}
70
7113µs1;
72
73__END__