Profile frame stages via sidecar histogram → ely::servo::perf

This commit is contained in:
2026-05-10 22:30:57 -04:00
parent 18fd20b577
commit f7027e6ea5
9 changed files with 649 additions and 159 deletions
+13
View File
@@ -52,6 +52,7 @@ actions!(
);
fn main() {
init_tracing();
let pending_deep_links = PendingDeepLinks::default();
pending_deep_links.push(startup_deep_links(env::args().skip(1)));
let open_url_queue = pending_deep_links.clone();
@@ -320,6 +321,18 @@ fn quit(_: &Quit, cx: &mut App) {
cx.quit();
}
/// Install the global tracing subscriber. `RUST_LOG` drives the
/// filter; absent it, only `warn` and above leak through so day-to-day
/// runs stay quiet. The perf target is silent by default —
/// `RUST_LOG=ely::servo::perf=info` flips on the frame-time stream
/// without touching the rest of the app. We swallow re-init errors so
/// tests that share the process state with main don't blow up.
fn init_tracing() {
use tracing_subscriber::{EnvFilter, fmt};
let filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("warn"));
let _ = fmt().with_env_filter(filter).with_target(true).try_init();
}
fn open_private_window(_: &OpenPrivateWindow, cx: &mut App) {
if open_browser_window(cx, BrowserWindowMode::Private).is_some() {
cx.activate(true);