← 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/Cxn/Factory.pm
StatementsExecuted 11023 statements in 28.9ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
10011122.3ms162msSearch::Elasticsearch::Cxn::Factory::::BUILDARGSSearch::Elasticsearch::Cxn::Factory::BUILDARGS
10011120.1ms446msSearch::Elasticsearch::Cxn::Factory::::__ANON__[:28]Search::Elasticsearch::Cxn::Factory::__ANON__[:28]
1001114.68ms450msSearch::Elasticsearch::Cxn::Factory::::new_cxnSearch::Elasticsearch::Cxn::Factory::new_cxn
1118µs532µsSearch::Elasticsearch::Cxn::Factory::::BEGIN@3Search::Elasticsearch::Cxn::Factory::BEGIN@3
1116µs122µsSearch::Elasticsearch::Cxn::Factory::::BEGIN@5Search::Elasticsearch::Cxn::Factory::BEGIN@5
1116µs138µsSearch::Elasticsearch::Cxn::Factory::::BEGIN@4Search::Elasticsearch::Cxn::Factory::BEGIN@4
1112µs2µsSearch::Elasticsearch::Cxn::Factory::::default_hostSearch::Elasticsearch::Cxn::Factory::default_host (xsub)
111700ns700nsSearch::Elasticsearch::Cxn::Factory::::max_content_lengthSearch::Elasticsearch::Cxn::Factory::max_content_length (xsub)
111500ns500nsSearch::Elasticsearch::Cxn::Factory::::_factorySearch::Elasticsearch::Cxn::Factory::_factory (xsub)
111500ns500nsSearch::Elasticsearch::Cxn::Factory::::cxn_classSearch::Elasticsearch::Cxn::Factory::cxn_class (xsub)
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::Cxn::Factory;
21200ns$Search::Elasticsearch::Cxn::Factory::VERSION = '5.01';
3223µs21.05ms
# spent 532µs (8+523) within Search::Elasticsearch::Cxn::Factory::BEGIN@3 which was called: # once (8µs+523µs) by Module::Runtime::require_module at line 3
use Moo;
# spent 532µs making 1 call to Search::Elasticsearch::Cxn::Factory::BEGIN@3 # spent 523µs making 1 call to Moo::import
4220µs2270µs
# spent 138µs (6+132) within Search::Elasticsearch::Cxn::Factory::BEGIN@4 which was called: # once (6µs+132µs) by Module::Runtime::require_module at line 4
use Search::Elasticsearch::Util qw(parse_params load_plugin);
# spent 138µs making 1 call to Search::Elasticsearch::Cxn::Factory::BEGIN@4 # spent 132µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337]
52205µs2237µs
# spent 122µs (6+116) within Search::Elasticsearch::Cxn::Factory::BEGIN@5 which was called: # once (6µs+116µs) by Module::Runtime::require_module at line 5
use namespace::clean;
# spent 122µs making 1 call to Search::Elasticsearch::Cxn::Factory::BEGIN@5 # spent 116µs making 1 call to namespace::clean::import
6
71900ns1217µshas 'cxn_class' => ( is => 'ro', required => 1 );
# spent 217µs making 1 call to Moo::has
81400ns191µshas '_factory' => ( is => 'ro', required => 1 );
# spent 91µs making 1 call to Moo::has
91500ns178µshas 'default_host' => ( is => 'ro', default => 'http://localhost:9200' );
# spent 78µs making 1 call to Moo::has
101600ns182µshas 'max_content_length' => ( is => 'rw', default => 104_857_600 );
# spent 82µs making 1 call to Moo::has
11
12#===================================
13
# spent 162ms (22.3+140) within Search::Elasticsearch::Cxn::Factory::BUILDARGS which was called 1001 times, avg 162µs/call: # 1001 times (22.3ms+140ms) by Search::Elasticsearch::Cxn::Factory::new at line 33 of (eval 245)[Sub/Quote.pm:3], avg 162µs/call
sub BUILDARGS {
14#===================================
1510011.96ms10015.02ms my ( $class, $params ) = parse_params(@_);
# spent 5.02ms making 1001 calls to Search::Elasticsearch::Util::parse_params, avg 5µs/call
1610012.26ms my %args = (%$params);
171001636µs delete $args{nodes};
18
19 my $cxn_class
2010011.74ms1001135ms = load_plugin( 'Search::Elasticsearch::Cxn', delete $args{cxn} );
# spent 135ms making 1001 calls to Search::Elasticsearch::Util::load_plugin, avg 134µs/call
21
# spent 446ms (20.1+426) within Search::Elasticsearch::Cxn::Factory::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Search/Elasticsearch/Cxn/Factory.pm:28] which was called 1001 times, avg 445µs/call: # 1001 times (20.1ms+426ms) by Search::Elasticsearch::Cxn::Factory::new_cxn at line 35, avg 445µs/call
$params->{_factory} = sub {
221001532µs my ( $self, $node ) = @_;
2310019.15ms1002422ms $cxn_class->new(
# spent 422ms making 1001 calls to Search::Elasticsearch::Cxn::HTTPTiny::new, avg 422µs/call # spent 700ns making 1 call to Search::Elasticsearch::Cxn::Factory::max_content_length
24 %args,
25 node => $node,
26 max_content_length => $self->max_content_length
27 );
2810014.46ms };
291001794µs $params->{cxn_args} = \%args;
301001696µs $params->{cxn_class} = $cxn_class;
3110012.29ms return $params;
32}
33
34#===================================
3510014.13ms1002446ms
# spent 450ms (4.68+446) within Search::Elasticsearch::Cxn::Factory::new_cxn which was called 1001 times, avg 450µs/call: # 1001 times (4.68ms+446ms) by Search::Elasticsearch::Role::CxnPool::set_cxns at line 51 of Search/Elasticsearch/Role/CxnPool.pm, avg 450µs/call
sub new_cxn { shift->_factory->(@_) }
36#===================================
37
3815µs1;
39
40=pod
41
42=encoding UTF-8
43
44=head1 NAME
45
46Search::Elasticsearch::Cxn::Factory - Used by CxnPools to create new Cxn instances.
47
48=head1 VERSION
49
50version 5.01
51
52=head1 DESCRIPTION
53
54This class is used by the L<Search::Elasticsearch::Role::CxnPool> implementations
55to create new L<Search::Elasticsearch::Role::Cxn>-based instances. It holds on
56to all the configuration options passed to L<Elasticsearch/new()> so
57that new Cxns can use them.
58
59It contains no user serviceable parts.
60
61=head1 AUTHOR
62
63Clinton Gormley <drtech@cpan.org>
64
65=head1 COPYRIGHT AND LICENSE
66
67This software is Copyright (c) 2016 by Elasticsearch BV.
68
69This is free software, licensed under:
70
71 The Apache License, Version 2.0, January 2004
72
73=cut
74
7517µs1157µs__END__
 
# spent 500ns within Search::Elasticsearch::Cxn::Factory::_factory which was called: # once (500ns+0s) by Search::Elasticsearch::Cxn::Factory::new_cxn at line 35
sub Search::Elasticsearch::Cxn::Factory::_factory; # xsub
# spent 500ns within Search::Elasticsearch::Cxn::Factory::cxn_class which was called: # once (500ns+0s) by Search::Elasticsearch::Role::Transport::BUILD at line 22 of Search/Elasticsearch/Role/Transport.pm
sub Search::Elasticsearch::Cxn::Factory::cxn_class; # xsub
# spent 2µs within Search::Elasticsearch::Cxn::Factory::default_host which was called: # once (2µs+0s) by Search::Elasticsearch::Role::CxnPool::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Search/Elasticsearch/Role/CxnPool.pm:33] at line 30 of Search/Elasticsearch/Role/CxnPool.pm
sub Search::Elasticsearch::Cxn::Factory::default_host; # xsub
# spent 700ns within Search::Elasticsearch::Cxn::Factory::max_content_length which was called: # once (700ns+0s) by Search::Elasticsearch::Cxn::Factory::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Search/Elasticsearch/Cxn/Factory.pm:28] at line 23
sub Search::Elasticsearch::Cxn::Factory::max_content_length; # xsub