← 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/Import/Into.pm
StatementsExecuted 356 statements in 2.24ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
25111.53ms1.79msImport::Into::::_make_actionImport::Into::_make_action
2522247µs3.16msimport::::into import::into
2511237µs260µsImport::Into::::_preludeImport::Into::_prelude
251123µs23µsImport::Into::::CORE:matchImport::Into::CORE:match (opcode)
11111µs26µsImport::Into::::BEGIN@3Import::Into::BEGIN@3
1117µs22µsImport::Into::::BEGIN@4Import::Into::BEGIN@4
0000s0sunimport::::out_of unimport::out_of
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Import::Into;
2
3232µs240µs
# spent 26µs (11+14) within Import::Into::BEGIN@3 which was called: # once (11µs+14µs) by Moo::BEGIN@7 at line 3
use strict;
# spent 26µs making 1 call to Import::Into::BEGIN@3 # spent 14µs making 1 call to strict::import
42301µs237µs
# spent 22µs (7+15) within Import::Into::BEGIN@4 which was called: # once (7µs+15µs) by Moo::BEGIN@7 at line 4
use warnings FATAL => 'all';
# spent 22µs making 1 call to Import::Into::BEGIN@4 # spent 15µs making 1 call to warnings::import
5
61600nsour $VERSION = '1.002000'; # 1.2.0
7
8
# spent 260µs (237+23) within Import::Into::_prelude which was called 25 times, avg 10µs/call: # 25 times (237µs+23µs) by Import::Into::_make_action at line 28, avg 10µs/call
sub _prelude {
9257µs my $target = shift;
10 my ($package, $file, $line, $level)
112591µs2523µs = ref $target ? @{$target}{qw(package filename line)}
# spent 23µs making 25 calls to Import::Into::CORE:match, avg 924ns/call
12 : $target =~ /[^0-9]/ ? ($target)
13 : (undef, undef, undef, $target);
142510µs if (defined $level) {
152564µs my ($p, $fn, $ln) = caller($level + 2);
16257µs $package ||= $p;
17256µs $file ||= $fn;
182514µs $line ||= $ln;
19 }
202593µs qq{package $package;\n}
21 . ($file ? "#line $line \"$file\"\n" : '')
22}
23
24
# spent 1.79ms (1.53+260µs) within Import::Into::_make_action which was called 25 times, avg 72µs/call: # 25 times (1.53ms+260µs) by import::into at line 34, avg 72µs/call
sub _make_action {
25259µs my ($action, $target) = @_;
262510µs my $version = ref $target && $target->{version};
27258µs my $ver_check = $version ? '$_[0]->VERSION($version);' : '';
28251.42ms25260µs eval _prelude($target).qq{sub { $ver_check shift->$action(\@_) }}
# spent 260µs making 25 calls to Import::Into::_prelude, avg 10µs/call
29 or die "Failed to build action sub to ${action} for ${target}: $@";
30}
31
32
# spent 3.16ms (247µs+2.91) within import::into which was called 25 times, avg 126µs/call: # 14 times (139µs+1.58ms) by Moo::Role::import at line 29 of Moo/Role.pm, avg 123µs/call # 11 times (108µs+1.33ms) by Moo::import at line 26 of Moo.pm, avg 131µs/call
sub import::into {
332531µs my ($class, $target, @args) = @_;
3425126µs502.91ms _make_action(import => $target)->($class, @args);
# spent 1.79ms making 25 calls to Import::Into::_make_action, avg 72µs/call # spent 79µs making 1 call to Search::Elasticsearch::Serializer::JSON::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Serializer/JSON.pm:3] # spent 48µs making 1 call to Search::Elasticsearch::Bulk::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Bulk.pm:3] # spent 46µs making 1 call to Search::Elasticsearch::Role::Client::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client.pm:3] # spent 45µs making 1 call to Method::Generate::Constructor::__ANON__[Method/Generate/Constructor.pm:197] # spent 44µs making 1 call to Search::Elasticsearch::Role::Cxn::HTTP::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Cxn/HTTP.pm:3] # spent 44µs making 1 call to Search::Elasticsearch::Role::Serializer::JSON::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Serializer/JSON.pm:3] # spent 44µs making 1 call to Search::Elasticsearch::Role::Client::Direct::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct.pm:3] # spent 44µs making 1 call to Search::Elasticsearch::Cxn::HTTPTiny::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Cxn/HTTPTiny.pm:3] # spent 44µs making 1 call to Search::Elasticsearch::Role::API::2_0::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/API/2_0.pm:3] # spent 44µs making 1 call to Search::Elasticsearch::Role::Cxn::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Cxn.pm:3] # spent 44µs making 1 call to Search::Elasticsearch::Transport::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Transport.pm:3] # spent 43µs making 1 call to Search::Elasticsearch::Role::Serializer::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Serializer.pm:3] # spent 43µs making 1 call to Search::Elasticsearch::Logger::LogAny::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Logger/LogAny.pm:3] # spent 43µs making 1 call to Search::Elasticsearch::Role::Logger::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Logger.pm:3] # spent 43µs making 1 call to Search::Elasticsearch::CxnPool::Static::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/CxnPool/Static.pm:3] # spent 43µs making 1 call to Search::Elasticsearch::Role::CxnPool::Static::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/CxnPool/Static.pm:3] # spent 43µs making 1 call to Search::Elasticsearch::Client::2_0::Direct::Indices::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Client/2_0/Direct/Indices.pm:3] # spent 43µs making 1 call to Search::Elasticsearch::Role::CxnPool::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/CxnPool.pm:3] # spent 42µs making 1 call to Search::Elasticsearch::Client::2_0::Direct::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Client/2_0/Direct.pm:5] # spent 42µs making 1 call to Search::Elasticsearch::Cxn::Factory::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Cxn/Factory.pm:3] # spent 42µs making 1 call to Search::Elasticsearch::Role::Transport::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Transport.pm:3] # spent 42µs making 1 call to Search::Elasticsearch::Role::Bulk::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Bulk.pm:3] # spent 42µs making 1 call to Search::Elasticsearch::Role::Is_Sync::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Is_Sync.pm:3] # spent 42µs making 1 call to Search::Elasticsearch::Util::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Util.pm:3] # spent 42µs making 1 call to Search::Elasticsearch::Role::Client::Direct::Main::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct/Main.pm:3]
35}
36
37sub unimport::out_of {
38 my ($class, $target, @args) = @_;
39 _make_action(unimport => $target)->($class, @args);
40}
41
4213µs1;
43
44__END__
 
# spent 23µs within Import::Into::CORE:match which was called 25 times, avg 924ns/call: # 25 times (23µs+0s) by Import::Into::_prelude at line 11, avg 924ns/call
sub Import::Into::CORE:match; # opcode