diff options
Diffstat (limited to 'tools/run_tests/performance')
-rwxr-xr-x | tools/run_tests/performance/bq_upload_result.py | 2 | ||||
-rw-r--r-- | tools/run_tests/performance/scenario_config.py | 90 | ||||
-rw-r--r-- | tools/run_tests/performance/scenario_result_schema.json | 5 |
3 files changed, 95 insertions, 2 deletions
diff --git a/tools/run_tests/performance/bq_upload_result.py b/tools/run_tests/performance/bq_upload_result.py index 2a99499843..3a3c4ae700 100755 --- a/tools/run_tests/performance/bq_upload_result.py +++ b/tools/run_tests/performance/bq_upload_result.py @@ -117,9 +117,11 @@ def _flatten_result_inplace(scenario_result): scenario_result['latencies'] = json.dumps(scenario_result['latencies']) for stats in scenario_result['clientStats']: stats['latencies'] = json.dumps(stats['latencies']) + stats.pop('requestResults', None) scenario_result['serverCores'] = json.dumps(scenario_result['serverCores']) scenario_result['clientSuccess'] = json.dumps(scenario_result['clientSuccess']) scenario_result['serverSuccess'] = json.dumps(scenario_result['serverSuccess']) + scenario_result['requestResults'] = json.dumps(scenario_result.get('requestResults', [])) def _populate_metadata_inplace(scenario_result): diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index e1c1bc65b6..4e4c16642b 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -114,7 +114,8 @@ def _ping_pong_scenario(name, rpc_type, warmup_seconds=WARMUP_SECONDS, categories=DEFAULT_CATEGORIES, channels=None, - outstanding=None): + outstanding=None, + resource_quota_size=None): """Creates a basic ping pong scenario.""" scenario = { 'name': name, @@ -141,6 +142,8 @@ def _ping_pong_scenario(name, rpc_type, 'warmup_seconds': warmup_seconds, 'benchmark_seconds': BENCHMARK_SECONDS } + if resource_quota_size: + scenario['server_config']['resource_quota_size'] = resource_quota_size if use_generic_payload: if server_type != 'ASYNC_GENERIC_SERVER': raise Exception('Use ASYNC_GENERIC_SERVER for generic payload.') @@ -229,6 +232,15 @@ class CXXLanguage: secure=secure, categories=smoketest_categories + [SCALABLE]) + yield _ping_pong_scenario( + 'cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_%s' % secstr, + rpc_type='STREAMING', + client_type='ASYNC_CLIENT', + server_type='SYNC_SERVER', + unconstrained_client='async', + secure=secure, + categories=smoketest_categories+[SCALABLE]) + for rpc_type in ['unary', 'streaming']: for synchronicity in ['sync', 'async']: yield _ping_pong_scenario( @@ -248,6 +260,16 @@ class CXXLanguage: secure=secure, categories=smoketest_categories+[SCALABLE]) + yield _ping_pong_scenario( + 'cpp_protobuf_%s_%s_qps_unconstrained_%s_500kib_resource_quota' % (synchronicity, rpc_type, secstr), + rpc_type=rpc_type.upper(), + client_type='%s_CLIENT' % synchronicity.upper(), + server_type='%s_SERVER' % synchronicity.upper(), + unconstrained_client=synchronicity, + secure=secure, + categories=smoketest_categories+[SCALABLE], + resource_quota_size=500*1024) + 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 @@ -348,7 +370,8 @@ class NodeLanguage: self.safename = str(self) def worker_cmdline(self): - return ['tools/run_tests/performance/run_worker_node.sh'] + return ['tools/run_tests/performance/run_worker_node.sh', + '--benchmark_impl=grpc'] def worker_port_offset(self): return 200 @@ -371,6 +394,11 @@ class NodeLanguage: categories=[SCALABLE, SMOKETEST]) yield _ping_pong_scenario( + 'cpp_to_node_unary_ping_pong', rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='async_server', + client_language='c++') + + yield _ping_pong_scenario( 'node_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', unconstrained_client='async', @@ -646,11 +674,69 @@ class GoLanguage: def __str__(self): return 'go' +class NodeExpressLanguage: + + def __init__(self): + pass + self.safename = str(self) + + def worker_cmdline(self): + return ['tools/run_tests/performance/run_worker_node.sh', + '--benchmark_impl=express'] + + def worker_port_offset(self): + return 700 + + def scenarios(self): + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'node_generic_async_streaming_ping_pong', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + # use_generic_payload=True) + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'node_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + + yield _ping_pong_scenario( + 'node_protobuf_unary_ping_pong', rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + categories=[SCALABLE, SMOKETEST]) + + yield _ping_pong_scenario( + 'node_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + unconstrained_client='async', + categories=[SCALABLE, SMOKETEST]) + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'node_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + # unconstrained_client='async') + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'node_to_cpp_protobuf_async_unary_ping_pong', rpc_type='UNARY', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + # server_language='c++', server_core_limit=1, async_server_threads=1) + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'node_to_cpp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + # server_language='c++', server_core_limit=1, async_server_threads=1) + + def __str__(self): + return 'node_express' + LANGUAGES = { 'c++' : CXXLanguage(), 'csharp' : CSharpLanguage(), 'node' : NodeLanguage(), + 'node_express': NodeExpressLanguage(), 'ruby' : RubyLanguage(), 'java' : JavaLanguage(), 'python' : PythonLanguage(), diff --git a/tools/run_tests/performance/scenario_result_schema.json b/tools/run_tests/performance/scenario_result_schema.json index 6bec21df39..3285f212d7 100644 --- a/tools/run_tests/performance/scenario_result_schema.json +++ b/tools/run_tests/performance/scenario_result_schema.json @@ -208,5 +208,10 @@ "name": "serverSuccess", "type": "STRING", "mode": "NULLABLE" + }, + { + "name": "requestResults", + "type": "STRING", + "mode": "NULLABLE" } ] |