Log worst hanging tasks and actions - #57835
Conversation
| .collect::<Vec<_>>(); | ||
|
|
||
| if event.need_rescan() { | ||
| if !watcher_logging_rate_limited() { |
There was a problem hiding this comment.
note for reviewer: This got rather spammy when the app hangs hiding hang detection reports. For now just ratelimitted this specific log, we should probably add ratelimiting & deduplication to all our logging.
9fd8afe to
a2f2370
Compare
|
There are some unnamed actions (internally used for example by vim). Do we want to track their location and report them too? I would say yes but after setting up telemetry. |
a2f2370 to
44584d4
Compare
We have a lot of long blocking tasks on both the foreground and background, this is a start of getting some insight into those. In principle we should report every item taking longer then a millisecond however that would cause a lot of reports right now. As the app gets better we can lower this bound. Will be followed up with a PR sending these to telemetry and adding a setting to control when tasks get reported. Finally this adds tree dev actions: - hang action - hang foreground - hang background These cause a hang to check if hang reporting is working and in the future telemetry add dev action to hang the executor
44584d4 to
44008ba
Compare
1806dea to
2efbdfa
Compare
2efbdfa to
076a63b
Compare
Is this still blocked by a setting? I think it's acceptable for Zed, but as GPUI is a general app framework there should be a way to disable it |
mhm fair point. Could make it a feature. Though this slowdown was already there with the profiler, so I'd not say it's really urgent. |
|
Agreed, I'm working on more gpui dev tooling at the moment so we should eventually have this be under a feature. I haven't looked at the code either but I would like to unify a lot of this the histogram latency tracker we have as well |
We have a lot of long blocking tasks on both the foreground and background, this is a start of getting some insight into those. We will now log tasks running longer then 100ms on the foreground or background. Hanging actions will also be logged including their name. We simultaneously collect statistics on task and action performance and send those to telemetry. This includes quantiles and averages for each hanging task. Finally this adds tree dev actions: - hang action - hang foreground - hang background These cause a hang to check if hang reporting is working and in the future telemetry. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - Added logging and telemetry of tasks and actions with performance issues
We have a lot of long blocking tasks on both the foreground and background, this is a start of getting some insight into those. We will now log tasks running longer then 100ms on the foreground or background. Hanging actions will also be logged including their name. We simultaneously collect statistics on task and action performance and send those to telemetry. This includes quantiles and averages for each hanging task. Finally this adds tree dev actions: - hang action - hang foreground - hang background These cause a hang to check if hang reporting is working and in the future telemetry. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - Added logging and telemetry of tasks and actions with performance issues
We have a lot of long blocking tasks on both the foreground and background, this is a start of getting some insight into those. We will now log tasks running longer then 100ms on the foreground or background. Hanging actions will also be logged including their name. We simultaneously collect statistics on task and action performance and send those to telemetry. This includes quantiles and averages for each hanging task. Finally this adds tree dev actions: - hang action - hang foreground - hang background These cause a hang to check if hang reporting is working and in the future telemetry. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - Added logging and telemetry of tasks and actions with performance issues

We have a lot of long blocking tasks on both the foreground and background, this is a start of getting some insight into those.
We will now log tasks running longer then 100ms on the foreground or background. Hanging actions will also be logged including their name. We simultaneously collect statistics on task and action performance and send those to telemetry. This includes quantiles and averages for each hanging task.
Finally this adds tree dev actions:
These cause a hang to check if hang reporting is working and in the future telemetry.
Self-Review Checklist:
Closes #ISSUE
Release Notes: