Skip to content

Commit

Permalink
Rust benchamarking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
arjan-bal committed Dec 30, 2024
1 parent bac8e34 commit aeb7ab6
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tools/run_tests/performance/scenario_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1568,6 +1568,42 @@ 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],
)

def __str__(self):
return "rust"


class GoLanguage(Language):
def worker_cmdline(self):
return ["tools/run_tests/performance/run_worker_go.sh"]
Expand Down Expand Up @@ -1783,4 +1819,5 @@ def __str__(self):
"python_asyncio": PythonAsyncIOLanguage(),
"go": GoLanguage(),
"node": NodeLanguage(), # 'node' means 'node_purejs'.
"rust": RustLanguage(),
}
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit aeb7ab6

Please sign in to comment.