Filename | /home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Search/Elasticsearch/Role/Client.pm |
Statements | Executed 3012 statements in 11.7ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1001 | 1 | 1 | 30.5ms | 20.8s | perform_request | Search::Elasticsearch::Role::Client::
1 | 1 | 1 | 9µs | 497µs | BEGIN@3 | Search::Elasticsearch::Role::Client::
1 | 1 | 1 | 5µs | 97µs | BEGIN@4 | Search::Elasticsearch::Role::Client::
2 | 2 | 2 | 2µs | 2µs | transport (xsub) | Search::Elasticsearch::Role::Client::
1 | 1 | 1 | 500ns | 500ns | logger (xsub) | Search::Elasticsearch::Role::Client::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Search::Elasticsearch::Role::Client; | ||||
2 | 1 | 300ns | $Search::Elasticsearch::Role::Client::VERSION = '5.01'; | ||
3 | 2 | 21µs | 2 | 986µs | # spent 497µs (9+488) within Search::Elasticsearch::Role::Client::BEGIN@3 which was called:
# once (9µs+488µs) by Module::Runtime::require_module at line 3 # spent 497µs making 1 call to Search::Elasticsearch::Role::Client::BEGIN@3
# spent 488µs making 1 call to Moo::Role::import |
4 | 2 | 60µs | 2 | 189µs | # spent 97µs (5+92) within Search::Elasticsearch::Role::Client::BEGIN@4 which was called:
# once (5µs+92µs) by Module::Runtime::require_module at line 4 # spent 97µs making 1 call to Search::Elasticsearch::Role::Client::BEGIN@4
# spent 92µs making 1 call to namespace::clean::import |
5 | |||||
6 | 1 | 600ns | 1 | 7µs | requires 'parse_request'; # spent 7µs making 1 call to Moo::Role::requires |
7 | |||||
8 | 1 | 800ns | 1 | 91µs | has 'transport' => ( is => 'ro', required => 1 ); # spent 91µs making 1 call to Moo::Role::has |
9 | 1 | 600ns | 1 | 51µs | has 'logger' => ( is => 'ro', required => 1 ); # spent 51µs making 1 call to Moo::Role::has |
10 | |||||
11 | #=================================== | ||||
12 | # spent 20.8s (30.5ms+20.8) within Search::Elasticsearch::Role::Client::perform_request which was called 1001 times, avg 20.8ms/call:
# 1001 times (30.5ms+20.8s) by Search::Elasticsearch::Role::Client::Direct::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Search/Elasticsearch/Role/Client/Direct.pm:140] at line 139 of Search/Elasticsearch/Role/Client/Direct.pm, avg 20.8ms/call | ||||
13 | #=================================== | ||||
14 | 1001 | 407µs | my $self = shift; | ||
15 | 1001 | 2.69ms | 1001 | 213ms | my $request = $self->parse_request(@_); # spent 213ms making 1001 calls to Search::Elasticsearch::Role::Client::Direct::parse_request, avg 213µs/call |
16 | 1001 | 8.51ms | 1002 | 20.6s | return $self->transport->perform_request($request); # spent 20.6s making 1001 calls to Search::Elasticsearch::Transport::perform_request, avg 20.5ms/call
# spent 1µs making 1 call to Search::Elasticsearch::Role::Client::transport |
17 | } | ||||
18 | |||||
19 | 1 | 4µs | 1; | ||
20 | |||||
21 | =pod | ||||
22 | |||||
23 | =encoding UTF-8 | ||||
24 | |||||
25 | =head1 NAME | ||||
26 | |||||
27 | Search::Elasticsearch::Role::Client - Provides common functionality for Client implementations | ||||
28 | |||||
29 | =head1 VERSION | ||||
30 | |||||
31 | version 5.01 | ||||
32 | |||||
33 | =head1 DESCRIPTION | ||||
34 | |||||
35 | This role provides a common C<perform_request()> method for Client | ||||
36 | implementations. | ||||
37 | |||||
38 | =head1 METHODS | ||||
39 | |||||
40 | =head2 C<perform_request()> | ||||
41 | |||||
42 | This method takes whatever arguments it is passed and passes them directly to | ||||
43 | a C<parse_request()> method (which should be provided by Client implementations). | ||||
44 | The C<parse_request()> method should return a request suitable for passing | ||||
45 | to L<Search::Elasticsearch::Transport/perform_request()>. | ||||
46 | |||||
47 | =head1 AUTHOR | ||||
48 | |||||
49 | Clinton Gormley <drtech@cpan.org> | ||||
50 | |||||
51 | =head1 COPYRIGHT AND LICENSE | ||||
52 | |||||
53 | This software is Copyright (c) 2016 by Elasticsearch BV. | ||||
54 | |||||
55 | This is free software, licensed under: | ||||
56 | |||||
57 | The Apache License, Version 2.0, January 2004 | ||||
58 | |||||
59 | =cut | ||||
60 | |||||
61 | 1 | 6µs | 1 | 129µs | __END__ # spent 129µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:17] |
# spent 500ns within Search::Elasticsearch::Role::Client::logger which was called:
# once (500ns+0s) by Search::Elasticsearch::Role::Client::Direct::_build_namespace at line 150 of Search/Elasticsearch/Role/Client/Direct.pm | |||||
# spent 2µs within Search::Elasticsearch::Role::Client::transport which was called 2 times, avg 1µs/call:
# once (1µs+0s) by Search::Elasticsearch::Role::Client::Direct::_build_namespace at line 150 of Search/Elasticsearch/Role/Client/Direct.pm
# once (1µs+0s) by Search::Elasticsearch::Role::Client::perform_request at line 16 |