feat: benchmark proxy payload scaling#88
Conversation
23eeb78 to
f45f1a2
Compare
|
@harivilasp can you resolve conflicts? |
|
@harivilasp Thanks for the PR. |
|
@harivilasp could you please add some benchmarking result in PR description for |
|
Sure checking |
Signed-off-by: harivilasp <harivilasp@gmail.com>
f45f1a2 to
9652179
Compare
|
Thanks, that makes sense. This PR currently focuses on proxy payload-size overhead only and does not include a concurrency benchmark. I agree that a proper concurrency benchmark should live in gateway_bench.rs. I can keep this PR scoped to payload-size benchmarking and follow up separately with a gateway concurrency benchmark. |
ashwing
left a comment
There was a problem hiding this comment.
Nice to finally have a number on whether forwarding cost scales with body size. Good timing too since the forward path is churning right now (#82 just merged, #85 is reworking gateway.rs).
One thing though: as it stands this runs once and prints numbers, and nobody's going to eyeball them against anything later. The whole reason #32 wanted this was regression detection, and that only kicks in once there's a saved baseline on main and PR branches get compared against it (criterion --save-baseline basically). That's the Phase 3 bit in the issue. I'd push to get that wiring in not long after this lands, since a regression from the gateway.rs rework is exactly the kind of thing it'd catch.
Few smaller things inline.
Signed-off-by: harivilasp <harivilasp@gmail.com>
0285a2b to
df1f463
Compare
Summary
Refs #32.
Extends the existing
agentic-serverproxy Criterion benchmark with Phase 1 coverage for proxy-overhead payload-size scaling:store: falserequest bodies so proxied cases exercise the proxy pathstore: falserequest reaches the mock vLLM on the proxy path with the expected request shapeThe benchmark still uses the local mock LLM and local gateway, so it remains deterministic and does not require a live vLLM server.
Per review feedback, concurrency benchmarking is intentionally left out of this proxy-only benchmark and can be handled in
gateway_bench.rs/ database-backed gateway benchmarks.Benchmark Results
Run locally on this branch with:
cargo +stable bench -p agentic-server --bench benches -- 'non_stream/body_size'These numbers use the local mock upstream and should be treated as reference data for this benchmark harness, not production latency claims.
Test Plan
cargo +stable fmt --all --checkrtk test cargo +stable test -p agentic-servercargo +stable clippy -p agentic-server --all-targets -- -D warningscargo +stable test -p agentic-server --benches --no-runcargo +stable bench -p agentic-server --bench benches -- 'non_stream/body_size'