Filename | /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client.pm |
Statements | Executed 14 statements in 204µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 16µs | 328µs | BEGIN@3 | Search::Elasticsearch::Role::Client::
1 | 1 | 1 | 15µs | 6.71ms | perform_request | Search::Elasticsearch::Role::Client::
1 | 1 | 1 | 10µs | 46µs | __ANON__[:3] | Search::Elasticsearch::Role::Client::
1 | 1 | 1 | 9µs | 202µs | BEGIN@4 | Search::Elasticsearch::Role::Client::
3 | 3 | 2 | 3µs | 3µs | transport (xsub) | Search::Elasticsearch::Role::Client::
1 | 1 | 1 | 600ns | 600ns | 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 | 500ns | $Search::Elasticsearch::Role::Client::VERSION = '2.02'; | ||
3 | 4 | 45µs | 3 | 677µs | # spent 46µs (10+36) within Search::Elasticsearch::Role::Client::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client.pm:3] which was called:
# once (10µs+36µs) by import::into at line 34 of Import/Into.pm
# spent 328µs (16+313) within Search::Elasticsearch::Role::Client::BEGIN@3 which was called:
# once (16µs+313µs) by Module::Runtime::require_module at line 3 # spent 328µs making 1 call to Search::Elasticsearch::Role::Client::BEGIN@3
# spent 313µs making 1 call to Moo::Role::import
# spent 36µs making 1 call to strictures::import |
4 | 2 | 122µs | 2 | 395µs | # spent 202µs (9+193) within Search::Elasticsearch::Role::Client::BEGIN@4 which was called:
# once (9µs+193µs) by Module::Runtime::require_module at line 4 # spent 202µs making 1 call to Search::Elasticsearch::Role::Client::BEGIN@4
# spent 193µs making 1 call to namespace::clean::import |
5 | |||||
6 | 1 | 1µs | 1 | 8µs | requires 'parse_request'; # spent 8µs making 1 call to Moo::Role::requires |
7 | |||||
8 | 1 | 2µs | 1 | 139µs | has 'transport' => ( is => 'ro', required => 1 ); # spent 139µs making 1 call to Moo::Role::has |
9 | 1 | 1µs | 1 | 112µs | has 'logger' => ( is => 'ro', required => 1 ); # spent 112µs making 1 call to Moo::Role::has |
10 | |||||
11 | #=================================== | ||||
12 | # spent 6.71ms (15µs+6.70) within Search::Elasticsearch::Role::Client::perform_request which was called:
# once (15µs+6.70ms) by Search::Elasticsearch::Role::Client::Direct::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct.pm:102] at line 101 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct.pm | ||||
13 | #=================================== | ||||
14 | 1 | 300ns | my $self = shift; | ||
15 | 1 | 2µs | 1 | 158µs | my $request = $self->parse_request(@_); # spent 158µs making 1 call to Search::Elasticsearch::Role::Client::Direct::parse_request |
16 | 1 | 12µs | 2 | 6.54ms | return $self->transport->perform_request($request); # spent 6.54ms making 1 call to Search::Elasticsearch::Transport::perform_request
# spent 1µs making 1 call to Search::Elasticsearch::Role::Client::transport |
17 | } | ||||
18 | |||||
19 | 1 | 7µ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 2.02 | ||||
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 | 12µs | 1 | 285µs | __END__ # spent 285µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__[/opt/flows/lib/lib/perl5/B/Hooks/EndOfScope/XS.pm:17] |
# spent 600ns within Search::Elasticsearch::Role::Client::logger which was called:
# once (600ns+0s) by Search::Elasticsearch::Role::Client::Direct::Main::_build_namespace at line 81 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct/Main.pm | |||||
# spent 3µs within Search::Elasticsearch::Role::Client::transport which was called 3 times, avg 1µs/call:
# once (1µs+0s) by Search::Elasticsearch::Role::Client::perform_request at line 16
# once (1µs+0s) by Search::Elasticsearch::Role::Client::Direct::Main::_build_namespace at line 81 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct/Main.pm
# once (1µs+0s) by Search::Elasticsearch::Role::Client::Direct::Main::_build_helper at line 47 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct/Main.pm |