diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index e7b3c057fc199..6641e45ff9f69 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -1568,6 +1568,62 @@ def __str__(self): return "java" +class RustLanguage(Language): + def worker_cmdline(self): + return ["tools/run_tests/performance/run_worker_go.sh"] + + def worker_port_offset(self): + return 951 + + def scenarios(self): + secstr = "secure" + + # unconstrained_client='async' is intended (client uses tokio + # executor) + yield _ping_pong_scenario( + "rust_protobuf_sync_unary_qps_unconstrained_%s" % secstr, + rpc_type="UNARY", + client_type="SYNC_CLIENT", + server_type="SYNC_SERVER", + unconstrained_client="async", + secure=True, + categories=[SCALABLE], + ) + + yield _ping_pong_scenario( + "rust_protobuf_sync_unary_ping_pong_%s" % secstr, + rpc_type="UNARY", + client_type="SYNC_CLIENT", + server_type="SYNC_SERVER", + async_server_threads=1, + secure=True, + categories=[SCALABLE, SMOKETEST], + ) + + yield _ping_pong_scenario( + "rust_protobuf_sync_streaming_ping_pong_%s" % secstr, + rpc_type="STREAMING", + client_type="SYNC_CLIENT", + server_type="SYNC_SERVER", + async_server_threads=1, + secure=True, + ) + + # unconstrained_client='async' is intended (client uses goroutines) + yield _ping_pong_scenario( + "rust_protobuf_sync_streaming_qps_unconstrained_%s" % secstr, + rpc_type="STREAMING", + client_type="SYNC_CLIENT", + server_type="SYNC_SERVER", + unconstrained_client="async", + secure=True, + categories=[SCALABLE], + ) + + def __str__(self): + return "rust" + + class GoLanguage(Language): def worker_cmdline(self): return ["tools/run_tests/performance/run_worker_go.sh"] @@ -1783,4 +1839,5 @@ def __str__(self): "python_asyncio": PythonAsyncIOLanguage(), "go": GoLanguage(), "node": NodeLanguage(), # 'node' means 'node_purejs'. + "rust": RustLanguage(), } diff --git a/tools/run_tests/performance/templates/loadtest_template_prebuilt_all_languages.yaml b/tools/run_tests/performance/templates/loadtest_template_prebuilt_all_languages.yaml index fcc8170a72df8..6a77352d3ec0c 100644 --- a/tools/run_tests/performance/templates/loadtest_template_prebuilt_all_languages.yaml +++ b/tools/run_tests/performance/templates/loadtest_template_prebuilt_all_languages.yaml @@ -66,6 +66,19 @@ spec: - bash image: ${prebuilt_image_prefix}/go:${prebuilt_image_tag} name: main + - language: rust + pool: ${client_pool} + run: + - args: + - -c + - | + timeout --kill-after="${KILL_AFTER}" "${POD_TIMEOUT}" \ + /release/benchmark \ + --driver_port="${DRIVER_PORT}" + command: + - bash + image: "us-central1-docker.pkg.dev/arjan-cdf/arjansbal/tonic:latest" + name: main - language: java pool: ${client_pool} run: @@ -163,6 +176,19 @@ spec: results: bigQueryTable: ${big_query_table} servers: + - language: rust + pool: ${server_pool} + run: + - args: + - -c + - | + timeout --kill-after="${KILL_AFTER}" "${POD_TIMEOUT}" \ + /release/benchmark \ + --driver_port="${DRIVER_PORT}" + command: + - bash + image: "us-central1-docker.pkg.dev/arjan-cdf/arjansbal/tonic:latest" + name: main - language: csharp pool: ${server_pool} run: