← 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/Role/CxnPool/Static.pm
StatementsExecuted 9017 statements in 26.9ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
10011139.4ms111msSearch::Elasticsearch::Role::CxnPool::Static::::schedule_checkSearch::Elasticsearch::Role::CxnPool::Static::schedule_check
10011119.5ms767msSearch::Elasticsearch::Role::CxnPool::Static::::BUILDSearch::Elasticsearch::Role::CxnPool::Static::BUILD
11116µs709µsSearch::Elasticsearch::Role::CxnPool::Static::::BEGIN@3Search::Elasticsearch::Role::CxnPool::Static::BEGIN@3
1119µs184µsSearch::Elasticsearch::Role::CxnPool::Static::::BEGIN@7Search::Elasticsearch::Role::CxnPool::Static::BEGIN@7
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::Role::CxnPool::Static;
21400ns$Search::Elasticsearch::Role::CxnPool::Static::VERSION = '5.01';
3233µs21.40ms
# spent 709µs (16+693) within Search::Elasticsearch::Role::CxnPool::Static::BEGIN@3 which was called: # once (16µs+693µs) by Module::Runtime::require_module at line 3
use Moo::Role;
# spent 709µs making 1 call to Search::Elasticsearch::Role::CxnPool::Static::BEGIN@3 # spent 693µs making 1 call to Moo::Role::import
412µs15.60mswith 'Search::Elasticsearch::Role::CxnPool';
# spent 5.60ms making 1 call to Moo::Role::with
51900ns14µsrequires 'next_cxn';
# spent 4µs making 1 call to Moo::Role::requires
6
72158µs2360µs
# spent 184µs (9+176) within Search::Elasticsearch::Role::CxnPool::Static::BEGIN@7 which was called: # once (9µs+176µs) by Module::Runtime::require_module at line 7
use namespace::clean;
# spent 184µs making 1 call to Search::Elasticsearch::Role::CxnPool::Static::BEGIN@7 # spent 176µs making 1 call to namespace::clean::import
8
9#===================================
10
# spent 767ms (19.5+747) within Search::Elasticsearch::Role::CxnPool::Static::BUILD which was called 1001 times, avg 766µs/call: # 1001 times (19.5ms+747ms) by Search::Elasticsearch::CxnPool::Static::new at line 72 of (eval 282)[Sub/Quote.pm:3], avg 766µs/call
sub BUILD {
11#===================================
121001375µs my $self = shift;
1310013.02ms1002636ms $self->set_cxns( @{ $self->seed_nodes } );
# spent 636ms making 1001 calls to Search::Elasticsearch::Role::CxnPool::set_cxns, avg 636µs/call # spent 400ns making 1 call to Search::Elasticsearch::Role::CxnPool::seed_nodes
1410013.64ms1001111ms $self->schedule_check;
# spent 111ms making 1001 calls to Search::Elasticsearch::Role::CxnPool::Static::schedule_check, avg 111µs/call
15}
16
17#===================================
18
# spent 111ms (39.4+71.7) within Search::Elasticsearch::Role::CxnPool::Static::schedule_check which was called 1001 times, avg 111µs/call: # 1001 times (39.4ms+71.7ms) by Search::Elasticsearch::Role::CxnPool::Static::BUILD at line 14, avg 111µs/call
sub schedule_check {
19#===================================
201001395µs my ($self) = @_;
2110012.65ms10021.97ms $self->logger->info("Forcing ping before next use on all live cxns");
# spent 1.97ms making 1001 calls to Search::Elasticsearch::Role::Logger::info, avg 2µs/call # spent 400ns making 1 call to Search::Elasticsearch::Role::CxnPool::logger
2210019.31ms1700ns for my $cxn ( @{ $self->cxns } ) {
# spent 700ns making 1 call to Search::Elasticsearch::Role::CxnPool::cxns
2310012.28ms10012.36ms next if $cxn->is_dead;
# spent 2.36ms making 1001 calls to Search::Elasticsearch::Role::Cxn::is_dead, avg 2µs/call
2410012.62ms200310.2ms $self->logger->infof( "Ping [%s] before next request",
# spent 9.42ms making 1001 calls to Search::Elasticsearch::Role::Cxn::stringify, avg 9µs/call # spent 818µs making 1001 calls to Search::Elasticsearch::Role::Logger::infof, avg 817ns/call # spent 300ns making 1 call to Search::Elasticsearch::Role::CxnPool::logger
25 $cxn->stringify );
2610012.35ms10013.11ms $cxn->force_ping;
# spent 3.11ms making 1001 calls to Search::Elasticsearch::Role::Cxn::force_ping, avg 3µs/call
27 }
28}
29
3015µs1;
31
32=pod
33
34=encoding UTF-8
35
36=head1 NAME
37
38Search::Elasticsearch::Role::CxnPool::Static - A CxnPool role for connecting to a remote cluster with a static list of nodes.
39
40=head1 VERSION
41
42version 5.01
43
44=head1 METHODS
45
46=head2 C<schedule_check()>
47
48 $cxn_pool->schedule_check
49
50Forces a ping on each cxn in L<cxns()|Search::Elasticsearch::Role::CxnPool/cxns()>
51before the next time that cxn is used for a request.
52
53=head1 AUTHOR
54
55Clinton Gormley <drtech@cpan.org>
56
57=head1 COPYRIGHT AND LICENSE
58
59This software is Copyright (c) 2016 by Elasticsearch BV.
60
61This is free software, licensed under:
62
63 The Apache License, Version 2.0, January 2004
64
65=cut
66
6719µs1255µs__END__