← Index
NYTProf Performance Profile   « line view »
For /home/ss5/perl5/perlbrew/perls/perl-5.22.0/bin/benchmarkanything-storage
  Run on Mon Jan 29 16:55:34 2018
Reported on Mon Jan 29 16:57:07 2018

Filename/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Search/Elasticsearch/Transport.pm
StatementsExecuted 14029 statements in 57.7ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
10011130.0ms20.4sSearch::Elasticsearch::Transport::::try {...} Search::Elasticsearch::Transport::try {...}
10011126.7ms20.6sSearch::Elasticsearch::Transport::::perform_requestSearch::Elasticsearch::Transport::perform_request
11110µs716µsSearch::Elasticsearch::Transport::::BEGIN@3Search::Elasticsearch::Transport::BEGIN@3
1116µs36µsSearch::Elasticsearch::Transport::::BEGIN@7Search::Elasticsearch::Transport::BEGIN@7
1116µs83µsSearch::Elasticsearch::Transport::::BEGIN@6Search::Elasticsearch::Transport::BEGIN@6
1116µs164µsSearch::Elasticsearch::Transport::::BEGIN@8Search::Elasticsearch::Transport::BEGIN@8
1116µs165µsSearch::Elasticsearch::Transport::::BEGIN@9Search::Elasticsearch::Transport::BEGIN@9
1112µs2µsSearch::Elasticsearch::Transport::::BEGIN@5Search::Elasticsearch::Transport::BEGIN@5
0000s0sSearch::Elasticsearch::Transport::::__ANON__[:32]Search::Elasticsearch::Transport::__ANON__[:32]
0000s0sSearch::Elasticsearch::Transport::::__ANON__[:41]Search::Elasticsearch::Transport::__ANON__[:41]
0000s0sSearch::Elasticsearch::Transport::::catch {...} Search::Elasticsearch::Transport::catch {...}
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Search::Elasticsearch::Transport;
21200ns$Search::Elasticsearch::Transport::VERSION = '5.01';
3222µs21.42ms
# spent 716µs (10+705) within Search::Elasticsearch::Transport::BEGIN@3 which was called: # once (10µs+705µs) by Module::Runtime::require_module at line 3
use Moo;
# spent 716µs making 1 call to Search::Elasticsearch::Transport::BEGIN@3 # spent 705µs making 1 call to Moo::import
4
5215µs12µs
# spent 2µs within Search::Elasticsearch::Transport::BEGIN@5 which was called: # once (2µs+0s) by Module::Runtime::require_module at line 5
use URI();
# spent 2µs making 1 call to Search::Elasticsearch::Transport::BEGIN@5
6219µs2159µs
# spent 83µs (6+77) within Search::Elasticsearch::Transport::BEGIN@6 which was called: # once (6µs+77µs) by Module::Runtime::require_module at line 6
use Time::HiRes qw(time);
# spent 83µs making 1 call to Search::Elasticsearch::Transport::BEGIN@6 # spent 77µs making 1 call to Time::HiRes::import
7219µs265µs
# spent 36µs (6+30) within Search::Elasticsearch::Transport::BEGIN@7 which was called: # once (6µs+30µs) by Module::Runtime::require_module at line 7
use Try::Tiny;
# spent 36µs making 1 call to Search::Elasticsearch::Transport::BEGIN@7 # spent 30µs making 1 call to Exporter::import
8220µs2323µs
# spent 164µs (6+159) within Search::Elasticsearch::Transport::BEGIN@8 which was called: # once (6µs+159µs) by Module::Runtime::require_module at line 8
use Search::Elasticsearch::Util qw(upgrade_error);
# spent 164µs making 1 call to Search::Elasticsearch::Transport::BEGIN@8 # spent 159µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337]
92184µs2324µs
# spent 165µs (6+159) within Search::Elasticsearch::Transport::BEGIN@9 which was called: # once (6µs+159µs) by Module::Runtime::require_module at line 9
use namespace::clean;
# spent 165µs making 1 call to Search::Elasticsearch::Transport::BEGIN@9 # spent 159µs making 1 call to namespace::clean::import
10
111900ns14.00mswith 'Search::Elasticsearch::Role::Is_Sync',
# spent 4.00ms making 1 call to Moo::with
12 'Search::Elasticsearch::Role::Transport';
13
14#===================================
15
# spent 20.6s (26.7ms+20.5) within Search::Elasticsearch::Transport::perform_request which was called 1001 times, avg 20.5ms/call: # 1001 times (26.7ms+20.5s) by Search::Elasticsearch::Role::Client::perform_request at line 16 of Search/Elasticsearch/Role/Client.pm, avg 20.5ms/call
sub perform_request {
16#===================================
171001401µs my $self = shift;
1810012.68ms100182.1ms my $params = $self->tidy_request(@_);
# spent 82.1ms making 1001 calls to Search::Elasticsearch::Role::Transport::tidy_request, avg 82µs/call
1910011.01ms1500ns my $pool = $self->cxn_pool;
# spent 500ns making 1 call to Search::Elasticsearch::Role::Transport::cxn_pool
2010011.07ms1700ns my $logger = $self->logger;
# spent 700ns making 1 call to Search::Elasticsearch::Role::Transport::logger
21
221001356µs my ( $code, $response, $cxn, $error );
23
24
# spent 20.4s (30.0ms+20.4) within Search::Elasticsearch::Transport::try {...} which was called 1001 times, avg 20.4ms/call: # 1001 times (30.0ms+20.4s) by Try::Tiny::try at line 92 of Try/Tiny.pm, avg 20.4ms/call
try {
2510018.10ms10011.59s $cxn = $pool->next_cxn;
# spent 1.59s making 1001 calls to Search::Elasticsearch::CxnPool::Static::next_cxn, avg 1.59ms/call
2610014.62ms10011.90ms my $start = time();
# spent 1.90ms making 1001 calls to Time::HiRes::time, avg 2µs/call
2710012.38ms1001127ms $logger->trace_request( $cxn, $params );
# spent 127ms making 1001 calls to Search::Elasticsearch::Role::Logger::trace_request, avg 127µs/call
28
2910013.05ms100118.6s ( $code, $response ) = $cxn->perform_request($params);
# spent 18.6s making 1001 calls to Search::Elasticsearch::Cxn::HTTPTiny::perform_request, avg 18.6ms/call
3010013.64ms100116.4ms $pool->request_ok($cxn);
# spent 16.4ms making 1001 calls to Search::Elasticsearch::Role::CxnPool::request_ok, avg 16µs/call
31100110.6ms200286.5ms $logger->trace_response( $cxn, $code, $response, time() - $start );
# spent 84.5ms making 1001 calls to Search::Elasticsearch::Role::Logger::trace_response, avg 84µs/call # spent 1.92ms making 1001 calls to Time::HiRes::time, avg 2µs/call
32 }
33 catch {
34 $error = upgrade_error(
35 $_,
36 { request => $params,
37 status_code => $code,
38 body => $response
39 }
40 );
41100112.9ms200220.4s };
# spent 20.4s making 1001 calls to Try::Tiny::try, avg 20.4ms/call # spent 6.59ms making 1001 calls to Try::Tiny::catch, avg 7µs/call
42
431001443µs if ($error) {
44 if ( $pool->request_failed( $cxn, $error ) ) {
45 $logger->debugf( "[%s] %s", $cxn->stringify, "$error" );
46 $logger->info('Retrying request on a new cxn');
47 return $self->perform_request($params);
48 }
49
50 $logger->trace_error( $cxn, $error );
51 $error->is('NoNodes')
52 ? $logger->throw_critical($error)
53 : $logger->throw_error($error);
54 }
55
5610016.17ms return $response;
57}
58
5915µs1;
60
61#ABSTRACT: Provides interface between the client class and the Elasticsearch cluster
62
6316µs1264µs__END__