aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/performance/scenario_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/run_tests/performance/scenario_config.py')
-rw-r--r--tools/run_tests/performance/scenario_config.py40
1 files changed, 31 insertions, 9 deletions
diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py
index 8f01eb4b2a..ddaffa44af 100644
--- a/tools/run_tests/performance/scenario_config.py
+++ b/tools/run_tests/performance/scenario_config.py
@@ -22,6 +22,7 @@ BENCHMARK_SECONDS=30
SMOKETEST='smoketest'
SCALABLE='scalable'
+INPROC='inproc'
SWEEP='sweep'
DEFAULT_CATEGORIES=[SCALABLE, SMOKETEST]
@@ -82,6 +83,16 @@ def _payload_type(use_generic_payload, req_size, resp_size):
r['simple_params'] = sizes
return r
+def _load_params(offered_load):
+ r = {}
+ if offered_load is None:
+ r['closed_loop'] = {}
+ else:
+ load = {}
+ load['offered_load'] = offered_load
+ r['poisson'] = load
+ return r
+
def _add_channel_arg(config, key, value):
if 'channel_args' in config:
channel_args = config['channel_args']
@@ -115,7 +126,8 @@ def _ping_pong_scenario(name, rpc_type,
resource_quota_size=None,
messages_per_stream=None,
excluded_poll_engines=[],
- minimal_stack=False):
+ minimal_stack=False,
+ offered_load=None):
"""Creates a basic ping pong scenario."""
scenario = {
'name': name,
@@ -129,9 +141,6 @@ def _ping_pong_scenario(name, rpc_type,
'async_client_threads': 1,
'threads_per_cq': client_threads_per_cq,
'rpc_type': rpc_type,
- 'load_params': {
- 'closed_loop': {}
- },
'histogram_params': HISTOGRAM_PARAMS,
'channel_args': [],
},
@@ -171,12 +180,16 @@ 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
+ if offered_load is not None:
+ optimization_target = 'latency'
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'
+ scenario['client_config']['load_params'] = _load_params(offered_load)
+
optimization_channel_arg = {
'name': 'grpc.optimization_target',
'str_value': optimization_target
@@ -224,7 +237,7 @@ class CXXLanguage:
unconstrained_client='async', outstanding=100, channels=1,
num_clients=1,
secure=False,
- categories=[SMOKETEST] + [SCALABLE])
+ categories=[SMOKETEST] + [INPROC] + [SCALABLE])
yield _ping_pong_scenario(
'cpp_protobuf_async_streaming_from_client_1channel_1MB', rpc_type='STREAMING_FROM_CLIENT',
@@ -233,11 +246,20 @@ class CXXLanguage:
unconstrained_client='async', outstanding=1, channels=1,
num_clients=1,
secure=False,
- categories=[SMOKETEST] + [SCALABLE])
+ categories=[SMOKETEST] + [INPROC] + [SCALABLE])
+
+ yield _ping_pong_scenario(
+ 'cpp_protobuf_async_unary_75Kqps_600channel_60Krpcs_300Breq_50Bresp',
+ rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
+ req_size=300, resp_size=50,
+ unconstrained_client='async', outstanding=30000, channels=300,
+ offered_load=37500, secure=False,
+ async_server_threads=16, server_threads_per_cq=1,
+ categories=[SMOKETEST] + [SCALABLE])
for secure in [True, False]:
secstr = 'secure' if secure else 'insecure'
- smoketest_categories = ([SMOKETEST] if secure else []) + [SCALABLE]
+ smoketest_categories = ([SMOKETEST] if secure else [INPROC]) + [SCALABLE]
yield _ping_pong_scenario(
'cpp_generic_async_streaming_ping_pong_%s' % secstr,
@@ -809,7 +831,7 @@ class Php7Language:
def worker_cmdline(self):
if self.php7_protobuf_c:
- return ['tools/run_tests/performance/run_worker_php.sh --use_protobuf_c_extension']
+ return ['tools/run_tests/performance/run_worker_php.sh', '--use_protobuf_c_extension']
return ['tools/run_tests/performance/run_worker_php.sh']
def worker_port_offset(self):
@@ -821,7 +843,7 @@ class Php7Language:
php7_extension_mode='php7_protobuf_php_extension'
if self.php7_protobuf_c:
php7_extension_mode='php7_protobuf_c_extension'
-
+
yield _ping_pong_scenario(
'%s_to_cpp_protobuf_sync_unary_ping_pong' % php7_extension_mode,
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',