Skip to content

Add Python benchmark engine with sync and async runners - #21

Draft
jduo wants to merge 1 commit into
ikolomi:mainfrom
jduo:python-engine
Draft

jduo wants to merge 1 commit into
ikolomi:mainfrom
jduo:python-engine

Conversation

@jduo

@jduo jduo commented Apr 12, 2026

Copy link
Copy Markdown

Implement the Python engine for resp-bench with support for both synchronous (threaded) and asynchronous (asyncio) execution modes.

Resolves #12

Supported drivers:

  • redis-py (sync + async)
  • valkey-py (sync + async)
  • valkey-glide (sync + async)

Features:

  • HdrHistogram latency collection (1us-600s, 3 significant figures)
  • NDJSON metrics output compatible with graph generator
  • Java-compatible deterministic key generation (LCG PRNG)
  • Token bucket rate limiting (CPS/RPS)
  • Request-count and duration-based completion criteria
  • Weighted command selection (get, set, ping)

Integration:

  • Makefile targets: python-build/run/run-sync/run-async/test/clean/info
  • Driver configs: default, high-throughput, and example for all 3 drivers
  • Matrix runner: added redis-py, valkey-py, valkey-glide-python to DRIVER_ENGINE_MAP

Implement the Python engine for resp-bench with support for both
synchronous (threaded) and asynchronous (asyncio) execution modes.

Supported drivers:
- redis-py (sync + async)
- valkey-py (sync + async)
- valkey-glide (sync + async)

Features:
- HdrHistogram latency collection (1us-600s, 3 significant figures)
- NDJSON metrics output compatible with graph generator
- Java-compatible deterministic key generation (LCG PRNG)
- Token bucket rate limiting (CPS/RPS)
- Request-count and duration-based completion criteria
- Weighted command selection (get, set, ping)

Integration:
- Makefile targets: python-build/run/run-sync/run-async/test/clean/info
- Driver configs: default, high-throughput, and example for all 3 drivers
- Matrix runner: added redis-py, valkey-py, valkey-glide-python to
  DRIVER_ENGINE_MAP

Signed-off-by: James Duong <duong.james@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Python engine

1 participant