# gpui: Record hang trigger class and set the release frame budget to 24ms \(\#63586\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/97b1e64a177a2fe3c2803e323087b5c2fa6fff1e)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 97b1e64a177a2fe3c2803e323087b5c2fa6fff1e

Requested commit: 97b1e64a177a2fe3c2803e323087b5c2fa6fff1e

Commit: 97b1e64a177a2fe3c2803e323087b5c2fa6fff1e

Tree: f8f1af22d59bb259687c18ec8b9c9dc7acbd1bb2

Author: Anthony Eid

Committer: GitHub

## Message

```
gpui: Record hang trigger class and set the release frame budget to 24ms (#63586)

Hang incidents come in two classes that consumers could only tell apart
by comparing `stall_ms` against the hang threshold, which is not
recorded in the event: a single event over the threshold, or an interval
whose cumulative foreground spend reached the frame budget. This PR
makes the class explicit and re-tunes the budget.

- `HangIncident` and `SerializedHangIncident` gain `trigger:
HangTrigger` (`threshold` | `budget`).
- The `Hang Incidents` telemetry event reports `threshold_incidents` and
`budget_incidents` alongside the existing `total_incidents` (kept for
existing queries; it is now the sum of the two).
- The release frame budget moves from 8 ms to 24 ms. At 8 ms almost
every busy 60 Hz frame qualified, so the budget class dominated incident
counts without saying much. 24 ms is above every refresh period, so a
budget incident now means the interval dropped at least one frame on any
display. Frame smoothness below that is measured per-frame by `Frame
Duration Report`. `budget_incidents` is the signal for lowering it
further as hangs get fixed. Debug builds already used 100 ms and are
unchanged.

Part of a series on hang-telemetry data quality; #63588 handles
withheld-frame `dirty_at`, and marking OS prompt waits so they stop
registering as task-poll hangs is next.

Release Notes:

- N/A
```

## Parents

- [520d8bdaebe491fdb4a3656f6b76df53722165fd](https://git.cafe/gitcafe/zed/commit/520d8bdaebe491fdb4a3656f6b76df53722165fd?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/97b1e64a177a2fe3c2803e323087b5c2fa6fff1e?format=markdown)
