aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/performance/scenario_config.py
diff options
context:
space:
mode:
authorGravatar Mehrdad Afshari <mmx@google.com>2018-01-02 14:40:00 -0800
committerGravatar Mehrdad Afshari <mmx@google.com>2018-01-02 14:40:00 -0800
commit87cd994b0477e98c976e7b321b3c1f52666ab5e0 (patch)
tree8590a82e599e0c763f32f835ef2bbb129871e75b /tools/run_tests/performance/scenario_config.py
parent63392f682e21543099926251b642cdcd0be2a17f (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/scenario_config.py')
-rw-r--r--tools/run_tests/performance/scenario_config.py16
1 files changed, 8 insertions, 8 deletions
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