Test/coverage#12
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.