Crate hyperactor_example_pingpong

Crate hyperactor_example_pingpong 

Source
Expand description

Ping-pong latency benchmark using hyperactor channels.

Equivalent to the ZMQ-based Python ping-pong benchmark, but uses hyperactor channels directly. Supports TCP, Unix, and Local transports, as well as duplex mode (single connection, both directions).

Usage: (no args) run locally (subprocesses for TCP, in-process otherwise) –duplex run using duplex channels (in-process) –server [–transport tcp] run as echo server –client run as client connecting to ADDR (e.g. tcp:[::1]:5555)

Structs§

BenchEntry 🔒
Benchmark entry: name, transport, and whether to use duplex.
Cli 🔒

Enums§

Message 🔒

Constants§

SUITE_SIZES 🔒

Functions§

bench_ping_pong 🔒
Run a single in-process ping-pong benchmark, returning total elapsed time.
bench_ping_pong_duplex 🔒
Quiet duplex ping-pong benchmark for suite mode, returning total elapsed time.
main 🔒
run_client 🔒
run_diff 🔒
Compare two suite CSV files and print a delta table.
run_local_duplex 🔒
Run a duplex benchmark in-process.
run_local_inprocess 🔒
Non-TCP local mode: run server and client as tokio tasks in-process.
run_local_subprocess 🔒
TCP local mode: spawn server and client as separate OS processes.
run_server 🔒
run_server_loop 🔒
Echo loop used by the in-process server task.
run_suite 🔒
Run a benchmark suite across transports and message sizes, writing CSV output.
server_listen_addr 🔒
Build a server listen address from the transport and port.