diff options
author | Craig Tiller <ctiller@google.com> | 2017-06-19 10:01:52 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-06-19 10:01:52 -0700 |
commit | f1633a9bec9b5a3dfd4c192e24698908dbf59cbb (patch) | |
tree | 3aadd0fe563e6ad4ff9270982b1e5c9f351c328f /tools/run_tests | |
parent | 716f7afa21b9079099e1e8571b49d21a30c1ed5a (diff) |
Allow application optimization targets to be hinted to grpc (prefer latency over throughput for now)
Diffstat (limited to 'tools/run_tests')
-rw-r--r-- | tools/run_tests/performance/scenario_config.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 7bd6a3aa74..2177229a98 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -120,12 +120,14 @@ def _ping_pong_scenario(name, rpc_type, 'closed_loop': {} }, 'histogram_params': HISTOGRAM_PARAMS, + 'channel_args': [], }, 'server_config': { 'server_type': server_type, 'security_params': _get_secargs(secure), 'async_server_threads': async_server_threads, 'threads_per_cq': server_threads_per_cq, + 'channel_args': [], }, 'warmup_seconds': warmup_seconds, 'benchmark_seconds': BENCHMARK_SECONDS @@ -139,6 +141,8 @@ def _ping_pong_scenario(name, rpc_type, scenario['client_config']['payload_config'] = _payload_type(use_generic_payload, req_size, resp_size) + optimization_target = 'blend' + if unconstrained_client: outstanding_calls = outstanding if outstanding is not None else OUTSTANDING_REQUESTS[unconstrained_client] # clamp buffer usage to something reasonable (16 gig for now) @@ -152,10 +156,19 @@ def _ping_pong_scenario(name, rpc_type, scenario['client_config']['outstanding_rpcs_per_channel'] = deep scenario['client_config']['client_channels'] = wide scenario['client_config']['async_client_threads'] = 0 + optimization_target = 'throughput' else: scenario['client_config']['outstanding_rpcs_per_channel'] = 1 scenario['client_config']['client_channels'] = 1 scenario['client_config']['async_client_threads'] = 1 + optimization_target = 'latency' + + optimization_channel_arg = { + 'name': 'grpc.optimization_target', + 'str_value': optimization_target + } + scenario['client_config']['channel_args'].append(optimization_channel_arg) + scenario['server_config']['channel_args'].append(optimization_channel_arg) if messages_per_stream: scenario['client_config']['messages_per_stream'] = messages_per_stream |