Filename | /home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Search/Elasticsearch/Role/Client/Direct.pm |
Statements | Executed 53538 statements in 168ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1001 | 1 | 1 | 52.4ms | 79.5ms | _parse_path | Search::Elasticsearch::Role::Client::Direct::
1001 | 1 | 1 | 34.6ms | 123ms | try {...} | Search::Elasticsearch::Role::Client::Direct::
1001 | 1 | 1 | 23.6ms | 213ms | parse_request | Search::Elasticsearch::Role::Client::Direct::
1001 | 2 | 1 | 6.93ms | 20.8s | __ANON__[:140] | Search::Elasticsearch::Role::Client::Direct::
2 | 2 | 2 | 5.33ms | 6.04ms | _install_api | Search::Elasticsearch::Role::Client::Direct::
1001 | 1 | 1 | 5.11ms | 5.11ms | _parse_qs | Search::Elasticsearch::Role::Client::Direct::
1001 | 1 | 1 | 4.23ms | 4.23ms | _parse_body | Search::Elasticsearch::Role::Client::Direct::
1 | 1 | 1 | 235µs | 383µs | BEGIN@9 | Search::Elasticsearch::Role::Client::Direct::
247 | 2 | 1 | 98µs | 98µs | CORE:regcomp (opcode) | Search::Elasticsearch::Role::Client::Direct::
246 | 1 | 1 | 85µs | 85µs | CORE:match (opcode) | Search::Elasticsearch::Role::Client::Direct::
1 | 1 | 1 | 24µs | 3.16ms | _build_namespace | Search::Elasticsearch::Role::Client::Direct::
1 | 1 | 1 | 9µs | 482µs | BEGIN@3 | Search::Elasticsearch::Role::Client::Direct::
1 | 1 | 1 | 8µs | 17µs | BEGIN@8 | Search::Elasticsearch::Role::Client::Direct::
1 | 1 | 1 | 7µs | 19µs | BEGIN@53 | Search::Elasticsearch::Role::Client::Direct::
1 | 1 | 1 | 6µs | 34µs | BEGIN@7 | Search::Elasticsearch::Role::Client::Direct::
1 | 1 | 1 | 6µs | 152µs | BEGIN@5 | Search::Elasticsearch::Role::Client::Direct::
1 | 1 | 1 | 5µs | 177µs | BEGIN@10 | Search::Elasticsearch::Role::Client::Direct::
2 | 1 | 1 | 2µs | 2µs | CORE:qr (opcode) | Search::Elasticsearch::Role::Client::Direct::
0 | 0 | 0 | 0s | 0s | analyze | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | clear_cache | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | close | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | create | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | delete | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | delete_alias | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | delete_template | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | exists | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | exists_alias | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | exists_template | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | exists_type | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | flush | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | flush_synced | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | forcemerge | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | get | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | get_alias | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | get_field_mapping | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | get_mapping | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | get_settings | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | get_template | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | get_upgrade | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | open | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | put_alias | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | put_mapping | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | put_settings | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | put_template | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | recovery | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | refresh | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | rollover | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | segments | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | shard_stores | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | shrink | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | stats | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | update_aliases | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | upgrade | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | validate_query | Search::Elasticsearch::Client::5_0::Direct::Indices::
0 | 0 | 0 | 0s | 0s | bulk | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | clear_scroll | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | count | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | count_percolate | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | create | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | delete | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | delete_by_query | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | delete_script | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | delete_template | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | exists | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | explain | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | field_stats | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | get | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | get_script | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | get_source | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | get_template | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | index | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | info | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | mget | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | mpercolate | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | msearch | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | msearch_template | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | mtermvectors | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | percolate | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | ping | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | put_script | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | put_template | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | reindex | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | reindex_rethrottle | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | render_search_template | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | scroll | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | search | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | search_shards | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | search_template | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | suggest | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | termvectors | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | update | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | update_by_query | Search::Elasticsearch::Client::5_0::Direct::
0 | 0 | 0 | 0s | 0s | __ANON__[:29] | Search::Elasticsearch::Role::Client::Direct::
0 | 0 | 0 | 0s | 0s | __ANON__[:38] | Search::Elasticsearch::Role::Client::Direct::
0 | 0 | 0 | 0s | 0s | _build_helper | Search::Elasticsearch::Role::Client::Direct::
0 | 0 | 0 | 0s | 0s | catch {...} | Search::Elasticsearch::Role::Client::Direct::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Search::Elasticsearch::Role::Client::Direct; | ||||
2 | 1 | 300ns | $Search::Elasticsearch::Role::Client::Direct::VERSION = '5.01'; | ||
3 | 2 | 25µs | 2 | 954µs | # spent 482µs (9+472) within Search::Elasticsearch::Role::Client::Direct::BEGIN@3 which was called:
# once (9µs+472µs) by Module::Runtime::require_module at line 3 # spent 482µs making 1 call to Search::Elasticsearch::Role::Client::Direct::BEGIN@3
# spent 472µs making 1 call to Moo::Role::import |
4 | 1 | 800ns | 1 | 1.25ms | with 'Search::Elasticsearch::Role::Client'; # spent 1.25ms making 1 call to Moo::Role::with |
5 | 2 | 20µs | 2 | 299µs | # spent 152µs (6+147) within Search::Elasticsearch::Role::Client::Direct::BEGIN@5 which was called:
# once (6µs+147µs) by Module::Runtime::require_module at line 5 # spent 152µs making 1 call to Search::Elasticsearch::Role::Client::Direct::BEGIN@5
# spent 147µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337] |
6 | |||||
7 | 2 | 19µs | 2 | 62µs | # spent 34µs (6+28) within Search::Elasticsearch::Role::Client::Direct::BEGIN@7 which was called:
# once (6µs+28µs) by Module::Runtime::require_module at line 7 # spent 34µs making 1 call to Search::Elasticsearch::Role::Client::Direct::BEGIN@7
# spent 28µs making 1 call to Exporter::import |
8 | 3 | 28µs | 2 | 26µs | # spent 17µs (8+9) within Search::Elasticsearch::Role::Client::Direct::BEGIN@8 which was called:
# once (8µs+9µs) by Module::Runtime::require_module at line 8 # spent 17µs making 1 call to Search::Elasticsearch::Role::Client::Direct::BEGIN@8
# spent 9µs making 1 call to UNIVERSAL::VERSION |
9 | 2 | 69µs | 2 | 407µs | # spent 383µs (235+148) within Search::Elasticsearch::Role::Client::Direct::BEGIN@9 which was called:
# once (235µs+148µs) by Module::Runtime::require_module at line 9 # spent 383µs making 1 call to Search::Elasticsearch::Role::Client::Direct::BEGIN@9
# spent 24µs making 1 call to Exporter::import |
10 | 2 | 144µs | 2 | 350µs | # spent 177µs (5+172) within Search::Elasticsearch::Role::Client::Direct::BEGIN@10 which was called:
# once (5µs+172µs) by Module::Runtime::require_module at line 10 # spent 177µs making 1 call to Search::Elasticsearch::Role::Client::Direct::BEGIN@10
# spent 172µs making 1 call to namespace::clean::import |
11 | |||||
12 | #=================================== | ||||
13 | # spent 213ms (23.6+189) within Search::Elasticsearch::Role::Client::Direct::parse_request which was called 1001 times, avg 213µs/call:
# 1001 times (23.6ms+189ms) by Search::Elasticsearch::Role::Client::perform_request at line 15 of Search/Elasticsearch/Role/Client.pm, avg 213µs/call | ||||
14 | #=================================== | ||||
15 | 1001 | 442µs | my $self = shift; | ||
16 | 1001 | 674µs | my $defn = shift || {}; | ||
17 | 1001 | 3.32ms | my $params = { ref $_[0] ? %{ shift() } : @_ }; | ||
18 | |||||
19 | 1001 | 219µs | my $request; | ||
20 | # spent 123ms (34.6+88.9) within Search::Elasticsearch::Role::Client::Direct::try {...} which was called 1001 times, avg 123µs/call:
# 1001 times (34.6ms+88.9ms) by Try::Tiny::try at line 92 of Try/Tiny.pm, avg 123µs/call | ||||
21 | $request = { | ||||
22 | ignore => delete $params->{ignore} || [], | ||||
23 | method => $defn->{method} || 'GET', | ||||
24 | serialize => $defn->{serialize} || 'std', | ||||
25 | path => $self->_parse_path( $defn, $params ), | ||||
26 | body => $self->_parse_body( $defn->{body}, $params ), | ||||
27 | 1001 | 19.8ms | 3003 | 88.9ms | qs => $self->_parse_qs( $defn->{qs}, $params ), # spent 79.5ms making 1001 calls to Search::Elasticsearch::Role::Client::Direct::_parse_path, avg 79µs/call
# spent 5.11ms making 1001 calls to Search::Elasticsearch::Role::Client::Direct::_parse_qs, avg 5µs/call
# spent 4.23ms making 1001 calls to Search::Elasticsearch::Role::Client::Direct::_parse_body, avg 4µs/call |
28 | }; | ||||
29 | } | ||||
30 | catch { | ||||
31 | chomp $_; | ||||
32 | my $name = $defn->{name} || '<unknown method>'; | ||||
33 | $self->logger->throw_error( 'Param', | ||||
34 | "$_ in ($name) request. " | ||||
35 | . "See docs at: http://www.elastic.co/guide/en/elasticsearch/reference/current/" | ||||
36 | . $defn->{doc} | ||||
37 | . '.html' ); | ||||
38 | 1001 | 16.7ms | 2002 | 189ms | }; # spent 157ms making 1001 calls to Try::Tiny::try, avg 157µs/call
# spent 31.9ms making 1001 calls to Try::Tiny::catch, avg 32µs/call |
39 | 1001 | 21.0ms | return $request; | ||
40 | } | ||||
41 | |||||
42 | #=================================== | ||||
43 | # spent 79.5ms (52.4+27.2) within Search::Elasticsearch::Role::Client::Direct::_parse_path which was called 1001 times, avg 79µs/call:
# 1001 times (52.4ms+27.2ms) by Search::Elasticsearch::Role::Client::Direct::try {...} at line 27, avg 79µs/call | ||||
44 | #=================================== | ||||
45 | 1001 | 649µs | my ( $self, $defn, $params ) = @_; | ||
46 | return delete $params->{path} | ||||
47 | 1001 | 606µs | if $params->{path}; | ||
48 | 1001 | 949µs | my $paths = $defn->{paths}; | ||
49 | 1001 | 632µs | my $parts = $defn->{parts}; | ||
50 | |||||
51 | 1001 | 285µs | my %args; | ||
52 | 1001 | 743µs | keys %$parts; | ||
53 | 2 | 358µs | 2 | 31µs | # spent 19µs (7+12) within Search::Elasticsearch::Role::Client::Direct::BEGIN@53 which was called:
# once (7µs+12µs) by Module::Runtime::require_module at line 53 # spent 19µs making 1 call to Search::Elasticsearch::Role::Client::Direct::BEGIN@53
# spent 12µs making 1 call to warnings::unimport |
54 | 1001 | 4.74ms | while ( my ( $key, $req ) = each %$parts ) { | ||
55 | 3001 | 1.40ms | my $val = delete $params->{$key}; | ||
56 | 3001 | 979µs | if ( ref $val eq 'ARRAY' ) { | ||
57 | die "Param ($key) must contain a single value\n" | ||||
58 | if @$val > 1 and not $req->{multi}; | ||||
59 | $val = join ",", @$val; | ||||
60 | } | ||||
61 | 3001 | 800µs | if ( !length $val ) { | ||
62 | die "Missing required param ($key)\n" | ||||
63 | if $req->{required}; | ||||
64 | next; | ||||
65 | } | ||||
66 | 3001 | 9.78ms | 3001 | 2.08ms | utf8::encode($val); # spent 2.08ms making 3001 calls to utf8::encode, avg 692ns/call |
67 | 3001 | 4.62ms | 3001 | 25.1ms | $args{$key} = uri_escape($val); # spent 25.1ms making 3001 calls to URI::Escape::uri_escape, avg 8µs/call |
68 | } | ||||
69 | 1001 | 836µs | PATH: for my $path (@$paths) { | ||
70 | 1001 | 2.33ms | my @keys = keys %{ $path->[0] }; | ||
71 | 1001 | 766µs | next PATH unless @keys == keys %args; | ||
72 | 1001 | 899µs | for (@keys) { | ||
73 | 3001 | 1.13ms | next PATH unless exists $args{$_}; | ||
74 | } | ||||
75 | 1001 | 1.64ms | my ( $pos, @parts ) = @$path; | ||
76 | 1001 | 1.43ms | for ( keys %$pos ) { | ||
77 | 3001 | 1.84ms | $parts[ $pos->{$_} ] = $args{$_}; | ||
78 | } | ||||
79 | 1001 | 4.69ms | return join "/", '', @parts; | ||
80 | } | ||||
81 | |||||
82 | throw( | ||||
83 | 'Internal', | ||||
84 | "Couldn't determine path", | ||||
85 | { params => $params, defn => $defn } | ||||
86 | ); | ||||
87 | } | ||||
88 | |||||
89 | #=================================== | ||||
90 | # spent 4.23ms within Search::Elasticsearch::Role::Client::Direct::_parse_body which was called 1001 times, avg 4µs/call:
# 1001 times (4.23ms+0s) by Search::Elasticsearch::Role::Client::Direct::try {...} at line 27, avg 4µs/call | ||||
91 | #=================================== | ||||
92 | 1001 | 526µs | my ( $self, $defn, $params ) = @_; | ||
93 | 1001 | 549µs | if ( defined $defn ) { | ||
94 | die("Missing required param (body)\n") | ||||
95 | 1000 | 1.30ms | if $defn->{required} && !$params->{body}; | ||
96 | 1000 | 16.3ms | return delete $params->{body}; | ||
97 | } | ||||
98 | 1 | 600ns | die("Unknown param (body)\n") if $params->{body}; | ||
99 | 1 | 2µs | return undef; | ||
100 | } | ||||
101 | |||||
102 | #=================================== | ||||
103 | # spent 5.11ms within Search::Elasticsearch::Role::Client::Direct::_parse_qs which was called 1001 times, avg 5µs/call:
# 1001 times (5.11ms+0s) by Search::Elasticsearch::Role::Client::Direct::try {...} at line 27, avg 5µs/call | ||||
104 | #=================================== | ||||
105 | 1001 | 443µs | my ( $self, $handlers, $params ) = @_; | ||
106 | 1001 | 381µs | die "No (qs) defined\n" unless $handlers; | ||
107 | 1001 | 296µs | my %qs; | ||
108 | |||||
109 | 1001 | 856µs | if ( my $raw = delete $params->{params} ) { | ||
110 | die("Arg (params) shoud be a hashref\n") | ||||
111 | unless ref $raw eq 'HASH'; | ||||
112 | %qs = %$raw; | ||||
113 | } | ||||
114 | |||||
115 | 1001 | 1.45ms | for my $key ( keys %$params ) { | ||
116 | my $handler = $handlers->{$key} | ||||
117 | or die("Unknown param ($key)\n"); | ||||
118 | $qs{$key} = $handler->( delete $params->{$key} ); | ||||
119 | } | ||||
120 | 1001 | 8.34ms | return \%qs; | ||
121 | } | ||||
122 | |||||
123 | #=================================== | ||||
124 | # spent 6.04ms (5.33+709µs) within Search::Elasticsearch::Role::Client::Direct::_install_api which was called 2 times, avg 3.02ms/call:
# once (4.88ms+364µs) by Module::Runtime::require_module at line 68 of Search/Elasticsearch/Client/5_0/Direct.pm
# once (447µs+346µs) by Module::Runtime::require_module at line 6 of Search/Elasticsearch/Client/5_0/Direct/Indices.pm | ||||
125 | #=================================== | ||||
126 | 2 | 500ns | my ( $class, $group ) = @_; | ||
127 | 2 | 2µs | 2 | 2µs | my $defns = $class->api; # spent 2µs making 2 calls to Search::Elasticsearch::Client::5_0::Role::API::api, avg 1µs/call |
128 | 2 | 12µs | 2 | 7µs | my $stash = Package::Stash->new($class); # spent 7µs making 2 calls to Package::Stash::XS::new, avg 4µs/call |
129 | |||||
130 | 2 | 19µs | 3 | 12µs | my $group_qr = $group ? qr/$group\./ : qr//; # spent 10µs making 1 call to Search::Elasticsearch::Role::Client::Direct::CORE:regcomp
# spent 2µs making 2 calls to Search::Elasticsearch::Role::Client::Direct::CORE:qr, avg 800ns/call |
131 | 2 | 40µs | for my $action ( keys %$defns ) { | ||
132 | 246 | 5.06ms | 492 | 173µs | my ($name) = ( $action =~ /^$group_qr([^.]+)$/ ) # spent 88µs making 246 calls to Search::Elasticsearch::Role::Client::Direct::CORE:regcomp, avg 358ns/call
# spent 85µs making 246 calls to Search::Elasticsearch::Role::Client::Direct::CORE:match, avg 347ns/call |
133 | or next; | ||||
134 | 74 | 206µs | 150 | 146µs | next if $stash->has_symbol( '&' . $name ); # spent 125µs making 74 calls to Package::Stash::XS::has_symbol, avg 2µs/call
# spent 20µs making 74 calls to Package::Stash::XS::namespace, avg 272ns/call
# spent 800ns making 2 calls to Package::Stash::XS::name, avg 400ns/call |
135 | |||||
136 | 74 | 155µs | my %defn = ( name => $name, %{ $defns->{$action} } ); | ||
137 | $stash->add_symbol( | ||||
138 | # spent 20.8s (6.93ms+20.8) within 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] which was called 1001 times, avg 20.8ms/call:
# 1000 times (6.93ms+20.8s) by BenchmarkAnything::Storage::Backend::SQL::add_single_benchmark at line 377 of BenchmarkAnything/Storage/Backend/SQL.pm, avg 20.8ms/call
# once (6µs+3.53ms) by BenchmarkAnything::Storage::Backend::SQL::gc at line 462 of BenchmarkAnything/Storage/Backend/SQL.pm | ||||
139 | 1001 | 27.1ms | 1001 | 20.8s | shift->perform_request( \%defn, @_ ); # spent 20.8s making 1001 calls to Search::Elasticsearch::Role::Client::perform_request, avg 20.8ms/call |
140 | } | ||||
141 | 74 | 538µs | 222 | 417µs | ); # spent 390µs making 74 calls to Package::Stash::XS::add_symbol, avg 5µs/call
# spent 14µs making 74 calls to Package::Stash::XS::namespace, avg 193ns/call
# spent 13µs making 74 calls to Package::Stash::XS::name, avg 181ns/call |
142 | } | ||||
143 | } | ||||
144 | |||||
145 | #=================================== | ||||
146 | # spent 3.16ms (24µs+3.14) within Search::Elasticsearch::Role::Client::Direct::_build_namespace which was called:
# once (24µs+3.14ms) by Search::Elasticsearch::Client::5_0::Direct::_build_indices at line 61 of Search/Elasticsearch/Client/5_0/Direct.pm | ||||
147 | #=================================== | ||||
148 | 1 | 600ns | my ( $self, $ns ) = @_; | ||
149 | 1 | 4µs | 2 | 2.48ms | my $class = load_plugin( $self->_namespace, [$ns] ); # spent 2.48ms making 1 call to Search::Elasticsearch::Util::load_plugin
# spent 1µs making 1 call to Search::Elasticsearch::Client::5_0::Direct::_namespace |
150 | 1 | 13µs | 3 | 642µs | return $class->new( # spent 640µs making 1 call to Search::Elasticsearch::Client::5_0::Direct::Indices::new
# spent 1µs making 1 call to Search::Elasticsearch::Role::Client::transport
# spent 500ns making 1 call to Search::Elasticsearch::Role::Client::logger |
151 | { transport => $self->transport, | ||||
152 | logger => $self->logger | ||||
153 | } | ||||
154 | ); | ||||
155 | } | ||||
156 | |||||
157 | #=================================== | ||||
158 | sub _build_helper { | ||||
159 | #=================================== | ||||
160 | my ( $self, $name, $sub_class ) = @_; | ||||
161 | my $class = load_plugin( 'Search::Elasticsearch', $sub_class ); | ||||
162 | is_compat( $name . '_helper_class', $self->transport, $class ); | ||||
163 | return $class; | ||||
164 | } | ||||
165 | |||||
166 | 1 | 3µs | 1; | ||
167 | |||||
168 | # ABSTRACT: Request parsing for Direct clients | ||||
169 | |||||
170 | 1 | 7µs | 1 | 246µs | __END__ # spent 246µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:17] |
# spent 85µs within Search::Elasticsearch::Role::Client::Direct::CORE:match which was called 246 times, avg 347ns/call:
# 246 times (85µs+0s) by Search::Elasticsearch::Role::Client::Direct::_install_api at line 132, avg 347ns/call | |||||
# spent 2µs within Search::Elasticsearch::Role::Client::Direct::CORE:qr which was called 2 times, avg 800ns/call:
# 2 times (2µs+0s) by Search::Elasticsearch::Role::Client::Direct::_install_api at line 130, avg 800ns/call | |||||
# spent 98µs within Search::Elasticsearch::Role::Client::Direct::CORE:regcomp which was called 247 times, avg 396ns/call:
# 246 times (88µs+0s) by Search::Elasticsearch::Role::Client::Direct::_install_api at line 132, avg 358ns/call
# once (10µs+0s) by Search::Elasticsearch::Role::Client::Direct::_install_api at line 130 |