aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/performance/massage_qps_stats.py
blob: 57de77a7685d222e088b42da7cc844c3886f40cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Autogenerated by tools/codegen/core/gen_stats_data.py

import massage_qps_stats_helpers


def massage_qps_stats(scenario_result):
    for stats in scenario_result["serverStats"] + scenario_result["clientStats"]:
        if "coreStats" in stats:
            # Get rid of the "coreStats" element and replace it by statistics
            # that correspond to columns in the bigquery schema.
            core_stats = stats["coreStats"]
            del stats["coreStats"]
            stats[
                "core_client_calls_created"] = massage_qps_stats_helpers.counter(
                    core_stats, "client_calls_created")
            stats[
                "core_server_calls_created"] = massage_qps_stats_helpers.counter(
                    core_stats, "server_calls_created")
            stats["core_cqs_created"] = massage_qps_stats_helpers.counter(
                core_stats, "cqs_created")
            stats[
                "core_client_channels_created"] = massage_qps_stats_helpers.counter(
                    core_stats, "client_channels_created")
            stats[
                "core_client_subchannels_created"] = massage_qps_stats_helpers.counter(
                    core_stats, "client_subchannels_created")
            stats[
                "core_server_channels_created"] = massage_qps_stats_helpers.counter(
                    core_stats, "server_channels_created")
            stats["core_syscall_poll"] = massage_qps_stats_helpers.counter(
                core_stats, "syscall_poll")
            stats["core_syscall_wait"] = massage_qps_stats_helpers.counter(
                core_stats, "syscall_wait")
            stats["core_pollset_kick"] = massage_qps_stats_helpers.counter(
                core_stats, "pollset_kick")
            stats[
                "core_pollset_kicked_without_poller"] = massage_qps_stats_helpers.counter(
                    core_stats, "pollset_kicked_without_poller")
            stats[
                "core_pollset_kicked_again"] = massage_qps_stats_helpers.counter(
                    core_stats, "pollset_kicked_again")
            stats[
                "core_pollset_kick_wakeup_fd"] = massage_qps_stats_helpers.counter(
                    core_stats, "pollset_kick_wakeup_fd")
            stats[
                "core_pollset_kick_wakeup_cv"] = massage_qps_stats_helpers.counter(
                    core_stats, "pollset_kick_wakeup_cv")
            stats[
                "core_pollset_kick_own_thread"] = massage_qps_stats_helpers.counter(
                    core_stats, "pollset_kick_own_thread")
            stats["core_syscall_epoll_ctl"] = massage_qps_stats_helpers.counter(
                core_stats, "syscall_epoll_ctl")
            stats[
                "core_pollset_fd_cache_hits"] = massage_qps_stats_helpers.counter(
                    core_stats, "pollset_fd_cache_hits")
            stats[
                "core_histogram_slow_lookups"] = massage_qps_stats_helpers.counter(
                    core_stats, "histogram_slow_lookups")
            stats["core_syscall_write"] = massage_qps_stats_helpers.counter(
                core_stats, "syscall_write")
            stats["core_syscall_read"] = massage_qps_stats_helpers.counter(
                core_stats, "syscall_read")
            stats[
                "core_tcp_backup_pollers_created"] = massage_qps_stats_helpers.counter(
                    core_stats, "tcp_backup_pollers_created")
            stats[
                "core_tcp_backup_poller_polls"] = massage_qps_stats_helpers.counter(
                    core_stats, "tcp_backup_poller_polls")
            stats["core_http2_op_batches"] = massage_qps_stats_helpers.counter(
                core_stats, "http2_op_batches")
            stats["core_http2_op_cancel"] = massage_qps_stats_helpers.counter(
                core_stats, "http2_op_cancel")
            stats[
                "core_http2_op_send_initial_metadata"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_op_send_initial_metadata")
            stats[
                "core_http2_op_send_message"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_op_send_message")
            stats[
                "core_http2_op_send_trailing_metadata"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_op_send_trailing_metadata")
            stats[
                "core_http2_op_recv_initial_metadata"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_op_recv_initial_metadata")
            stats[
                "core_http2_op_recv_message"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_op_recv_message")
            stats[
                "core_http2_op_recv_trailing_metadata"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_op_recv_trailing_metadata")
            stats[
                "core_http2_settings_writes"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_settings_writes")
            stats["core_http2_pings_sent"] = massage_qps_stats_helpers.counter(
                core_stats, "http2_pings_sent")
            stats[
                "core_http2_writes_begun"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_writes_begun")
            stats[
                "core_http2_writes_offloaded"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_writes_offloaded")
            stats[
                "core_http2_writes_continued"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_writes_continued")
            stats[
                "core_http2_partial_writes"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_partial_writes")
            stats[
                "core_http2_initiate_write_due_to_initial_write"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_initial_write")
            stats[
                "core_http2_initiate_write_due_to_start_new_stream"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_start_new_stream")
            stats[
                "core_http2_initiate_write_due_to_send_message"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_send_message")
            stats[
                "core_http2_initiate_write_due_to_send_initial_metadata"] = massage_qps_stats_helpers.counter(
                    core_stats,
                    "http2_initiate_write_due_to_send_initial_metadata")
            stats[
                "core_http2_initiate_write_due_to_send_trailing_metadata"] = massage_qps_stats_helpers.counter(
                    core_stats,
                    "http2_initiate_write_due_to_send_trailing_metadata")
            stats[
                "core_http2_initiate_write_due_to_retry_send_ping"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_retry_send_ping")
            stats[
                "core_http2_initiate_write_due_to_continue_pings"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_continue_pings")
            stats[
                "core_http2_initiate_write_due_to_goaway_sent"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_goaway_sent")
            stats[
                "core_http2_initiate_write_due_to_rst_stream"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_rst_stream")
            stats[
                "core_http2_initiate_write_due_to_close_from_api"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_close_from_api")
            stats[
                "core_http2_initiate_write_due_to_stream_flow_control"] = massage_qps_stats_helpers.counter(
                    core_stats,
                    "http2_initiate_write_due_to_stream_flow_control")
            stats[
                "core_http2_initiate_write_due_to_transport_flow_control"] = massage_qps_stats_helpers.counter(
                    core_stats,
                    "http2_initiate_write_due_to_transport_flow_control")
            stats[
                "core_http2_initiate_write_due_to_send_settings"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_send_settings")
            stats[
                "core_http2_initiate_write_due_to_bdp_estimator_ping"] = massage_qps_stats_helpers.counter(
                    core_stats,
                    "http2_initiate_write_due_to_bdp_estimator_ping")
            stats[
                "core_http2_initiate_write_due_to_flow_control_unstalled_by_setting"] = massage_qps_stats_helpers.counter(
                    core_stats,
                    "http2_initiate_write_due_to_flow_control_unstalled_by_setting"
                )
            stats[
                "core_http2_initiate_write_due_to_flow_control_unstalled_by_update"] = massage_qps_stats_helpers.counter(
                    core_stats,
                    "http2_initiate_write_due_to_flow_control_unstalled_by_update"
                )
            stats[
                "core_http2_initiate_write_due_to_application_ping"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_application_ping")
            stats[
                "core_http2_initiate_write_due_to_keepalive_ping"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_keepalive_ping")
            stats[
                "core_http2_initiate_write_due_to_transport_flow_control_unstalled"] = massage_qps_stats_helpers.counter(
                    core_stats,
                    "http2_initiate_write_due_to_transport_flow_control_unstalled"
                )
            stats[
                "core_http2_initiate_write_due_to_ping_response"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_ping_response")
            stats[
                "core_http2_initiate_write_due_to_force_rst_stream"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_initiate_write_due_to_force_rst_stream")
            stats[
                "core_http2_spurious_writes_begun"] = massage_qps_stats_helpers.counter(
                    core_stats, "http2_spurious_writes_begun")
            stats[
                "core_hpack_recv_indexed"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_recv_indexed")
            stats[
                "core_hpack_recv_lithdr_incidx"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_recv_lithdr_incidx")
            stats[
                "core_hpack_recv_lithdr_incidx_v"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_recv_lithdr_incidx_v")
            stats[
                "core_hpack_recv_lithdr_notidx"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_recv_lithdr_notidx")
            stats[
                "core_hpack_recv_lithdr_notidx_v"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_recv_lithdr_notidx_v")
            stats[
                "core_hpack_recv_lithdr_nvridx"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_recv_lithdr_nvridx")
            stats[
                "core_hpack_recv_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_recv_lithdr_nvridx_v")
            stats[
                "core_hpack_recv_uncompressed"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_recv_uncompressed")
            stats[
                "core_hpack_recv_huffman"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_recv_huffman")
            stats["core_hpack_recv_binary"] = massage_qps_stats_helpers.counter(
                core_stats, "hpack_recv_binary")
            stats[
                "core_hpack_recv_binary_base64"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_recv_binary_base64")
            stats[
                "core_hpack_send_indexed"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_send_indexed")
            stats[
                "core_hpack_send_lithdr_incidx"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_send_lithdr_incidx")
            stats[
                "core_hpack_send_lithdr_incidx_v"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_send_lithdr_incidx_v")
            stats[
                "core_hpack_send_lithdr_notidx"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_send_lithdr_notidx")
            stats[
                "core_hpack_send_lithdr_notidx_v"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_send_lithdr_notidx_v")
            stats[
                "core_hpack_send_lithdr_nvridx"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_send_lithdr_nvridx")
            stats[
                "core_hpack_send_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_send_lithdr_nvridx_v")
            stats[
                "core_hpack_send_uncompressed"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_send_uncompressed")
            stats[
                "core_hpack_send_huffman"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_send_huffman")
            stats["core_hpack_send_binary"] = massage_qps_stats_helpers.counter(
                core_stats, "hpack_send_binary")
            stats[
                "core_hpack_send_binary_base64"] = massage_qps_stats_helpers.counter(
                    core_stats, "hpack_send_binary_base64")
            stats[
                "core_combiner_locks_initiated"] = massage_qps_stats_helpers.counter(
                    core_stats, "combiner_locks_initiated")
            stats[
                "core_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter(
                    core_stats, "combiner_locks_scheduled_items")
            stats[
                "core_combiner_locks_scheduled_final_items"] = massage_qps_stats_helpers.counter(
                    core_stats, "combiner_locks_scheduled_final_items")
            stats[
                "core_combiner_locks_offloaded"] = massage_qps_stats_helpers.counter(
                    core_stats, "combiner_locks_offloaded")
            stats[
                "core_call_combiner_locks_initiated"] = massage_qps_stats_helpers.counter(
                    core_stats, "call_combiner_locks_initiated")
            stats[
                "core_call_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter(
                    core_stats, "call_combiner_locks_scheduled_items")
            stats[
                "core_call_combiner_set_notify_on_cancel"] = massage_qps_stats_helpers.counter(
                    core_stats, "call_combiner_set_notify_on_cancel")
            stats[
                "core_call_combiner_cancelled"] = massage_qps_stats_helpers.counter(
                    core_stats, "call_combiner_cancelled")
            stats[
                "core_executor_scheduled_short_items"] = massage_qps_stats_helpers.counter(
                    core_stats, "executor_scheduled_short_items")
            stats[
                "core_executor_scheduled_long_items"] = massage_qps_stats_helpers.counter(
                    core_stats, "executor_scheduled_long_items")
            stats[
                "core_executor_scheduled_to_self"] = massage_qps_stats_helpers.counter(
                    core_stats, "executor_scheduled_to_self")
            stats[
                "core_executor_wakeup_initiated"] = massage_qps_stats_helpers.counter(
                    core_stats, "executor_wakeup_initiated")
            stats[
                "core_executor_queue_drained"] = massage_qps_stats_helpers.counter(
                    core_stats, "executor_queue_drained")
            stats[
                "core_executor_push_retries"] = massage_qps_stats_helpers.counter(
                    core_stats, "executor_push_retries")
            stats[
                "core_server_requested_calls"] = massage_qps_stats_helpers.counter(
                    core_stats, "server_requested_calls")
            stats[
                "core_server_slowpath_requests_queued"] = massage_qps_stats_helpers.counter(
                    core_stats, "server_slowpath_requests_queued")
            stats[
                "core_cq_ev_queue_trylock_failures"] = massage_qps_stats_helpers.counter(
                    core_stats, "cq_ev_queue_trylock_failures")
            stats[
                "core_cq_ev_queue_trylock_successes"] = massage_qps_stats_helpers.counter(
                    core_stats, "cq_ev_queue_trylock_successes")
            stats[
                "core_cq_ev_queue_transient_pop_failures"] = massage_qps_stats_helpers.counter(
                    core_stats, "cq_ev_queue_transient_pop_failures")
            h = massage_qps_stats_helpers.histogram(core_stats,
                                                    "call_initial_size")
            stats["core_call_initial_size"] = ",".join(
                "%f" % x for x in h.buckets)
            stats["core_call_initial_size_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_call_initial_size_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_call_initial_size_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_call_initial_size_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(core_stats,
                                                    "poll_events_returned")
            stats["core_poll_events_returned"] = ",".join(
                "%f" % x for x in h.buckets)
            stats["core_poll_events_returned_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_poll_events_returned_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_poll_events_returned_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_poll_events_returned_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(core_stats,
                                                    "tcp_write_size")
            stats["core_tcp_write_size"] = ",".join("%f" % x for x in h.buckets)
            stats["core_tcp_write_size_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_tcp_write_size_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_tcp_write_size_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_tcp_write_size_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(core_stats,
                                                    "tcp_write_iov_size")
            stats["core_tcp_write_iov_size"] = ",".join(
                "%f" % x for x in h.buckets)
            stats["core_tcp_write_iov_size_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_tcp_write_iov_size_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_tcp_write_iov_size_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_tcp_write_iov_size_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(core_stats, "tcp_read_size")
            stats["core_tcp_read_size"] = ",".join("%f" % x for x in h.buckets)
            stats["core_tcp_read_size_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_tcp_read_size_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_tcp_read_size_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_tcp_read_size_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(core_stats,
                                                    "tcp_read_offer")
            stats["core_tcp_read_offer"] = ",".join("%f" % x for x in h.buckets)
            stats["core_tcp_read_offer_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_tcp_read_offer_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_tcp_read_offer_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_tcp_read_offer_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(core_stats,
                                                    "tcp_read_offer_iov_size")
            stats["core_tcp_read_offer_iov_size"] = ",".join(
                "%f" % x for x in h.buckets)
            stats["core_tcp_read_offer_iov_size_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_tcp_read_offer_iov_size_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_tcp_read_offer_iov_size_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_tcp_read_offer_iov_size_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(core_stats,
                                                    "http2_send_message_size")
            stats["core_http2_send_message_size"] = ",".join(
                "%f" % x for x in h.buckets)
            stats["core_http2_send_message_size_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_http2_send_message_size_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_http2_send_message_size_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_http2_send_message_size_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(
                core_stats, "http2_send_initial_metadata_per_write")
            stats["core_http2_send_initial_metadata_per_write"] = ",".join(
                "%f" % x for x in h.buckets)
            stats["core_http2_send_initial_metadata_per_write_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_http2_send_initial_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_http2_send_initial_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_http2_send_initial_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(
                core_stats, "http2_send_message_per_write")
            stats["core_http2_send_message_per_write"] = ",".join(
                "%f" % x for x in h.buckets)
            stats["core_http2_send_message_per_write_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_http2_send_message_per_write_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_http2_send_message_per_write_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_http2_send_message_per_write_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(
                core_stats, "http2_send_trailing_metadata_per_write")
            stats["core_http2_send_trailing_metadata_per_write"] = ",".join(
                "%f" % x for x in h.buckets)
            stats[
                "core_http2_send_trailing_metadata_per_write_bkts"] = ",".join(
                    "%f" % x for x in h.boundaries)
            stats[
                "core_http2_send_trailing_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_http2_send_trailing_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_http2_send_trailing_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(
                core_stats, "http2_send_flowctl_per_write")
            stats["core_http2_send_flowctl_per_write"] = ",".join(
                "%f" % x for x in h.buckets)
            stats["core_http2_send_flowctl_per_write_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_http2_send_flowctl_per_write_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_http2_send_flowctl_per_write_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_http2_send_flowctl_per_write_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)
            h = massage_qps_stats_helpers.histogram(core_stats,
                                                    "server_cqs_checked")
            stats["core_server_cqs_checked"] = ",".join(
                "%f" % x for x in h.buckets)
            stats["core_server_cqs_checked_bkts"] = ",".join(
                "%f" % x for x in h.boundaries)
            stats[
                "core_server_cqs_checked_50p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 50, h.boundaries)
            stats[
                "core_server_cqs_checked_95p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 95, h.boundaries)
            stats[
                "core_server_cqs_checked_99p"] = massage_qps_stats_helpers.percentile(
                    h.buckets, 99, h.boundaries)