← 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.pm
StatementsExecuted 1109 statements in 2.73ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
137222.33ms12.6msPath::IsDev::Role::Matcher::Child::Exists::Any::::child_existsPath::IsDev::Role::Matcher::Child::Exists::Any::child_exists
13711753µs912µsPath::IsDev::Role::Matcher::Child::Exists::Any::::CORE:ftisPath::IsDev::Role::Matcher::Child::Exists::Any::CORE:ftis (opcode)
11116µs16µsRole::Tiny::::BEGIN@1.33 Role::Tiny::BEGIN@1.33
1117µs93µsPath::IsDev::Role::Matcher::Child::Exists::Any::::BEGIN@12Path::IsDev::Role::Matcher::Child::Exists::Any::BEGIN@12
1117µs11µsRole::Tiny::::BEGIN@3.35 Role::Tiny::BEGIN@3.35
1117µs8µsRole::Tiny::::BEGIN@4.36 Role::Tiny::BEGIN@4.36
1117µs18µsRole::Tiny::::BEGIN@2.34 Role::Tiny::BEGIN@2.34
0000s0sPath::IsDev::Role::Matcher::Child::Exists::Any::::child_exists_anyPath::IsDev::Role::Matcher::Child::Exists::Any::child_exists_any
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1242µs116µs
# spent 16µs within Role::Tiny::BEGIN@1.33 which was called: # once (16µs+0s) by Role::Tiny::_load_module at line 1
use 5.008; # utf8
# spent 16µs making 1 call to Role::Tiny::BEGIN@1.33
2220µs230µs
# spent 18µs (7+12) within Role::Tiny::BEGIN@2.34 which was called: # once (7µs+12µs) by Role::Tiny::_load_module at line 2
use strict;
# spent 18µs making 1 call to Role::Tiny::BEGIN@2.34 # spent 12µs making 1 call to strict::import
3219µs215µs
# spent 11µs (7+4) within Role::Tiny::BEGIN@3.35 which was called: # once (7µs+4µs) by Role::Tiny::_load_module at line 3
use warnings;
# spent 11µs making 1 call to Role::Tiny::BEGIN@3.35 # spent 4µs making 1 call to warnings::import
4252µs210µs
# spent 8µs (7+2) within Role::Tiny::BEGIN@4.36 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.36 # spent 2µs making 1 call to utf8::import
5
6package Path::IsDev::Role::Matcher::Child::Exists::Any;
71600ns$Path::IsDev::Role::Matcher::Child::Exists::Any::VERSION = '1.001000';
8# ABSTRACT: Match if any of a list of children exists
9
101200nsour $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
11
122184µs2179µs
# spent 93µs (7+86) within Path::IsDev::Role::Matcher::Child::Exists::Any::BEGIN@12 which was called: # once (7µs+86µs) by Role::Tiny::_load_module at line 12
use Role::Tiny;
# spent 93µs making 1 call to Path::IsDev::Role::Matcher::Child::Exists::Any::BEGIN@12 # spent 86µs making 1 call to Role::Tiny::import
13
- -
33
# spent 12.6ms (2.33+10.3) within Path::IsDev::Role::Matcher::Child::Exists::Any::child_exists which was called 137 times, avg 92µs/call: # 110 times (1.87ms+8.21ms) by Path::IsDev::Role::Matcher::Child::Exists::Any::File::child_exists_any_file at line 66 of Path/IsDev/Role/Matcher/Child/Exists/Any/File.pm, avg 92µs/call # 27 times (465µs+2.05ms) by Path::IsDev::Role::Matcher::Child::Exists::Any::Dir::child_exists_any_dir at line 64 of Path/IsDev/Role/Matcher/Child/Exists/Any/Dir.pm, avg 93µs/call
sub child_exists {
3413735µs my ( $self, $result_object, $child ) = @_;
35
36137278µs2743.28ms my $child_path = $result_object->path->child($child);
# spent 3.11ms making 137 calls to Path::Tiny::child, avg 23µs/call # spent 170µs making 137 calls to Path::IsDev::Result::path, avg 1µs/call
37
38137423µs137198µs my $ctx = { 'child_name' => $child, child_path => "$child_path", tests => [] };
# spent 198µs making 137 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 1µs/call
3913732µs my $tests = $ctx->{tests};
40
41137874µs2741.07ms if ( -e $child_path ) {
# spent 912µs making 137 calls to Path::IsDev::Role::Matcher::Child::Exists::Any::CORE:ftis, avg 7µs/call # spent 159µs making 137 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 1µs/call
42 push @{$tests}, { 'child_path_exists?' => 1 };
43 $result_object->add_reason( $self, 1, "$child exists", $ctx );
44 return 1;
45 }
46137148µs push @{$tests}, { 'child_path_exists?' => 0 };
47137179µs1375.87ms $result_object->add_reason( $self, 0, "$child does not exist", $ctx );
# spent 5.87ms making 137 calls to Path::IsDev::Result::add_reason, avg 43µs/call
48137441µs return;
49}
50
- -
59sub child_exists_any {
60 my ( $self, $result_object, @children ) = @_;
61 for my $child (@children) {
62 return 1 if $self->child_exists( $result_object, $child );
63 }
64 return;
65}
66
6713µs1;
68
69__END__
 
# spent 912µs (753+159) within Path::IsDev::Role::Matcher::Child::Exists::Any::CORE:ftis which was called 137 times, avg 7µs/call: # 137 times (753µs+159µs) by Path::IsDev::Role::Matcher::Child::Exists::Any::child_exists at line 41, avg 7µs/call
sub Path::IsDev::Role::Matcher::Child::Exists::Any::CORE:ftis; # opcode