gpui: Add per-window frame-duration and present-interval histograms (#61871)
GPUI's input-latency histograms only sample frames that were preceded by input, so a window that janks while animating or while streaming content (agent panel output, terminal scrollback) never shows up in the fleet's latency reports. Hang detection catches outright stalls, but frames that are merely late — stutters in the 30–100ms range during animation — currently aren't visible anywhere. This adds a `frame-duration-histogram` feature to GPUI with a per-window tracker recording two histograms: the duration of every `Window::draw`, and the interval between consecutively presented frames while the window is animating (a next-frame callback was already scheduled at the previous present, so frames are being produced back-to-back and a stretched interval means frames were missed). Intervals are only recorded for active windows, since inactive windows are deliberately throttled to a lower frame rate, and re-presents of unchanged frames (e.g. sustaining the display's refresh rate during high-rate input) are excluded. Zed enables the feature and reports both histograms every five minutes as a "Frame Duration Report" telemetry event alongside the existing "Latency Report", bucketed at roughly the 120Hz/60Hz/30Hz frame budgets so dropped-frame rates can be aggregated across the fleet. Release Notes: - Added frame rendering performance to the diagnostics Zed collects when telemetry is enabled, to help find and fix stutters and dropped frames.
R
Richard Feldman committed
9e236090b9a31338caf233d440f724922b58d7e1
Parent: c65e08a
Committed by GitHub <noreply@github.com>
on 8/10/2026, 5:37:27 PM