17 import massage_qps_stats_helpers
21 for stats
in scenario_result[
"serverStats"] + scenario_result[
"clientStats"]:
22 if "coreStats" in stats:
25 core_stats = stats[
"coreStats"]
26 del stats[
"coreStats"]
28 "core_client_calls_created"] = massage_qps_stats_helpers.counter(
29 core_stats,
"client_calls_created")
31 "core_server_calls_created"] = massage_qps_stats_helpers.counter(
32 core_stats,
"server_calls_created")
33 stats[
"core_cqs_created"] = massage_qps_stats_helpers.counter(
34 core_stats,
"cqs_created")
36 "core_client_channels_created"] = massage_qps_stats_helpers.counter(
37 core_stats,
"client_channels_created")
39 "core_client_subchannels_created"] = massage_qps_stats_helpers.counter(
40 core_stats,
"client_subchannels_created")
42 "core_server_channels_created"] = massage_qps_stats_helpers.counter(
43 core_stats,
"server_channels_created")
44 stats[
"core_syscall_poll"] = massage_qps_stats_helpers.counter(
45 core_stats,
"syscall_poll")
46 stats[
"core_syscall_wait"] = massage_qps_stats_helpers.counter(
47 core_stats,
"syscall_wait")
48 stats[
"core_pollset_kick"] = massage_qps_stats_helpers.counter(
49 core_stats,
"pollset_kick")
51 "core_pollset_kicked_without_poller"] = massage_qps_stats_helpers.counter(
52 core_stats,
"pollset_kicked_without_poller")
54 "core_pollset_kicked_again"] = massage_qps_stats_helpers.counter(
55 core_stats,
"pollset_kicked_again")
57 "core_pollset_kick_wakeup_fd"] = massage_qps_stats_helpers.counter(
58 core_stats,
"pollset_kick_wakeup_fd")
60 "core_pollset_kick_wakeup_cv"] = massage_qps_stats_helpers.counter(
61 core_stats,
"pollset_kick_wakeup_cv")
63 "core_pollset_kick_own_thread"] = massage_qps_stats_helpers.counter(
64 core_stats,
"pollset_kick_own_thread")
66 "core_histogram_slow_lookups"] = massage_qps_stats_helpers.counter(
67 core_stats,
"histogram_slow_lookups")
68 stats[
"core_syscall_write"] = massage_qps_stats_helpers.counter(
69 core_stats,
"syscall_write")
70 stats[
"core_syscall_read"] = massage_qps_stats_helpers.counter(
71 core_stats,
"syscall_read")
73 "core_tcp_backup_pollers_created"] = massage_qps_stats_helpers.counter(
74 core_stats,
"tcp_backup_pollers_created")
76 "core_tcp_backup_poller_polls"] = massage_qps_stats_helpers.counter(
77 core_stats,
"tcp_backup_poller_polls")
78 stats[
"core_http2_op_batches"] = massage_qps_stats_helpers.counter(
79 core_stats,
"http2_op_batches")
80 stats[
"core_http2_op_cancel"] = massage_qps_stats_helpers.counter(
81 core_stats,
"http2_op_cancel")
83 "core_http2_op_send_initial_metadata"] = massage_qps_stats_helpers.counter(
84 core_stats,
"http2_op_send_initial_metadata")
86 "core_http2_op_send_message"] = massage_qps_stats_helpers.counter(
87 core_stats,
"http2_op_send_message")
89 "core_http2_op_send_trailing_metadata"] = massage_qps_stats_helpers.counter(
90 core_stats,
"http2_op_send_trailing_metadata")
92 "core_http2_op_recv_initial_metadata"] = massage_qps_stats_helpers.counter(
93 core_stats,
"http2_op_recv_initial_metadata")
95 "core_http2_op_recv_message"] = massage_qps_stats_helpers.counter(
96 core_stats,
"http2_op_recv_message")
98 "core_http2_op_recv_trailing_metadata"] = massage_qps_stats_helpers.counter(
99 core_stats,
"http2_op_recv_trailing_metadata")
101 "core_http2_settings_writes"] = massage_qps_stats_helpers.counter(
102 core_stats,
"http2_settings_writes")
103 stats[
"core_http2_pings_sent"] = massage_qps_stats_helpers.counter(
104 core_stats,
"http2_pings_sent")
106 "core_http2_writes_begun"] = massage_qps_stats_helpers.counter(
107 core_stats,
"http2_writes_begun")
109 "core_http2_writes_offloaded"] = massage_qps_stats_helpers.counter(
110 core_stats,
"http2_writes_offloaded")
112 "core_http2_writes_continued"] = massage_qps_stats_helpers.counter(
113 core_stats,
"http2_writes_continued")
115 "core_http2_partial_writes"] = massage_qps_stats_helpers.counter(
116 core_stats,
"http2_partial_writes")
118 "core_http2_initiate_write_due_to_initial_write"] = massage_qps_stats_helpers.counter(
119 core_stats,
"http2_initiate_write_due_to_initial_write")
121 "core_http2_initiate_write_due_to_start_new_stream"] = massage_qps_stats_helpers.counter(
122 core_stats,
"http2_initiate_write_due_to_start_new_stream")
124 "core_http2_initiate_write_due_to_send_message"] = massage_qps_stats_helpers.counter(
125 core_stats,
"http2_initiate_write_due_to_send_message")
127 "core_http2_initiate_write_due_to_send_initial_metadata"] = massage_qps_stats_helpers.counter(
129 "http2_initiate_write_due_to_send_initial_metadata")
131 "core_http2_initiate_write_due_to_send_trailing_metadata"] = massage_qps_stats_helpers.counter(
133 "http2_initiate_write_due_to_send_trailing_metadata")
135 "core_http2_initiate_write_due_to_retry_send_ping"] = massage_qps_stats_helpers.counter(
136 core_stats,
"http2_initiate_write_due_to_retry_send_ping")
138 "core_http2_initiate_write_due_to_continue_pings"] = massage_qps_stats_helpers.counter(
139 core_stats,
"http2_initiate_write_due_to_continue_pings")
141 "core_http2_initiate_write_due_to_goaway_sent"] = massage_qps_stats_helpers.counter(
142 core_stats,
"http2_initiate_write_due_to_goaway_sent")
144 "core_http2_initiate_write_due_to_rst_stream"] = massage_qps_stats_helpers.counter(
145 core_stats,
"http2_initiate_write_due_to_rst_stream")
147 "core_http2_initiate_write_due_to_close_from_api"] = massage_qps_stats_helpers.counter(
148 core_stats,
"http2_initiate_write_due_to_close_from_api")
150 "core_http2_initiate_write_due_to_stream_flow_control"] = massage_qps_stats_helpers.counter(
152 "http2_initiate_write_due_to_stream_flow_control")
154 "core_http2_initiate_write_due_to_transport_flow_control"] = massage_qps_stats_helpers.counter(
156 "http2_initiate_write_due_to_transport_flow_control")
158 "core_http2_initiate_write_due_to_send_settings"] = massage_qps_stats_helpers.counter(
159 core_stats,
"http2_initiate_write_due_to_send_settings")
161 "core_http2_initiate_write_due_to_settings_ack"] = massage_qps_stats_helpers.counter(
162 core_stats,
"http2_initiate_write_due_to_settings_ack")
164 "core_http2_initiate_write_due_to_bdp_estimator_ping"] = massage_qps_stats_helpers.counter(
166 "http2_initiate_write_due_to_bdp_estimator_ping")
168 "core_http2_initiate_write_due_to_flow_control_unstalled_by_setting"] = massage_qps_stats_helpers.counter(
170 "http2_initiate_write_due_to_flow_control_unstalled_by_setting"
173 "core_http2_initiate_write_due_to_flow_control_unstalled_by_update"] = massage_qps_stats_helpers.counter(
175 "http2_initiate_write_due_to_flow_control_unstalled_by_update"
178 "core_http2_initiate_write_due_to_application_ping"] = massage_qps_stats_helpers.counter(
179 core_stats,
"http2_initiate_write_due_to_application_ping")
181 "core_http2_initiate_write_due_to_keepalive_ping"] = massage_qps_stats_helpers.counter(
182 core_stats,
"http2_initiate_write_due_to_keepalive_ping")
184 "core_http2_initiate_write_due_to_transport_flow_control_unstalled"] = massage_qps_stats_helpers.counter(
186 "http2_initiate_write_due_to_transport_flow_control_unstalled"
189 "core_http2_initiate_write_due_to_ping_response"] = massage_qps_stats_helpers.counter(
190 core_stats,
"http2_initiate_write_due_to_ping_response")
192 "core_http2_initiate_write_due_to_force_rst_stream"] = massage_qps_stats_helpers.counter(
193 core_stats,
"http2_initiate_write_due_to_force_rst_stream")
195 "core_http2_spurious_writes_begun"] = massage_qps_stats_helpers.counter(
196 core_stats,
"http2_spurious_writes_begun")
198 "core_hpack_recv_indexed"] = massage_qps_stats_helpers.counter(
199 core_stats,
"hpack_recv_indexed")
201 "core_hpack_recv_lithdr_incidx"] = massage_qps_stats_helpers.counter(
202 core_stats,
"hpack_recv_lithdr_incidx")
204 "core_hpack_recv_lithdr_incidx_v"] = massage_qps_stats_helpers.counter(
205 core_stats,
"hpack_recv_lithdr_incidx_v")
207 "core_hpack_recv_lithdr_notidx"] = massage_qps_stats_helpers.counter(
208 core_stats,
"hpack_recv_lithdr_notidx")
210 "core_hpack_recv_lithdr_notidx_v"] = massage_qps_stats_helpers.counter(
211 core_stats,
"hpack_recv_lithdr_notidx_v")
213 "core_hpack_recv_lithdr_nvridx"] = massage_qps_stats_helpers.counter(
214 core_stats,
"hpack_recv_lithdr_nvridx")
216 "core_hpack_recv_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter(
217 core_stats,
"hpack_recv_lithdr_nvridx_v")
219 "core_hpack_recv_uncompressed"] = massage_qps_stats_helpers.counter(
220 core_stats,
"hpack_recv_uncompressed")
222 "core_hpack_recv_huffman"] = massage_qps_stats_helpers.counter(
223 core_stats,
"hpack_recv_huffman")
224 stats[
"core_hpack_recv_binary"] = massage_qps_stats_helpers.counter(
225 core_stats,
"hpack_recv_binary")
227 "core_hpack_recv_binary_base64"] = massage_qps_stats_helpers.counter(
228 core_stats,
"hpack_recv_binary_base64")
230 "core_hpack_send_indexed"] = massage_qps_stats_helpers.counter(
231 core_stats,
"hpack_send_indexed")
233 "core_hpack_send_lithdr_incidx"] = massage_qps_stats_helpers.counter(
234 core_stats,
"hpack_send_lithdr_incidx")
236 "core_hpack_send_lithdr_incidx_v"] = massage_qps_stats_helpers.counter(
237 core_stats,
"hpack_send_lithdr_incidx_v")
239 "core_hpack_send_lithdr_notidx"] = massage_qps_stats_helpers.counter(
240 core_stats,
"hpack_send_lithdr_notidx")
242 "core_hpack_send_lithdr_notidx_v"] = massage_qps_stats_helpers.counter(
243 core_stats,
"hpack_send_lithdr_notidx_v")
245 "core_hpack_send_lithdr_nvridx"] = massage_qps_stats_helpers.counter(
246 core_stats,
"hpack_send_lithdr_nvridx")
248 "core_hpack_send_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter(
249 core_stats,
"hpack_send_lithdr_nvridx_v")
251 "core_hpack_send_uncompressed"] = massage_qps_stats_helpers.counter(
252 core_stats,
"hpack_send_uncompressed")
254 "core_hpack_send_huffman"] = massage_qps_stats_helpers.counter(
255 core_stats,
"hpack_send_huffman")
256 stats[
"core_hpack_send_binary"] = massage_qps_stats_helpers.counter(
257 core_stats,
"hpack_send_binary")
259 "core_hpack_send_binary_base64"] = massage_qps_stats_helpers.counter(
260 core_stats,
"hpack_send_binary_base64")
262 "core_combiner_locks_initiated"] = massage_qps_stats_helpers.counter(
263 core_stats,
"combiner_locks_initiated")
265 "core_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter(
266 core_stats,
"combiner_locks_scheduled_items")
268 "core_combiner_locks_scheduled_final_items"] = massage_qps_stats_helpers.counter(
269 core_stats,
"combiner_locks_scheduled_final_items")
271 "core_combiner_locks_offloaded"] = massage_qps_stats_helpers.counter(
272 core_stats,
"combiner_locks_offloaded")
274 "core_call_combiner_locks_initiated"] = massage_qps_stats_helpers.counter(
275 core_stats,
"call_combiner_locks_initiated")
277 "core_call_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter(
278 core_stats,
"call_combiner_locks_scheduled_items")
280 "core_call_combiner_set_notify_on_cancel"] = massage_qps_stats_helpers.counter(
281 core_stats,
"call_combiner_set_notify_on_cancel")
283 "core_call_combiner_cancelled"] = massage_qps_stats_helpers.counter(
284 core_stats,
"call_combiner_cancelled")
286 "core_executor_scheduled_short_items"] = massage_qps_stats_helpers.counter(
287 core_stats,
"executor_scheduled_short_items")
289 "core_executor_scheduled_long_items"] = massage_qps_stats_helpers.counter(
290 core_stats,
"executor_scheduled_long_items")
292 "core_executor_scheduled_to_self"] = massage_qps_stats_helpers.counter(
293 core_stats,
"executor_scheduled_to_self")
295 "core_executor_wakeup_initiated"] = massage_qps_stats_helpers.counter(
296 core_stats,
"executor_wakeup_initiated")
298 "core_executor_queue_drained"] = massage_qps_stats_helpers.counter(
299 core_stats,
"executor_queue_drained")
301 "core_executor_push_retries"] = massage_qps_stats_helpers.counter(
302 core_stats,
"executor_push_retries")
304 "core_server_requested_calls"] = massage_qps_stats_helpers.counter(
305 core_stats,
"server_requested_calls")
307 "core_server_slowpath_requests_queued"] = massage_qps_stats_helpers.counter(
308 core_stats,
"server_slowpath_requests_queued")
310 "core_cq_ev_queue_trylock_failures"] = massage_qps_stats_helpers.counter(
311 core_stats,
"cq_ev_queue_trylock_failures")
313 "core_cq_ev_queue_trylock_successes"] = massage_qps_stats_helpers.counter(
314 core_stats,
"cq_ev_queue_trylock_successes")
316 "core_cq_ev_queue_transient_pop_failures"] = massage_qps_stats_helpers.counter(
317 core_stats,
"cq_ev_queue_transient_pop_failures")
318 h = massage_qps_stats_helpers.histogram(core_stats,
320 stats[
"core_call_initial_size"] =
",".join(
321 "%f" % x
for x
in h.buckets)
322 stats[
"core_call_initial_size_bkts"] =
",".join(
323 "%f" % x
for x
in h.boundaries)
325 "core_call_initial_size_50p"] = massage_qps_stats_helpers.percentile(
326 h.buckets, 50, h.boundaries)
328 "core_call_initial_size_95p"] = massage_qps_stats_helpers.percentile(
329 h.buckets, 95, h.boundaries)
331 "core_call_initial_size_99p"] = massage_qps_stats_helpers.percentile(
332 h.buckets, 99, h.boundaries)
333 h = massage_qps_stats_helpers.histogram(core_stats,
334 "poll_events_returned")
335 stats[
"core_poll_events_returned"] =
",".join(
336 "%f" % x
for x
in h.buckets)
337 stats[
"core_poll_events_returned_bkts"] =
",".join(
338 "%f" % x
for x
in h.boundaries)
340 "core_poll_events_returned_50p"] = massage_qps_stats_helpers.percentile(
341 h.buckets, 50, h.boundaries)
343 "core_poll_events_returned_95p"] = massage_qps_stats_helpers.percentile(
344 h.buckets, 95, h.boundaries)
346 "core_poll_events_returned_99p"] = massage_qps_stats_helpers.percentile(
347 h.buckets, 99, h.boundaries)
348 h = massage_qps_stats_helpers.histogram(core_stats,
350 stats[
"core_tcp_write_size"] =
",".join(
"%f" % x
for x
in h.buckets)
351 stats[
"core_tcp_write_size_bkts"] =
",".join(
352 "%f" % x
for x
in h.boundaries)
354 "core_tcp_write_size_50p"] = massage_qps_stats_helpers.percentile(
355 h.buckets, 50, h.boundaries)
357 "core_tcp_write_size_95p"] = massage_qps_stats_helpers.percentile(
358 h.buckets, 95, h.boundaries)
360 "core_tcp_write_size_99p"] = massage_qps_stats_helpers.percentile(
361 h.buckets, 99, h.boundaries)
362 h = massage_qps_stats_helpers.histogram(core_stats,
363 "tcp_write_iov_size")
364 stats[
"core_tcp_write_iov_size"] =
",".join(
365 "%f" % x
for x
in h.buckets)
366 stats[
"core_tcp_write_iov_size_bkts"] =
",".join(
367 "%f" % x
for x
in h.boundaries)
369 "core_tcp_write_iov_size_50p"] = massage_qps_stats_helpers.percentile(
370 h.buckets, 50, h.boundaries)
372 "core_tcp_write_iov_size_95p"] = massage_qps_stats_helpers.percentile(
373 h.buckets, 95, h.boundaries)
375 "core_tcp_write_iov_size_99p"] = massage_qps_stats_helpers.percentile(
376 h.buckets, 99, h.boundaries)
377 h = massage_qps_stats_helpers.histogram(core_stats,
"tcp_read_size")
378 stats[
"core_tcp_read_size"] =
",".join(
"%f" % x
for x
in h.buckets)
379 stats[
"core_tcp_read_size_bkts"] =
",".join(
380 "%f" % x
for x
in h.boundaries)
382 "core_tcp_read_size_50p"] = massage_qps_stats_helpers.percentile(
383 h.buckets, 50, h.boundaries)
385 "core_tcp_read_size_95p"] = massage_qps_stats_helpers.percentile(
386 h.buckets, 95, h.boundaries)
388 "core_tcp_read_size_99p"] = massage_qps_stats_helpers.percentile(
389 h.buckets, 99, h.boundaries)
390 h = massage_qps_stats_helpers.histogram(core_stats,
392 stats[
"core_tcp_read_offer"] =
",".join(
"%f" % x
for x
in h.buckets)
393 stats[
"core_tcp_read_offer_bkts"] =
",".join(
394 "%f" % x
for x
in h.boundaries)
396 "core_tcp_read_offer_50p"] = massage_qps_stats_helpers.percentile(
397 h.buckets, 50, h.boundaries)
399 "core_tcp_read_offer_95p"] = massage_qps_stats_helpers.percentile(
400 h.buckets, 95, h.boundaries)
402 "core_tcp_read_offer_99p"] = massage_qps_stats_helpers.percentile(
403 h.buckets, 99, h.boundaries)
404 h = massage_qps_stats_helpers.histogram(core_stats,
405 "tcp_read_offer_iov_size")
406 stats[
"core_tcp_read_offer_iov_size"] =
",".join(
407 "%f" % x
for x
in h.buckets)
408 stats[
"core_tcp_read_offer_iov_size_bkts"] =
",".join(
409 "%f" % x
for x
in h.boundaries)
411 "core_tcp_read_offer_iov_size_50p"] = massage_qps_stats_helpers.percentile(
412 h.buckets, 50, h.boundaries)
414 "core_tcp_read_offer_iov_size_95p"] = massage_qps_stats_helpers.percentile(
415 h.buckets, 95, h.boundaries)
417 "core_tcp_read_offer_iov_size_99p"] = massage_qps_stats_helpers.percentile(
418 h.buckets, 99, h.boundaries)
419 h = massage_qps_stats_helpers.histogram(core_stats,
420 "http2_send_message_size")
421 stats[
"core_http2_send_message_size"] =
",".join(
422 "%f" % x
for x
in h.buckets)
423 stats[
"core_http2_send_message_size_bkts"] =
",".join(
424 "%f" % x
for x
in h.boundaries)
426 "core_http2_send_message_size_50p"] = massage_qps_stats_helpers.percentile(
427 h.buckets, 50, h.boundaries)
429 "core_http2_send_message_size_95p"] = massage_qps_stats_helpers.percentile(
430 h.buckets, 95, h.boundaries)
432 "core_http2_send_message_size_99p"] = massage_qps_stats_helpers.percentile(
433 h.buckets, 99, h.boundaries)
434 h = massage_qps_stats_helpers.histogram(
435 core_stats,
"http2_send_initial_metadata_per_write")
436 stats[
"core_http2_send_initial_metadata_per_write"] =
",".join(
437 "%f" % x
for x
in h.buckets)
438 stats[
"core_http2_send_initial_metadata_per_write_bkts"] =
",".join(
439 "%f" % x
for x
in h.boundaries)
441 "core_http2_send_initial_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile(
442 h.buckets, 50, h.boundaries)
444 "core_http2_send_initial_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile(
445 h.buckets, 95, h.boundaries)
447 "core_http2_send_initial_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile(
448 h.buckets, 99, h.boundaries)
449 h = massage_qps_stats_helpers.histogram(
450 core_stats,
"http2_send_message_per_write")
451 stats[
"core_http2_send_message_per_write"] =
",".join(
452 "%f" % x
for x
in h.buckets)
453 stats[
"core_http2_send_message_per_write_bkts"] =
",".join(
454 "%f" % x
for x
in h.boundaries)
456 "core_http2_send_message_per_write_50p"] = massage_qps_stats_helpers.percentile(
457 h.buckets, 50, h.boundaries)
459 "core_http2_send_message_per_write_95p"] = massage_qps_stats_helpers.percentile(
460 h.buckets, 95, h.boundaries)
462 "core_http2_send_message_per_write_99p"] = massage_qps_stats_helpers.percentile(
463 h.buckets, 99, h.boundaries)
464 h = massage_qps_stats_helpers.histogram(
465 core_stats,
"http2_send_trailing_metadata_per_write")
466 stats[
"core_http2_send_trailing_metadata_per_write"] =
",".join(
467 "%f" % x
for x
in h.buckets)
469 "core_http2_send_trailing_metadata_per_write_bkts"] =
",".join(
470 "%f" % x
for x
in h.boundaries)
472 "core_http2_send_trailing_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile(
473 h.buckets, 50, h.boundaries)
475 "core_http2_send_trailing_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile(
476 h.buckets, 95, h.boundaries)
478 "core_http2_send_trailing_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile(
479 h.buckets, 99, h.boundaries)
480 h = massage_qps_stats_helpers.histogram(
481 core_stats,
"http2_send_flowctl_per_write")
482 stats[
"core_http2_send_flowctl_per_write"] =
",".join(
483 "%f" % x
for x
in h.buckets)
484 stats[
"core_http2_send_flowctl_per_write_bkts"] =
",".join(
485 "%f" % x
for x
in h.boundaries)
487 "core_http2_send_flowctl_per_write_50p"] = massage_qps_stats_helpers.percentile(
488 h.buckets, 50, h.boundaries)
490 "core_http2_send_flowctl_per_write_95p"] = massage_qps_stats_helpers.percentile(
491 h.buckets, 95, h.boundaries)
493 "core_http2_send_flowctl_per_write_99p"] = massage_qps_stats_helpers.percentile(
494 h.buckets, 99, h.boundaries)
495 h = massage_qps_stats_helpers.histogram(core_stats,
496 "server_cqs_checked")
497 stats[
"core_server_cqs_checked"] =
",".join(
498 "%f" % x
for x
in h.buckets)
499 stats[
"core_server_cqs_checked_bkts"] =
",".join(
500 "%f" % x
for x
in h.boundaries)
502 "core_server_cqs_checked_50p"] = massage_qps_stats_helpers.percentile(
503 h.buckets, 50, h.boundaries)
505 "core_server_cqs_checked_95p"] = massage_qps_stats_helpers.percentile(
506 h.buckets, 95, h.boundaries)
508 "core_server_cqs_checked_99p"] = massage_qps_stats_helpers.percentile(
509 h.buckets, 99, h.boundaries)