Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust benchmarks #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 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,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"]
Expand Down Expand Up @@ -1783,4 +1839,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
Loading