You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(flowcontrol): harden and reorganize the flow-control benchmark suite (llm-d#1638)
* test(flowcontrol): harden and reorganize the flow-control benchmark suite
Test-only changes to pkg/epp/flowcontrol/benchmark; no production code is touched.
- Re-scope the full-path benchmark (FullPathStress -> FullPath) to what it
uniquely measures: dispatch throughput and allocation overhead through the real
producer -> concurrency detector -> controller path. Drop the off-layer producer
leak-counter assertion (covered by the inflightload producer's own unit tests),
report d/s like the other benchmarks, and fix a b.Fatalf called from inside
RunParallel (invalid off the benchmark goroutine).
- Fix the mock benchDetector so the PerformanceMatrix L sweep is meaningful: it
accumulates in-flight up to the limit and reports saturated once exceeded (real
W>L backpressure), while self-healing the empty-queue idle grants the processor's
1ms dispatch ticker would otherwise leak (which previously latched and hung at
L=1). Distinguish leaked idle grants from genuine load saturation via a release
counter. Add detector unit tests covering saturation-at-limit and self-heal.
- Replace fixed bootstrap time.Sleep calls with a warmup request that blocks until
dispatch -- deterministic readiness instead of arbitrary timing.
- Reorganize into doc.go (two-family overview) + helpers_test.go + benchmark_test.go,
and dedup the shared registry/policy setup.
- Add a bench-smoke make target and CI step (go test -bench=. -benchtime=1x) so
benchmark bodies execute on every PR; go test only compiles them otherwise,
letting runtime breakage (panics, deadlocks) go undetected.
Signed-off-by: Luke Van Drie <lukevandrie@google.com>
* test(flowcontrol): correct FullPath backpressure comment
The inline comment claimed the FullPath benchmark sustains W>L queuing, but
worker count rounds down to <= L and the real detector's in-flight load is
released near-instantly, so dispatch is effectively free-flowing. Reword to
match the function godoc: FullPath prices dispatch + the detector's per-cycle
DynamicAttribute reads, not sustained backpressure.
Signed-off-by: Luke Van Drie <lukevandrie@google.com>
* test(flowcontrol): address review feedback on benchmark suite
- Use the llm-d Authors copyright header on the new files (doc.go,
detector_test.go) per review.
- Fail fast if the PerformanceMatrix warmup request is not dispatched,
matching the full-path harness, instead of silently timing a dead
dispatch loop.
- Fail fast if a matrix coordinate dispatches zero requests, so a
wedged dispatch path produces a red build instead of plausible
zero rows.
- Drop the matrix harness TTL from 5m to 30s: nothing in a throughput
benchmark legitimately waits minutes, and a tight TTL bounds a
wedged coordinate to seconds of CI time instead of minutes per cell.
- Document the liveness bias of the benchDetector's stuck-read reclaim
heuristic: true queueing still reports saturated while releases flow;
a stalled release transiently over-admits rather than latching.
Signed-off-by: Luke Van Drie <lukevandrie@google.com>
---------
Signed-off-by: Luke Van Drie <lukevandrie@google.com>
0 commit comments