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
feat(trace): add -vvv binary trace events + live dashboard
Adds a low-overhead binary trace pipeline for inspecting per-request
lifecycle latency end-to-end (issue -> worker_received -> conn_acquired
-> write -> headers -> 1st chunk -> final chunk -> main_received ->
complete), plus per-process asyncio event-loop lag sampling.
- New `inference_endpoint.utils.trace` lock-free SPSC emitter (~90 ns
per event), FIFO transport with O_NONBLOCK writes and 1 MiB kernel
pipe buffer, per-process `emit_loop_lag` async task drives flush at
0.3 s cadence — sole flush driver, no locks needed.
- New `scripts/trace_dashboard.py` rich.Live TUI reading the FIFO and
the loadgen `final_snapshot.json` written by the metrics aggregator.
Renders REQUEST LIFECYCLE / LOADGEN vs TRACE / EVENT LOOP LAG with
one-row-per-metric layout (skips rows with no data on either side).
- Worker + main-process emit sites for the 9-stage lifecycle.
- 40 unit tests for the dashboard's count, fold, drop, loop-lag,
loadgen comparison, and row-skip behavior.
Disabled by default; enabled with `-vvv` on `inference-endpoint`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments