← 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/NegativeHeuristic/HomeDir.pm
StatementsExecuted 180 statements in 1.04ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11111.91ms13.1msPath::IsDev::NegativeHeuristic::HomeDir::::pathsPath::IsDev::NegativeHeuristic::HomeDir::paths
111188µs88µsPath::IsDev::NegativeHeuristic::HomeDir::::_uniqPath::IsDev::NegativeHeuristic::HomeDir::_uniq
111166µs22.9msPath::IsDev::NegativeHeuristic::HomeDir::::excludesPath::IsDev::NegativeHeuristic::HomeDir::excludes
11117µs17µsModule::Runtime::::BEGIN@1.37 Module::Runtime::BEGIN@1.37
11111µs15µsModule::Runtime::::BEGIN@3.39 Module::Runtime::BEGIN@3.39
1119µs33µsPath::IsDev::NegativeHeuristic::HomeDir::::BEGIN@33Path::IsDev::NegativeHeuristic::HomeDir::BEGIN@33
1117µs9µsModule::Runtime::::BEGIN@4.40 Module::Runtime::BEGIN@4.40
1117µs19µsModule::Runtime::::BEGIN@2.38 Module::Runtime::BEGIN@2.38
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1241µs117µ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
use 5.008; # utf8
# spent 17µs making 1 call to Module::Runtime::BEGIN@1.37
2224µs231µ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
use strict;
# spent 19µs making 1 call to Module::Runtime::BEGIN@2.38 # spent 12µs making 1 call to strict::import
3221µs219µ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
use warnings;
# spent 15µs making 1 call to Module::Runtime::BEGIN@3.39 # spent 4µs making 1 call to warnings::import
4296µs210µ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
use utf8;
# spent 9µs making 1 call to Module::Runtime::BEGIN@4.40 # spent 2µs making 1 call to utf8::import
5
6package Path::IsDev::NegativeHeuristic::HomeDir;
71600ns$Path::IsDev::NegativeHeuristic::HomeDir::VERSION = '1.001000';
8# ABSTRACT: User home directories are not development roots
9
101200nsour $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
sub _uniq (@) {
14117µs my %seen = ();
151191µs return grep { not $seen{$_}++ } @_;
16}
17
- -
332163µs258µ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
use Role::Tiny::With qw( with );
# spent 33µs making 1 call to Path::IsDev::NegativeHeuristic::HomeDir::BEGIN@33 # spent 25µs making 1 call to Exporter::import
3412µs1931µswith '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
sub paths {
52111µs my @sources;
531165µs require File::HomeDir;
541128µs1180µs push @sources, File::HomeDir->my_home;
# spent 80µs making 11 calls to File::HomeDir::my_home, avg 7µs/call
55118µs for my $method (qw( my_home my_desktop my_music my_pictures my_videos my_data )) {
5666377µs1324.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 }
601158µs1188µ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
sub excludes {
70114µs my ( $self, $result_object ) = @_;
711145µs2222.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
7212µs return 1;
73}
7413µs1;
75
76__END__