← Index
NYTProf Performance Profile   « line view »
For flows_to_es.pl
  Run on Mon May 9 23:27:59 2016
Reported on Mon May 9 23:28:08 2016

Filename/usr/share/perl5/strictures.pm
StatementsExecuted 260 statements in 1.30ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
363635390µs1.34msstrictures::::importstrictures::import
11111193µs185µsstrictures::::VERSIONstrictures::VERSION
361151µs51µsstrictures::::CORE:matchstrictures::CORE:match (opcode)
11111µs26µsstrictures::::BEGIN@3strictures::BEGIN@3
1119µs20µsstrictures::::BEGIN@22strictures::BEGIN@22
1117µs31µsstrictures::::BEGIN@4strictures::BEGIN@4
4117µs7µsstrictures::::CORE:ftisstrictures::CORE:ftis (opcode)
1115µs5µsstrictures::::BEGIN@6strictures::BEGIN@6
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package strictures;
2
3232µs240µs
# spent 26µs (11+14) within strictures::BEGIN@3 which was called: # once (11µs+14µs) by Moo::BEGIN@3 at line 3
use strict;
# spent 26µs making 1 call to strictures::BEGIN@3 # spent 14µs making 1 call to strict::import
4262µs254µs
# spent 31µs (7+23) within strictures::BEGIN@4 which was called: # once (7µs+23µs) by Moo::BEGIN@3 at line 4
use warnings FATAL => 'all';
# spent 31µs making 1 call to strictures::BEGIN@4 # spent 23µs making 1 call to warnings::import
5
6
# spent 5µs within strictures::BEGIN@6 which was called: # once (5µs+0s) by Moo::BEGIN@3 at line 8
BEGIN {
716µs *_PERL_LT_5_8_4 = ($] < 5.008004) ? sub(){1} : sub(){0};
8182µs15µs}
# spent 5µs making 1 call to strictures::BEGIN@6
9
101800nsour $VERSION = '1.005002'; # 1.5.2
11
12
# spent 185µs (93+92) within strictures::VERSION which was called 11 times, avg 17µs/call: # once (9µs+11µs) by Moo::sification::BEGIN@3 at line 3 of Moo/sification.pm # once (12µs+7µs) by Moo::BEGIN@3 at line 3 of Moo.pm # once (11µs+8µs) by Method::Generate::Constructor::BEGIN@3 at line 3 of Method/Generate/Constructor.pm # once (8µs+10µs) by Moo::Object::BEGIN@3 at line 3 of Moo/Object.pm # once (8µs+10µs) by Sub::Quote::BEGIN@3 at line 3 of Sub/Quote.pm # once (9µs+8µs) by Method::Generate::BuildAll::BEGIN@3 at line 3 of Method/Generate/BuildAll.pm # once (8µs+8µs) by Method::Generate::Accessor::BEGIN@3 at line 3 of Method/Generate/Accessor.pm # once (8µs+7µs) by Moo::Role::BEGIN@3 at line 3 of Moo/Role.pm # once (8µs+8µs) by Sub::Defer::BEGIN@3 at line 3 of Sub/Defer.pm # once (8µs+7µs) by Moo::HandleMoose::_TypeMap::BEGIN@2 at line 2 of Moo/HandleMoose/_TypeMap.pm # once (7µs+7µs) by Moo::_Utils::BEGIN@11 at line 11 of Moo/_Utils.pm
sub VERSION {
13119µs for ($_[1]) {
141116µs last unless defined && !ref && int != 1;
15 die "Major version specified as $_ - this is strictures version 1";
16 }
17 # disable this since Foo->VERSION(undef) correctly returns the version
18 # and that can happen either if our caller passes undef explicitly or
19 # because the for above autovivified $_[1] - I could make it stop but
20 # it's pointless since we don't want to blow up if the caller does
21 # something valid either.
222395µs230µs
# spent 20µs (9+11) within strictures::BEGIN@22 which was called: # once (9µs+11µs) by Moo::BEGIN@3 at line 22
no warnings 'uninitialized';
# spent 20µs making 1 call to strictures::BEGIN@22 # spent 11µs making 1 call to warnings::unimport
2311189µs1192µs shift->SUPER::VERSION(@_);
# spent 92µs making 11 calls to UNIVERSAL::VERSION, avg 8µs/call
24}
25
261100nsour $extra_load_states;
27
28118µs47µsour $Smells_Like_VCS = (-e '.git' || -e '.svn' || -e '.hg'
# spent 7µs making 4 calls to strictures::CORE:ftis, avg 2µs/call
29 || (-e '../../dist.ini'
30 && (-e '../../.git' || -e '../../.svn' || -e '../../.hg' )));
31
32
# spent 1.34ms (390µs+947µs) within strictures::import which was called 36 times, avg 37µs/call: # once (22µs+48µs) by Search::Elasticsearch::Serializer::JSON::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Serializer/JSON.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Serializer/JSON.pm # once (12µs+29µs) by Search::Elasticsearch::Bulk::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Bulk.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Bulk.pm # once (14µs+25µs) by Moo::BEGIN@3 at line 3 of Moo.pm # once (10µs+28µs) by Method::Generate::Constructor::__ANON__[/usr/share/perl5/Method/Generate/Constructor.pm:197] at line 197 of Method/Generate/Constructor.pm # once (11µs+26µs) by Search::Elasticsearch::Role::Client::Direct::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct.pm # once (10µs+27µs) by Search::Elasticsearch::Cxn::HTTPTiny::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Cxn/HTTPTiny.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Cxn/HTTPTiny.pm # once (11µs+26µs) by Search::Elasticsearch::Role::Serializer::JSON::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Serializer/JSON.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Serializer/JSON.pm # once (11µs+26µs) by Search::Elasticsearch::Role::Cxn::HTTP::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Cxn/HTTP.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Cxn/HTTP.pm # once (11µs+26µs) by Search::Elasticsearch::Transport::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Transport.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Transport.pm # once (10µs+26µs) by Search::Elasticsearch::Role::Serializer::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Serializer.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Serializer.pm # once (10µs+26µs) by Search::Elasticsearch::Role::API::2_0::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/API/2_0.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/API/2_0.pm # once (10µs+26µs) by Method::Generate::BuildAll::BEGIN@3 at line 3 of Method/Generate/BuildAll.pm # once (11µs+26µs) by Moo::Role::BEGIN@3 at line 3 of Moo/Role.pm # once (11µs+26µs) by Search::Elasticsearch::Client::2_0::Direct::Indices::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Client/2_0/Direct/Indices.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Client/2_0/Direct/Indices.pm # once (11µs+26µs) by Search::Elasticsearch::CxnPool::Static::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/CxnPool/Static.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/CxnPool/Static.pm # once (10µs+26µs) by Search::Elasticsearch::Role::Logger::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Logger.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Logger.pm # once (10µs+26µs) by Search::Elasticsearch::Role::Client::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client.pm # once (10µs+26µs) by Search::Elasticsearch::Role::Transport::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Transport.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Transport.pm # once (10µs+26µs) by Method::Generate::Accessor::BEGIN@3 at line 3 of Method/Generate/Accessor.pm # once (10µs+26µs) by Search::Elasticsearch::Util::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Util.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Util.pm # once (10µs+25µs) by Moo::sification::BEGIN@3 at line 3 of Moo/sification.pm # once (10µs+25µs) by Search::Elasticsearch::Role::Bulk::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Bulk.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Bulk.pm # once (10µs+25µs) by Search::Elasticsearch::Role::Cxn::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Cxn.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Cxn.pm # once (10µs+25µs) by Search::Elasticsearch::Role::CxnPool::Static::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/CxnPool/Static.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/CxnPool/Static.pm # once (11µs+25µs) by Search::Elasticsearch::Role::CxnPool::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/CxnPool.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/CxnPool.pm # once (10µs+25µs) by Search::Elasticsearch::Client::2_0::Direct::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Client/2_0/Direct.pm:5] at line 5 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Client/2_0/Direct.pm # once (10µs+25µs) by Search::Elasticsearch::Role::Is_Sync::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Is_Sync.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Is_Sync.pm # once (10µs+25µs) by Moo::HandleMoose::_TypeMap::BEGIN@2 at line 2 of Moo/HandleMoose/_TypeMap.pm # once (10µs+25µs) by Search::Elasticsearch::Logger::LogAny::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Logger/LogAny.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Logger/LogAny.pm # once (10µs+25µs) by Search::Elasticsearch::Cxn::Factory::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Cxn/Factory.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Cxn/Factory.pm # once (10µs+25µs) by Method::Generate::Constructor::BEGIN@3 at line 3 of Method/Generate/Constructor.pm # once (10µs+25µs) by Sub::Defer::BEGIN@3 at line 3 of Sub/Defer.pm # once (10µs+25µs) by Sub::Quote::BEGIN@3 at line 3 of Sub/Quote.pm # once (10µs+25µs) by Search::Elasticsearch::Role::Client::Direct::Main::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct/Main.pm:3] at line 3 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct/Main.pm # once (10µs+25µs) by Moo::Object::BEGIN@3 at line 3 of Moo/Object.pm # once (10µs+24µs) by Moo::_Utils::BEGIN@11 at line 11 of Moo/_Utils.pm
sub import {
333649µs36427µs strict->import;
# spent 427µs making 36 calls to strict::import, avg 12µs/call
343658µs36469µs warnings->import(FATAL => 'all');
# spent 469µs making 36 calls to warnings::import, avg 13µs/call
35
363624µs my $extra_tests = do {
373627µs if (exists $ENV{PERL_STRICTURES_EXTRA}) {
38 if (_PERL_LT_5_8_4 and $ENV{PERL_STRICTURES_EXTRA}) {
39 die 'PERL_STRICTURES_EXTRA checks are not available on perls older than 5.8.4: '
40 . "please unset \$ENV{PERL_STRICTURES_EXTRA}\n";
41 }
42 $ENV{PERL_STRICTURES_EXTRA};
43 } elsif (! _PERL_LT_5_8_4) {
4436179µs3651µs !!((caller)[1] =~ /^(?:t|xt|lib|blib)/
# spent 51µs making 36 calls to strictures::CORE:match, avg 1µs/call
45 and $Smells_Like_VCS)
46 }
47 };
4836146µs if ($extra_tests) {
49 $extra_load_states ||= do {
50
51 my (%rv, @failed);
52 foreach my $mod (qw(indirect multidimensional bareword::filehandles)) {
53 eval "require $mod; \$rv{'$mod'} = 1;" or do {
54 push @failed, $mod;
55
56 # courtesy of the 5.8 require bug
57 # (we do a copy because 5.16.2 at least uses the same read-only
58 # scalars for the qw() list and it doesn't seem worth a $^V check)
59
60 (my $file = $mod) =~ s|::|/|g;
61 delete $INC{"${file}.pm"};
62 };
63 }
64
65 if (@failed) {
66 my $failed = join ' ', @failed;
67 print STDERR <<EOE;
68strictures.pm extra testing active but couldn't load all modules. Missing were:
69
70 $failed
71
72Extra testing is auto-enabled in checkouts only, so if you're the author
73of a strictures-using module you need to run:
74
75 cpan indirect multidimensional bareword::filehandles
76
77but these modules are not required by your users.
78EOE
79 }
80
81 \%rv;
82 };
83
84 indirect->unimport(':fatal') if $extra_load_states->{indirect};
85 multidimensional->unimport if $extra_load_states->{multidimensional};
86 bareword::filehandles->unimport if $extra_load_states->{'bareword::filehandles'};
87 }
88}
89
9015µs1;
91
92__END__
 
# spent 7µs within strictures::CORE:ftis which was called 4 times, avg 2µs/call: # 4 times (7µs+0s) by Moo::BEGIN@3 at line 28, avg 2µs/call
sub strictures::CORE:ftis; # opcode
# spent 51µs within strictures::CORE:match which was called 36 times, avg 1µs/call: # 36 times (51µs+0s) by strictures::import at line 44, avg 1µs/call
sub strictures::CORE:match; # opcode