← 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.pm
StatementsExecuted 783 statements in 2.26ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
110112.32ms10.1msPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::::_this_child_matchregexpPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::_this_child_matchregexp
11011137µs137µsPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::::CORE:regcompPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::CORE:regcomp (opcode)
1101159µs59µsPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::::CORE:matchPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::CORE:match (opcode)
11115µs15µsRole::Tiny::::BEGIN@1.77 Role::Tiny::BEGIN@1.77
11110µs82µsPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::::BEGIN@23Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::BEGIN@23
1117µs11µsRole::Tiny::::BEGIN@3.79 Role::Tiny::BEGIN@3.79
1116µs8µsRole::Tiny::::BEGIN@4.80 Role::Tiny::BEGIN@4.80
1116µs17µsRole::Tiny::::BEGIN@2.78 Role::Tiny::BEGIN@2.78
0000s0sPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::::child_basename_matchregexpPath::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::child_basename_matchregexp
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.77 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.77
2221µs229µs
# spent 17µs (6+11) within Role::Tiny::BEGIN@2.78 which was called: # once (6µs+11µs) by Role::Tiny::_load_module at line 2
use strict;
# spent 17µs making 1 call to Role::Tiny::BEGIN@2.78 # spent 11µs making 1 call to strict::import
3218µs214µs
# spent 11µs (7+4) within Role::Tiny::BEGIN@3.79 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.79 # spent 4µs making 1 call to warnings::import
4256µs29µs
# spent 8µs (6+1) within Role::Tiny::BEGIN@4.80 which was called: # once (6µs+1µs) by Role::Tiny::_load_module at line 4
use utf8;
# spent 8µs making 1 call to Role::Tiny::BEGIN@4.80 # spent 1µs making 1 call to utf8::import
5
6package Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp;
71600ns$Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::VERSION = '1.001000';
8# ABSTRACT: Match when a path has a child file matching an expression
9
101200nsour $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
11
- -
232182µs2153µs
# spent 82µs (10+71) within Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::BEGIN@23 which was called: # once (10µs+71µs) by Role::Tiny::_load_module at line 23
use Role::Tiny;
# spent 82µs making 1 call to Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::BEGIN@23 # spent 71µs making 1 call to Role::Tiny::import
24
- -
33
# spent 10.1ms (2.32+7.82) within Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::_this_child_matchregexp which was called 110 times, avg 92µs/call: # 110 times (2.32ms+7.82ms) by Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::File::child_basename_matchregexp_file at line 71 of Path/IsDev/Role/Matcher/Child/BaseName/MatchRegexp/File.pm, avg 92µs/call
sub _this_child_matchregexp {
3411037µs my ( $self, $result_object, $child, $regexp ) = @_;
35110423µs2202.24ms my $ctx = {
# spent 2.08ms making 110 calls to Path::Tiny::basename, avg 19µs/call # spent 152µs making 110 calls to Path::Tiny::__ANON__[Path/Tiny.pm:31], avg 1µs/call
36 'child' => "$child",
37 'child_basename' => $child->basename,
38 expression => $regexp,
39 tests => [],
40 };
4111028µs my $tests = $ctx->{tests};
42
43110730µs330484µs if ( $child->basename =~ $regexp ) {
# spent 288µs making 110 calls to Path::Tiny::basename, avg 3µs/call # spent 137µs making 110 calls to Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::CORE:regcomp, avg 1µs/call # spent 59µs making 110 calls to Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::CORE:match, avg 537ns/call
44 push @{$tests}, { 'child_basename_matches_expression?' => 1 };
45 $result_object->add_reason( $self, 1, $child->basename . " matches $regexp", $ctx );
46 return 1;
47 }
48110118µs push @{$tests}, { 'child_basename_matches_expression?' => 0 };
49110288µs2205.10ms $result_object->add_reason( $self, 0, $child->basename . " does not match $regexp", $ctx );
# spent 4.80ms making 110 calls to Path::IsDev::Result::add_reason, avg 44µs/call # spent 298µs making 110 calls to Path::Tiny::basename, avg 3µs/call
50110318µs return;
51}
52
- -
65sub child_basename_matchregexp {
66 my ( $self, $result_object, $regexp ) = @_;
67 for my $child ( $result_object->path->children ) {
68 return 1 if $self->_this_child_matchregexp( $result_object, $child, $regexp );
69 }
70 return;
71}
72
7312µs1;
74
75__END__
 
# spent 59µs within Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::CORE:match which was called 110 times, avg 537ns/call: # 110 times (59µs+0s) by Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::_this_child_matchregexp at line 43, avg 537ns/call
sub Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::CORE:match; # opcode
# spent 137µs within Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::CORE:regcomp which was called 110 times, avg 1µs/call: # 110 times (137µs+0s) by Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::_this_child_matchregexp at line 43, avg 1µs/call
sub Path::IsDev::Role::Matcher::Child::BaseName::MatchRegexp::CORE:regcomp; # opcode