Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Path/IsDev/NegativeHeuristic/HomeDir.pm |
Statements | Executed 180 statements in 1.04ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
11 | 1 | 1 | 1.91ms | 13.1ms | paths | Path::IsDev::NegativeHeuristic::HomeDir::
11 | 1 | 1 | 88µs | 88µs | _uniq | Path::IsDev::NegativeHeuristic::HomeDir::
11 | 1 | 1 | 66µs | 22.9ms | excludes | Path::IsDev::NegativeHeuristic::HomeDir::
1 | 1 | 1 | 17µs | 17µs | BEGIN@1.37 | Module::Runtime::
1 | 1 | 1 | 11µs | 15µs | BEGIN@3.39 | Module::Runtime::
1 | 1 | 1 | 9µs | 33µs | BEGIN@33 | Path::IsDev::NegativeHeuristic::HomeDir::
1 | 1 | 1 | 7µs | 9µs | BEGIN@4.40 | Module::Runtime::
1 | 1 | 1 | 7µs | 19µs | BEGIN@2.38 | Module::Runtime::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 2 | 41µs | 1 | 17µs | # spent 17µs within Module::Runtime::BEGIN@1.37 which was called:
# once (17µs+0s) by Module::Runtime::require_module at line 1 # spent 17µs making 1 call to Module::Runtime::BEGIN@1.37 |
2 | 2 | 24µs | 2 | 31µs | # spent 19µs (7+12) within Module::Runtime::BEGIN@2.38 which was called:
# once (7µs+12µs) by Module::Runtime::require_module at line 2 # spent 19µs making 1 call to Module::Runtime::BEGIN@2.38
# spent 12µs making 1 call to strict::import |
3 | 2 | 21µs | 2 | 19µs | # spent 15µs (11+4) within Module::Runtime::BEGIN@3.39 which was called:
# once (11µs+4µs) by Module::Runtime::require_module at line 3 # spent 15µs making 1 call to Module::Runtime::BEGIN@3.39
# spent 4µs making 1 call to warnings::import |
4 | 2 | 96µs | 2 | 10µs | # spent 9µs (7+1) within Module::Runtime::BEGIN@4.40 which was called:
# once (7µs+1µs) by Module::Runtime::require_module at line 4 # spent 9µs making 1 call to Module::Runtime::BEGIN@4.40
# spent 2µs making 1 call to utf8::import |
5 | |||||
6 | package Path::IsDev::NegativeHeuristic::HomeDir; | ||||
7 | 1 | 600ns | $Path::IsDev::NegativeHeuristic::HomeDir::VERSION = '1.001000'; | ||
8 | # ABSTRACT: User home directories are not development roots | ||||
9 | |||||
10 | 1 | 200ns | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | ||
11 | |||||
12 | ## no critic (RequireArgUnpacking, ProhibitSubroutinePrototypes) | ||||
13 | # spent 88µs within Path::IsDev::NegativeHeuristic::HomeDir::_uniq which was called 11 times, avg 8µs/call:
# 11 times (88µs+0s) by Path::IsDev::NegativeHeuristic::HomeDir::paths at line 60, avg 8µs/call | ||||
14 | 11 | 7µs | my %seen = (); | ||
15 | 11 | 91µs | return grep { not $seen{$_}++ } @_; | ||
16 | } | ||||
17 | |||||
- - | |||||
33 | 2 | 163µs | 2 | 58µs | # spent 33µs (9+25) within Path::IsDev::NegativeHeuristic::HomeDir::BEGIN@33 which was called:
# once (9µs+25µs) by Module::Runtime::require_module at line 33 # spent 33µs making 1 call to Path::IsDev::NegativeHeuristic::HomeDir::BEGIN@33
# spent 25µs making 1 call to Exporter::import |
34 | 1 | 2µs | 1 | 931µs | with 'Path::IsDev::Role::NegativeHeuristic', 'Path::IsDev::Role::Matcher::FullPath::Is::Any'; # spent 931µs making 1 call to Role::Tiny::With::with |
35 | |||||
- - | |||||
51 | # spent 13.1ms (1.91+11.2) within Path::IsDev::NegativeHeuristic::HomeDir::paths which was called 11 times, avg 1.19ms/call:
# 11 times (1.91ms+11.2ms) by Path::IsDev::NegativeHeuristic::HomeDir::excludes at line 71, avg 1.19ms/call | ||||
52 | 11 | 1µs | my @sources; | ||
53 | 11 | 65µs | require File::HomeDir; | ||
54 | 11 | 28µs | 11 | 80µs | push @sources, File::HomeDir->my_home; # spent 80µs making 11 calls to File::HomeDir::my_home, avg 7µs/call |
55 | 11 | 8µs | for my $method (qw( my_home my_desktop my_music my_pictures my_videos my_data )) { | ||
56 | 66 | 377µs | 132 | 4.47ms | if ( $File::HomeDir::IMPLEMENTED_BY->can($method) ) { # spent 2.35ms making 11 calls to File::HomeDir::my_desktop, avg 213µs/call
# spent 515µs making 11 calls to File::HomeDir::my_data, avg 47µs/call
# spent 512µs making 11 calls to File::HomeDir::my_music, avg 47µs/call
# spent 482µs making 11 calls to File::HomeDir::my_pictures, avg 44µs/call
# spent 469µs making 11 calls to File::HomeDir::my_videos, avg 43µs/call
# spent 98µs making 66 calls to UNIVERSAL::can, avg 1µs/call
# spent 47µs making 11 calls to File::HomeDir::my_home, avg 4µs/call |
57 | push @sources, File::HomeDir->$method(); | ||||
58 | } | ||||
59 | } | ||||
60 | 11 | 58µs | 11 | 88µs | return _uniq grep { defined and length } @sources; # spent 88µs making 11 calls to Path::IsDev::NegativeHeuristic::HomeDir::_uniq, avg 8µs/call |
61 | } | ||||
62 | |||||
- - | |||||
69 | # spent 22.9ms (66µs+22.8) within Path::IsDev::NegativeHeuristic::HomeDir::excludes which was called 11 times, avg 2.08ms/call:
# 11 times (66µs+22.8ms) by Path::IsDev::Role::HeuristicSet::matches at line 68 of Path/IsDev/Role/HeuristicSet.pm, avg 2.08ms/call | ||||
70 | 11 | 4µs | my ( $self, $result_object ) = @_; | ||
71 | 11 | 45µs | 22 | 22.8ms | return unless $self->fullpath_is_any( $result_object, $self->paths ); # spent 13.1ms making 11 calls to Path::IsDev::NegativeHeuristic::HomeDir::paths, avg 1.19ms/call
# spent 9.66ms making 11 calls to Path::IsDev::Role::Matcher::FullPath::Is::Any::fullpath_is_any, avg 878µs/call |
72 | 1 | 2µs | return 1; | ||
73 | } | ||||
74 | 1 | 3µs | 1; | ||
75 | |||||
76 | __END__ |