diff options
author | 2018-01-02 14:40:00 -0800 | |
---|---|---|
committer | 2018-01-02 14:40:00 -0800 | |
commit | 87cd994b0477e98c976e7b321b3c1f52666ab5e0 (patch) | |
tree | 8590a82e599e0c763f32f835ef2bbb129871e75b /tools/run_tests/performance | |
parent | 63392f682e21543099926251b642cdcd0be2a17f (diff) |
Upgrade yapf to 0.20.0
Upgrade yapf version to 0.20.0 and reformat Python files.
Diffstat (limited to 'tools/run_tests/performance')
-rw-r--r-- | tools/run_tests/performance/massage_qps_stats.py | 39 | ||||
-rw-r--r-- | tools/run_tests/performance/scenario_config.py | 16 |
2 files changed, 27 insertions, 28 deletions
diff --git a/tools/run_tests/performance/massage_qps_stats.py b/tools/run_tests/performance/massage_qps_stats.py index 37f6e7aae0..790202c43e 100644 --- a/tools/run_tests/performance/massage_qps_stats.py +++ b/tools/run_tests/performance/massage_qps_stats.py @@ -18,8 +18,7 @@ import massage_qps_stats_helpers def massage_qps_stats(scenario_result): - for stats in scenario_result["serverStats"] + scenario_result[ - "clientStats"]: + for stats in scenario_result["serverStats"] + scenario_result["clientStats"]: if "coreStats" not in stats: return core_stats = stats["coreStats"] del stats["coreStats"] @@ -294,8 +293,8 @@ def massage_qps_stats(scenario_result): 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_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) @@ -307,8 +306,8 @@ def massage_qps_stats(scenario_result): 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"] = ",".join( + "%f" % x for x in h.buckets) stats["core_poll_events_returned_bkts"] = ",".join( "%f" % x for x in h.boundaries) stats[ @@ -322,8 +321,8 @@ def massage_qps_stats(scenario_result): 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_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( @@ -333,8 +332,8 @@ def massage_qps_stats(scenario_result): 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_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) @@ -346,8 +345,8 @@ def massage_qps_stats(scenario_result): 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_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( @@ -356,8 +355,8 @@ def massage_qps_stats(scenario_result): 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_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( @@ -366,8 +365,8 @@ def massage_qps_stats(scenario_result): 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"] = ",".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[ @@ -381,8 +380,8 @@ def massage_qps_stats(scenario_result): 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"] = ",".join( + "%f" % x for x in h.buckets) stats["core_http2_send_message_size_bkts"] = ",".join( "%f" % x for x in h.boundaries) stats[ @@ -457,8 +456,8 @@ def massage_qps_stats(scenario_result): 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_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) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 7af33f92f0..f05753154e 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -178,8 +178,8 @@ def _ping_pong_scenario(name, # clamp buffer usage to something reasonable (16 gig for now) MAX_MEMORY_USE = 16 * 1024 * 1024 * 1024 if outstanding_calls * max(req_size, resp_size) > MAX_MEMORY_USE: - outstanding_calls = max(1, MAX_MEMORY_USE / max(req_size, - resp_size)) + outstanding_calls = max(1, + MAX_MEMORY_USE / max(req_size, resp_size)) wide = channels if channels is not None else WIDE deep = int(math.ceil(1.0 * outstanding_calls / wide)) @@ -503,8 +503,8 @@ class CXXLanguage: ]: for synchronicity in ['sync', 'async']: yield _ping_pong_scenario( - 'cpp_protobuf_%s_%s_ping_pong_%s' % - (synchronicity, rpc_type, secstr), + 'cpp_protobuf_%s_%s_ping_pong_%s' % (synchronicity, + rpc_type, secstr), rpc_type=rpc_type.upper(), client_type='%s_CLIENT' % synchronicity.upper(), server_type='%s_SERVER' % synchronicity.upper(), @@ -580,10 +580,10 @@ class CXXLanguage: minimal_stack=not secure, categories=[SWEEP]) - for channels in geometric_progression(1, 20000, - math.sqrt(10)): - for outstanding in geometric_progression(1, 200000, - math.sqrt(10)): + for channels in geometric_progression( + 1, 20000, math.sqrt(10)): + for outstanding in geometric_progression( + 1, 200000, math.sqrt(10)): if synchronicity == 'sync' and outstanding > 1200: continue if outstanding < channels: continue |