bench: improve render pipeline benchmark reliability (#92715)
### What? Improves the render pipeline benchmark (`bench/render-pipeline/benchmark.ts`) for more reliable and accurate RPS measurement. ### Why? The benchmark had several issues that affected measurement accuracy: - V8 CPU profiler was on by default, adding 5-15% overhead to all numbers - 30 warmup requests was insufficient for V8 TurboFan JIT stabilization - No stddev made it impossible to tell signal from noise - Request errors crashed the whole benchmark instead of being tracked - No port cleanup delay between mode switches could cause bind failures - No option to isolate routes from cross-route GC/memory contamination - Closed-loop measurement model limitations were undocumented ### How? - Default `--capture-cpu` to `false` (use `--capture-cpu=true` for dedicated profiling runs) - Add `--warmup-until-stable` flag (default: true) that runs warmup in batches and stops when mean latency delta is <5% between consecutive batches - Add standard deviation to `computeStats` and print it in results - Track request errors in the under-load phase instead of aborting - Add 2s sleep between mode switches when `--stream-mode=both` - Add `--isolate-routes` flag to restart the server between routes - Document the closed-loop measurement model in code and README - Add minimal-server scenario documentation to README and benchmarking playbook <!-- NEXT_JS_LLM_PR -->
Showing
This diff is collapsed.
Please
register
or
sign in
to comment