Skip to content

Test/coverage#12

Merged
phaethix merged 4 commits into
masterfrom
test/coverage
Apr 30, 2026
Merged

Test/coverage#12
phaethix merged 4 commits into
masterfrom
test/coverage

Conversation

@phaethix
Copy link
Copy Markdown
Owner

No description provided.

Three scenarios exercise the TCP server under real contention:

- disjoint-key SETs across 16 clients verify no writes are lost;

- shared-counter INCR across 16 clients verifies atomicity;

- mixed SET/INCR with AOF enabled verifies replay into a fresh

  engine reproduces the running state and never skips records.
Two bench targets run with `cargo bench`:

- engine_bench: SET/GET(hit, miss)/INCR on the in-memory engine;

- resp2_bench: parse SET/GET frames and encode bulk/integer replies.

They call the public API directly so regressions in the hot path surface

without network or persistence noise, giving us a baseline to defend

before the Tokio async rewrite lands.
scripts/bench-smoke.sh starts a release build, waits for the listener,

drives load through examples/load_gen.rs, and tears the server down on

exit. The driver speaks raw RESP2, so no compatibility commands (inline

PING, ECHO handshake) are required from the server — it works today and

keeps working as more commands land later.

Reports per-phase ops/s for SET, GET, and INCR; surfaces non-zero

command errors as a non-zero exit code so the script doubles as a

regression smoke test.
Runs on Ubuntu against stable Rust with warnings treated as errors,

caching the cargo registry and target directory so subsequent runs

stay fast. The bench compile step catches API drift that regular

`cargo test` would miss.
@phaethix phaethix merged commit 8b3d6da into master Apr 30, 2026
1 check passed
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.

1 participant