Filename | /home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Search/Elasticsearch/Cxn/Factory.pm |
Statements | Executed 11023 statements in 28.9ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1001 | 1 | 1 | 22.3ms | 162ms | BUILDARGS | Search::Elasticsearch::Cxn::Factory::
1001 | 1 | 1 | 20.1ms | 446ms | __ANON__[:28] | Search::Elasticsearch::Cxn::Factory::
1001 | 1 | 1 | 4.68ms | 450ms | new_cxn | Search::Elasticsearch::Cxn::Factory::
1 | 1 | 1 | 8µs | 532µs | BEGIN@3 | Search::Elasticsearch::Cxn::Factory::
1 | 1 | 1 | 6µs | 122µs | BEGIN@5 | Search::Elasticsearch::Cxn::Factory::
1 | 1 | 1 | 6µs | 138µs | BEGIN@4 | Search::Elasticsearch::Cxn::Factory::
1 | 1 | 1 | 2µs | 2µs | default_host (xsub) | Search::Elasticsearch::Cxn::Factory::
1 | 1 | 1 | 700ns | 700ns | max_content_length (xsub) | Search::Elasticsearch::Cxn::Factory::
1 | 1 | 1 | 500ns | 500ns | _factory (xsub) | Search::Elasticsearch::Cxn::Factory::
1 | 1 | 1 | 500ns | 500ns | cxn_class (xsub) | Search::Elasticsearch::Cxn::Factory::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Search::Elasticsearch::Cxn::Factory; | ||||
2 | 1 | 200ns | $Search::Elasticsearch::Cxn::Factory::VERSION = '5.01'; | ||
3 | 2 | 23µs | 2 | 1.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 # spent 532µs making 1 call to Search::Elasticsearch::Cxn::Factory::BEGIN@3
# spent 523µs making 1 call to Moo::import |
4 | 2 | 20µs | 2 | 270µ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 # 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] |
5 | 2 | 205µs | 2 | 237µ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 # spent 122µs making 1 call to Search::Elasticsearch::Cxn::Factory::BEGIN@5
# spent 116µs making 1 call to namespace::clean::import |
6 | |||||
7 | 1 | 900ns | 1 | 217µs | has 'cxn_class' => ( is => 'ro', required => 1 ); # spent 217µs making 1 call to Moo::has |
8 | 1 | 400ns | 1 | 91µs | has '_factory' => ( is => 'ro', required => 1 ); # spent 91µs making 1 call to Moo::has |
9 | 1 | 500ns | 1 | 78µs | has 'default_host' => ( is => 'ro', default => 'http://localhost:9200' ); # spent 78µs making 1 call to Moo::has |
10 | 1 | 600ns | 1 | 82µs | has '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 | ||||
14 | #=================================== | ||||
15 | 1001 | 1.96ms | 1001 | 5.02ms | my ( $class, $params ) = parse_params(@_); # spent 5.02ms making 1001 calls to Search::Elasticsearch::Util::parse_params, avg 5µs/call |
16 | 1001 | 2.26ms | my %args = (%$params); | ||
17 | 1001 | 636µs | delete $args{nodes}; | ||
18 | |||||
19 | my $cxn_class | ||||
20 | 1001 | 1.74ms | 1001 | 135ms | = 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 | ||||
22 | 1001 | 532µs | my ( $self, $node ) = @_; | ||
23 | 1001 | 9.15ms | 1002 | 422ms | $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 | ); | ||||
28 | 1001 | 4.46ms | }; | ||
29 | 1001 | 794µs | $params->{cxn_args} = \%args; | ||
30 | 1001 | 696µs | $params->{cxn_class} = $cxn_class; | ||
31 | 1001 | 2.29ms | return $params; | ||
32 | } | ||||
33 | |||||
34 | #=================================== | ||||
35 | 1001 | 4.13ms | 1002 | 446ms | # 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 # spent 446ms making 1001 calls to Search::Elasticsearch::Cxn::Factory::__ANON__[Search/Elasticsearch/Cxn/Factory.pm:28], avg 445µs/call
# spent 500ns making 1 call to Search::Elasticsearch::Cxn::Factory::_factory |
36 | #=================================== | ||||
37 | |||||
38 | 1 | 5µs | 1; | ||
39 | |||||
40 | =pod | ||||
41 | |||||
42 | =encoding UTF-8 | ||||
43 | |||||
44 | =head1 NAME | ||||
45 | |||||
46 | Search::Elasticsearch::Cxn::Factory - Used by CxnPools to create new Cxn instances. | ||||
47 | |||||
48 | =head1 VERSION | ||||
49 | |||||
50 | version 5.01 | ||||
51 | |||||
52 | =head1 DESCRIPTION | ||||
53 | |||||
54 | This class is used by the L<Search::Elasticsearch::Role::CxnPool> implementations | ||||
55 | to create new L<Search::Elasticsearch::Role::Cxn>-based instances. It holds on | ||||
56 | to all the configuration options passed to L<Elasticsearch/new()> so | ||||
57 | that new Cxns can use them. | ||||
58 | |||||
59 | It contains no user serviceable parts. | ||||
60 | |||||
61 | =head1 AUTHOR | ||||
62 | |||||
63 | Clinton Gormley <drtech@cpan.org> | ||||
64 | |||||
65 | =head1 COPYRIGHT AND LICENSE | ||||
66 | |||||
67 | This software is Copyright (c) 2016 by Elasticsearch BV. | ||||
68 | |||||
69 | This is free software, licensed under: | ||||
70 | |||||
71 | The Apache License, Version 2.0, January 2004 | ||||
72 | |||||
73 | =cut | ||||
74 | |||||
75 | 1 | 7µs | 1 | 157µs | __END__ # spent 157µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:17] |
# spent 500ns within Search::Elasticsearch::Cxn::Factory::_factory which was called:
# once (500ns+0s) by Search::Elasticsearch::Cxn::Factory::new_cxn at line 35 | |||||
# 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 | |||||
# 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 | |||||
# 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 |