Merged
Conversation
adds `ember-cli benchmark` with pipelining support, concurrent clients, and latency percentile reporting. workloads: SET, GET, PING with configurable request count, client count, pipeline depth, data size, and keyspace. bench_conn provides a lightweight pipelined TCP connection that pre-serializes commands once and writes them N times per batch. GET workload pre-populates keys before measuring reads. output shows ops/sec and p50/p99/p99.9/max latency per workload.
9fabf6a to
5acac69
Compare
kacy
added a commit
that referenced
this pull request
Feb 11, 2026
adds `ember-cli benchmark` with pipelining support, concurrent clients, and latency percentile reporting. workloads: SET, GET, PING with configurable request count, client count, pipeline depth, data size, and keyspace. bench_conn provides a lightweight pipelined TCP connection that pre-serializes commands once and writes them N times per batch. GET workload pre-populates keys before measuring reads. output shows ops/sec and p50/p99/p99.9/max latency per workload.
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.
summary
adds
ember-cli benchmarkwith pipelining support, concurrent clients, and latency percentile reporting. depends on #77 (cluster subcommands) — merge that first.usage:
options:
-nrequests (default: 100,000)-cconcurrent clients (default: 50)-Ppipeline depth (default: 1)-dvalue size in bytes (default: 64)-tworkloads to run:set,get,ping(default:set,get)--keyspaceunique keys (default: 100,000)-qquiet modeoutput:
new files:
bench_conn.rs— lightweight pipelined TCP connection that pre-serializes a command once and writes it N times per batchbenchmark.rs— workload runner with barrier-synchronized clients, per-batch latency collection, and percentile computationwhat was tested
BenchmarkArgsdefaults, percentile computation (empty/single/multiple), format helpers, workload frame generation (correct RESP3 structure), bench connection command buildingcargo test -p emberkv-cli)cargo clippy --workspace -- -D warnings,cargo fmt --all --check,cargo test --workspacedesign considerations
BenchConnectionwith a 256 KiB read buffer for throughputBytesonce, then written N times per pipeline batch to avoid re-serialization overheadtokio::sync::Barriersynchronizes client start to minimize warmup skewStdRng::from_os_rng()instead ofThreadRngforSendcompatibility with tokio::spawn