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.py134
1 files changed, 84 insertions, 50 deletions
diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py
index c63e0dbc38..55657f8d8a 100644
--- a/tools/run_tests/performance/scenario_config.py
+++ b/tools/run_tests/performance/scenario_config.py
@@ -34,6 +34,9 @@ WARMUP_SECONDS=5
JAVA_WARMUP_SECONDS=15 # Java needs more warmup time for JIT to kick in.
BENCHMARK_SECONDS=30
+SECURE_SECARGS = {'use_test_ca': True,
+ 'server_host_override': 'foo.test.google.fr'}
+
HISTOGRAM_PARAMS = {
'resolution': 0.01,
'max_possible': 60e9,
@@ -82,8 +85,7 @@ class CXXLanguage:
for secure in [True, False]:
if secure:
secstr = 'secure'
- secargs = {'use_test_ca': True,
- 'server_host_override': 'foo.test.google.fr'}
+ secargs = SECURE_SECARGS
else:
secstr = 'insecure'
secargs = None
@@ -109,7 +111,7 @@ class CXXLanguage:
'server_config': {
'server_type': 'ASYNC_GENERIC_SERVER',
'security_params': secargs,
- 'core_limit': SINGLE_MACHINE_CORES/2,
+ 'core_limit': 1,
'async_server_threads': 1,
'payload_config': EMPTY_GENERIC_PAYLOAD,
},
@@ -126,7 +128,7 @@ class CXXLanguage:
'security_params': secargs,
'outstanding_rpcs_per_channel': DEEP,
'client_channels': WIDE,
- 'async_client_threads': 1,
+ 'async_client_threads': 0,
'rpc_type': 'STREAMING',
'load_params': {
'closed_loop': {}
@@ -138,7 +140,7 @@ class CXXLanguage:
'server_type': 'ASYNC_GENERIC_SERVER',
'security_params': secargs,
'core_limit': SINGLE_MACHINE_CORES/2,
- 'async_server_threads': 1,
+ 'async_server_threads': 0,
'payload_config': EMPTY_GENERIC_PAYLOAD,
},
'warmup_seconds': WARMUP_SECONDS,
@@ -154,7 +156,7 @@ class CXXLanguage:
'security_params': secargs,
'outstanding_rpcs_per_channel': DEEP,
'client_channels': WIDE,
- 'async_client_threads': 1,
+ 'async_client_threads': 0,
'rpc_type': 'STREAMING',
'load_params': {
'closed_loop': {}
@@ -182,7 +184,7 @@ class CXXLanguage:
'security_params': secargs,
'outstanding_rpcs_per_channel': DEEP,
'client_channels': WIDE,
- 'async_client_threads': 1,
+ 'async_client_threads': 0,
'rpc_type': 'STREAMING',
'load_params': {
'closed_loop': {}
@@ -194,13 +196,13 @@ class CXXLanguage:
'server_type': 'ASYNC_SERVER',
'security_params': secargs,
'core_limit': SINGLE_MACHINE_CORES/2,
- 'async_server_threads': 1,
+ 'async_server_threads': 0,
},
'warmup_seconds': WARMUP_SECONDS,
'benchmark_seconds': BENCHMARK_SECONDS
}
yield {
- 'name': 'cpp_single_channel_throughput_%s'
+ 'name': 'cpp_protobuf_async_streaming_ping_pong_%s'
% secstr,
'num_servers': 1,
'num_clients': 1,
@@ -214,21 +216,47 @@ class CXXLanguage:
'load_params': {
'closed_loop': {}
},
- 'payload_config': BIG_GENERIC_PAYLOAD,
+ 'payload_config': EMPTY_PROTO_PAYLOAD,
'histogram_params': HISTOGRAM_PARAMS,
},
'server_config': {
- 'server_type': 'ASYNC_GENERIC_SERVER',
+ 'server_type': 'ASYNC_SERVER',
'security_params': secargs,
- 'core_limit': SINGLE_MACHINE_CORES/2,
+ 'core_limit': 1,
'async_server_threads': 1,
- 'payload_config': BIG_GENERIC_PAYLOAD,
},
'warmup_seconds': WARMUP_SECONDS,
'benchmark_seconds': BENCHMARK_SECONDS
}
yield {
- 'name': 'cpp_protobuf_async_ping_pong_%s'
+ 'name': 'cpp_protobuf_sync_unary_ping_pong_%s'
+ % secstr,
+ 'num_servers': 1,
+ 'num_clients': 1,
+ 'client_config': {
+ 'client_type': 'SYNC_CLIENT',
+ 'security_params': secargs,
+ 'outstanding_rpcs_per_channel': 1,
+ 'client_channels': 1,
+ 'async_client_threads': 0,
+ 'rpc_type': 'UNARY',
+ 'load_params': {
+ 'closed_loop': {}
+ },
+ 'payload_config': EMPTY_PROTO_PAYLOAD,
+ 'histogram_params': HISTOGRAM_PARAMS,
+ },
+ 'server_config': {
+ 'server_type': 'SYNC_SERVER',
+ 'security_params': secargs,
+ 'core_limit': 1,
+ 'async_server_threads': 0,
+ },
+ 'warmup_seconds': WARMUP_SECONDS,
+ 'benchmark_seconds': BENCHMARK_SECONDS
+ }
+ yield {
+ 'name': 'cpp_protobuf_async_unary_ping_pong_%s'
% secstr,
'num_servers': 1,
'num_clients': 1,
@@ -238,7 +266,7 @@ class CXXLanguage:
'outstanding_rpcs_per_channel': 1,
'client_channels': 1,
'async_client_threads': 1,
- 'rpc_type': 'STREAMING',
+ 'rpc_type': 'UNARY',
'load_params': {
'closed_loop': {}
},
@@ -248,7 +276,7 @@ class CXXLanguage:
'server_config': {
'server_type': 'ASYNC_SERVER',
'security_params': secargs,
- 'core_limit': SINGLE_MACHINE_CORES/2,
+ 'core_limit': 1,
'async_server_threads': 1,
},
'warmup_seconds': WARMUP_SECONDS,
@@ -271,8 +299,7 @@ class CSharpLanguage:
return 100
def scenarios(self):
- # TODO(jtattermusch): add more scenarios
- secargs = None
+ secargs = SECURE_SECARGS
yield {
'name': 'csharp_generic_async_streaming_ping_pong',
'num_servers': 1,
@@ -294,7 +321,7 @@ class CSharpLanguage:
'server_type': 'ASYNC_GENERIC_SERVER',
'security_params': secargs,
'core_limit': 0,
- 'async_server_threads': 1,
+ 'async_server_threads': 0,
'payload_config': EMPTY_GENERIC_PAYLOAD,
},
'warmup_seconds': WARMUP_SECONDS,
@@ -321,7 +348,7 @@ class CSharpLanguage:
'server_type': 'ASYNC_SERVER',
'security_params': secargs,
'core_limit': 0,
- 'async_server_threads': 1,
+ 'async_server_threads': 0,
},
'warmup_seconds': WARMUP_SECONDS,
'benchmark_seconds': BENCHMARK_SECONDS
@@ -347,7 +374,7 @@ class CSharpLanguage:
'server_type': 'ASYNC_SERVER',
'security_params': secargs,
'core_limit': 0,
- 'async_server_threads': 1,
+ 'async_server_threads': 0,
},
'warmup_seconds': WARMUP_SECONDS,
'benchmark_seconds': BENCHMARK_SECONDS
@@ -372,7 +399,7 @@ class CSharpLanguage:
'server_config': {
'server_type': 'SYNC_SERVER',
'security_params': secargs,
- 'core_limit': 0,
+ 'core_limit': 1,
'async_server_threads': 1,
},
'warmup_seconds': WARMUP_SECONDS,
@@ -398,7 +425,7 @@ class NodeLanguage:
def scenarios(self):
# TODO(jtattermusch): add more scenarios
- secargs = None
+ secargs = SECURE_SECARGS
yield {
'name': 'node_protobuf_unary_ping_pong',
'num_servers': 1,
@@ -444,7 +471,7 @@ class RubyLanguage:
def scenarios(self):
# TODO(jtattermusch): add more scenarios
- secargs = None
+ secargs = SECURE_SECARGS
yield {
'name': 'ruby_protobuf_unary_ping_pong',
'num_servers': 1,
@@ -490,33 +517,40 @@ class JavaLanguage:
def scenarios(self):
# TODO(jtattermusch): add more scenarios
- secargs = None
- yield {
- 'name': 'java_protobuf_unary_ping_pong',
- 'num_servers': 1,
- 'num_clients': 1,
- 'client_config': {
- 'client_type': 'SYNC_CLIENT',
- 'security_params': secargs,
- 'outstanding_rpcs_per_channel': 1,
- 'client_channels': 1,
- 'async_client_threads': 1,
- 'rpc_type': 'UNARY',
- 'load_params': {
- 'closed_loop': {}
+ for secure in [True, False]:
+ if secure:
+ secstr = 'secure'
+ secargs = SECURE_SECARGS
+ else:
+ secstr = 'insecure'
+ secargs = None
+
+ yield {
+ 'name': 'java_protobuf_unary_ping_pong_%s' % secstr,
+ 'num_servers': 1,
+ 'num_clients': 1,
+ 'client_config': {
+ 'client_type': 'SYNC_CLIENT',
+ 'security_params': secargs,
+ 'outstanding_rpcs_per_channel': 1,
+ 'client_channels': 1,
+ 'async_client_threads': 1,
+ 'rpc_type': 'UNARY',
+ 'load_params': {
+ 'closed_loop': {}
+ },
+ 'payload_config': EMPTY_PROTO_PAYLOAD,
+ 'histogram_params': HISTOGRAM_PARAMS,
},
- 'payload_config': EMPTY_PROTO_PAYLOAD,
- 'histogram_params': HISTOGRAM_PARAMS,
- },
- 'server_config': {
- 'server_type': 'SYNC_SERVER',
- 'security_params': secargs,
- 'core_limit': 0,
- 'async_server_threads': 1,
- },
- 'warmup_seconds': JAVA_WARMUP_SECONDS,
- 'benchmark_seconds': BENCHMARK_SECONDS
- }
+ 'server_config': {
+ 'server_type': 'SYNC_SERVER',
+ 'security_params': secargs,
+ 'core_limit': 0,
+ 'async_server_threads': 1,
+ },
+ 'warmup_seconds': JAVA_WARMUP_SECONDS,
+ 'benchmark_seconds': BENCHMARK_SECONDS
+ }
def __str__(self):
return 'java'