mirror of
https://github.com/zed-industries/zed.git
synced 2026-04-18 07:47:53 +00:00
a9e7b77672
Adds instrumentation to track input-to-frame latency in GPUI windows, helping diagnose input responsiveness issues. ## What this does - Records the time between when an input event is dispatched and when the resulting frame is presented, capturing worst-case latency when multiple events are coalesced into a single frame. - Tracks how many input events get coalesced per rendered frame. - Both metrics are stored in [HdrHistogram](https://docs.rs/hdrhistogram) instances with 3 significant digits of precision. - Latency is only recorded when the input event actually causes a redraw (i.e. marks the window dirty), so idle mouse moves and other no-op events don't skew the data. - Adds a `Dump Input Latency Histogram` command that opens a buffer with a formatted report including percentile breakdowns and visual distribution bars. ## Example output The report shows percentile latencies, a bucketed distribution with bar charts, and a per-frame event coalescing breakdown. Release Notes: - N/A --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Cole Miller <cole@zed.dev>