← 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/API.pm
StatementsExecuted 1820 statements in 723µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111400µs400µsSearch::Elasticsearch::Role::API::::_qs_initSearch::Elasticsearch::Role::API::_qs_init
1118µs5.38msSearch::Elasticsearch::Role::API::::BEGIN@3Search::Elasticsearch::Role::API::BEGIN@3
1116µs95µsSearch::Elasticsearch::Role::API::::BEGIN@7Search::Elasticsearch::Role::API::BEGIN@7
1115µs110µsSearch::Elasticsearch::Role::API::::BEGIN@8Search::Elasticsearch::Role::API::BEGIN@8
0000s0sSearch::Elasticsearch::Role::API::::__ANON__[:11]Search::Elasticsearch::Role::API::__ANON__[:11]
0000s0sSearch::Elasticsearch::Role::API::::__ANON__[:16]Search::Elasticsearch::Role::API::__ANON__[:16]
0000s0sSearch::Elasticsearch::Role::API::::__ANON__[:19]Search::Elasticsearch::Role::API::__ANON__[:19]
0000s0sSearch::Elasticsearch::Role::API::::__ANON__[:24]Search::Elasticsearch::Role::API::__ANON__[:24]
0000s0sSearch::Elasticsearch::Role::API::::__ANON__[:25]Search::Elasticsearch::Role::API::__ANON__[:25]
0000s0sSearch::Elasticsearch::Role::API::::__ANON__[:26]Search::Elasticsearch::Role::API::__ANON__[:26]
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::API;
21300ns$Search::Elasticsearch::Role::API::VERSION = '5.01';
3238µs210.8ms
# spent 5.38ms (8µs+5.38) within Search::Elasticsearch::Role::API::BEGIN@3 which was called: # once (8µs+5.38ms) by Module::Runtime::require_module at line 3
use Moo::Role;
# spent 5.38ms making 1 call to Search::Elasticsearch::Role::API::BEGIN@3 # spent 5.38ms making 1 call to Moo::Role::import
41800ns19µsrequires 'api_version';
# spent 9µs making 1 call to Moo::Role::requires
51500ns13µsrequires 'api';
# spent 3µs making 1 call to Moo::Role::requires
6
7219µs2184µs
# spent 95µs (6+89) within Search::Elasticsearch::Role::API::BEGIN@7 which was called: # once (6µs+89µs) by Module::Runtime::require_module at line 7
use Search::Elasticsearch::Util qw(throw);
# spent 95µs making 1 call to Search::Elasticsearch::Role::API::BEGIN@7 # spent 89µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337]
82244µs2214µs
# spent 110µs (5+105) within Search::Elasticsearch::Role::API::BEGIN@8 which was called: # once (5µs+105µs) by Module::Runtime::require_module at line 8
use namespace::clean;
# spent 110µs making 1 call to Search::Elasticsearch::Role::API::BEGIN@8 # spent 105µs making 1 call to namespace::clean::import
9
10our %Handler = (
11 string => sub {"$_[0]"},
12 list => sub {
13 ref $_[0] eq 'ARRAY'
14 ? join( ',', @{ shift() } )
15 : shift();
16 },
17 boolean => sub {
18 $_[0] && $_[0] ne 'false' ? 'true' : 'false';
19 },
20 enum => sub {
21 ref $_[0] eq 'ARRAY'
22 ? join( ',', @{ shift() } )
23 : shift();
24 },
25 number => sub { 0 + $_[0] },
26 time => sub {"$_[0]"}
2715µs);
28
29#===================================
30
# spent 400µs within Search::Elasticsearch::Role::API::_qs_init which was called: # once (400µs+0s) by Module::Runtime::require_module at line 2255 of Search/Elasticsearch/Client/5_0/Role/API.pm
sub _qs_init {
31#===================================
321600ns my $class = shift;
331400ns my $API = shift;
34110µs for my $spec ( keys %$API ) {
3512321µs my $qs = $API->{$spec}{qs};
3612390µs for my $param ( keys %$qs ) {
37 my $handler = $Handler{ $qs->{$param} }
38 or throw( "Internal",
39 "Unknown type <"
40780133µs . $qs->{$param}
41 . "> for param <$param> in API <$spec>" );
42780148µs $qs->{$param} = $handler;
43 }
44 }
45}
46
4714µs1;
48
49# ABSTRACT: Provides common functionality for API implementations
50
5118µs1159µs__END__