← 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/BaseName/MatchRegexp/File.pm
StatementsExecuted 151 statements in 622µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
911477µs13.2msPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::::child_basename_matchregexp_filePath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::child_basename_matchregexp_file
11115µs15µsRole::Tiny::::BEGIN@1.73 Role::Tiny::BEGIN@1.73
11110µs11µsRole::Tiny::::BEGIN@4.76 Role::Tiny::BEGIN@4.76
1118µs86µsPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::::BEGIN@12Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::BEGIN@12
1117µs10µsRole::Tiny::::BEGIN@3.75 Role::Tiny::BEGIN@3.75
1116µs17µsRole::Tiny::::BEGIN@2.74 Role::Tiny::BEGIN@2.74
0000s0sPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::::_this_child_isfilePath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::_this_child_isfile
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1236µs115µs
# spent 15µs within Role::Tiny::BEGIN@1.73 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.73
2222µs227µs
# spent 17µs (6+10) within Role::Tiny::BEGIN@2.74 which was called: # once (6µs+10µs) by Role::Tiny::_load_module at line 2
use strict;
# spent 17µs making 1 call to Role::Tiny::BEGIN@2.74 # spent 10µs making 1 call to strict::import
3217µs214µs
# spent 10µs (7+4) within Role::Tiny::BEGIN@3.75 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.75 # spent 4µs making 1 call to warnings::import
4251µs212µs
# spent 11µs (10+1) within Role::Tiny::BEGIN@4.76 which was called: # once (10µs+1µs) by Role::Tiny::_load_module at line 4
use utf8;
# spent 11µs making 1 call to Role::Tiny::BEGIN@4.76 # spent 1µs making 1 call to utf8::import
5
6package Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File;
71600ns$Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::VERSION = '1.001000';
8# ABSTRACT: Match if any children have basename's that match a regexp and are files
9
101200nsour $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
11
122190µs2163µs
# spent 86µs (8+78) within Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::BEGIN@12 which was called: # once (8µs+78µs) by Role::Tiny::_load_module at line 12
use Role::Tiny qw( with );
# spent 86µs making 1 call to Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::BEGIN@12 # spent 78µs making 1 call to Role::Tiny::import
1312µs1613µswith 'Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp';
# spent 613µs making 1 call to Role::Tiny::__ANON__[Role/Tiny.pm:67]
14
- -
35sub _this_child_isfile {
36 my ( $self, $result_object, $child ) = @_;
37 my $ctx = {
38 'child' => "$child",
39 tests => [],
40 };
41 my $tests = $ctx->{tests};
42
43 ## no critic (ValuesAndExpressions::ProhibitFiletest_f)
44 if ( -f $child ) {
45 push @{$tests}, { 'child_isfile?' => 1 };
46 $result_object->add_reason( $self, 1, "$child is a file", $ctx );
47 return 1;
48 }
49 push @{$tests}, { 'child_isfile?' => 0 };
50 $result_object->add_reason( $self, 0, "$child is not a file", $ctx );
51
52 return;
53}
54
- -
68
# spent 13.2ms (477µs+12.8) within Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::child_basename_matchregexp_file which was called 9 times, avg 1.47ms/call: # 9 times (477µs+12.8ms) by Path::IsDev::Heuristic::Changelog::matches at line 66 of Path/IsDev/Heuristic/Changelog.pm, avg 1.47ms/call
sub child_basename_matchregexp_file {
6995µs my ( $self, $result_object, $regexp ) = @_;
70999µs182.62ms for my $child ( $result_object->path->children ) {
# spent 2.61ms making 9 calls to Path::Tiny::children, avg 290µs/call # spent 12µs making 9 calls to Path::IsDev::Result::path, avg 1µs/call
71110174µs11010.1ms return 1
# spent 10.1ms making 110 calls to Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::_this_child_matchregexp, avg 92µs/call
72 if $self->_this_child_matchregexp( $result_object, $child, $regexp )
73 and $self->_this_child_isfile( $result_object, $child );
74 }
75922µs return;
76
77}
78
7913µs1;
80
81__END__