Miniprofiler (#42385)

Release Notes:

- Added hang detection and a built in performance profiler
This commit is contained in:
localcc
2025-11-12 15:31:20 +01:00
committed by GitHub
parent 2119ac42d7
commit 49634f6041
28 changed files with 1283 additions and 103 deletions
+5 -3
View File
@@ -12,7 +12,7 @@ mod session;
use std::{sync::Arc, time::Duration};
use async_dispatcher::{Dispatcher, Runnable, set_dispatcher};
use gpui::{App, PlatformDispatcher};
use gpui::{App, PlatformDispatcher, RunnableVariant};
use project::Fs;
pub use runtimelib::ExecutionState;
@@ -45,11 +45,13 @@ fn zed_dispatcher(cx: &mut App) -> impl Dispatcher {
// other crates in Zed.
impl Dispatcher for ZedDispatcher {
fn dispatch(&self, runnable: Runnable) {
self.dispatcher.dispatch(runnable, None)
self.dispatcher
.dispatch(RunnableVariant::Compat(runnable), None);
}
fn dispatch_after(&self, duration: Duration, runnable: Runnable) {
self.dispatcher.dispatch_after(duration, runnable);
self.dispatcher
.dispatch_after(duration, RunnableVariant::Compat(runnable));
}
}