mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
profile: Add instrumentation to startup related functions (#44456)
Follow-up to #44443. This helps investigating the cold-start timeline, and could be used by tooling to A/B compare branches affecting the cold-start time. Additionally also change the `handle_request::select` span, so that we can see the blocked time (which was probably what was intended), since the actual time spent on recv after select is insignificant. Testing: Tracing output is not covered by automatic tests. --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ab5deb4030
commit
0ea42bc774
@@ -129,6 +129,7 @@ impl App {
|
||||
self.state = AppState::Running(running_state);
|
||||
}
|
||||
|
||||
#[servo::servo_tracing::instrument(level = "debug", skip_all)]
|
||||
fn create_platform_window(
|
||||
&self,
|
||||
url: Url,
|
||||
|
||||
@@ -105,6 +105,7 @@ pub struct HeadedWindow {
|
||||
}
|
||||
|
||||
impl HeadedWindow {
|
||||
#[servo::servo_tracing::instrument(level = "debug", name = "HeadedWindow::new", skip_all)]
|
||||
pub(crate) fn new(
|
||||
servoshell_preferences: &ServoShellPreferences,
|
||||
event_loop: &ActiveEventLoop,
|
||||
|
||||
@@ -35,6 +35,7 @@ pub struct HeadlessWindow {
|
||||
}
|
||||
|
||||
impl HeadlessWindow {
|
||||
#[servo::servo_tracing::instrument(level = "debug", name = "HeadlessWindow::new", skip_all)]
|
||||
pub fn new(servoshell_preferences: &ServoShellPreferences) -> Rc<Self> {
|
||||
let size = servoshell_preferences.initial_window_size;
|
||||
|
||||
|
||||
@@ -277,6 +277,7 @@ pub struct App {
|
||||
|
||||
#[expect(unused)]
|
||||
impl App {
|
||||
#[servo::servo_tracing::instrument(skip_all, name = "App::new", level = "info")]
|
||||
pub(super) fn new(init: AppInitOptions) -> Rc<Self> {
|
||||
let mut servo_builder = ServoBuilder::default()
|
||||
.opts(init.opts)
|
||||
|
||||
@@ -86,6 +86,7 @@ impl ServoShellWindow {
|
||||
}
|
||||
|
||||
/// Must be called *after* `self` is in `state.windows`, otherwise it will panic.
|
||||
#[servo::servo_tracing::instrument(skip(self, state))]
|
||||
pub(crate) fn create_toplevel_webview(&self, state: Rc<RunningAppState>, url: Url) -> WebView {
|
||||
let mut webview_builder =
|
||||
WebViewBuilder::new(state.servo(), self.platform_window.rendering_context())
|
||||
|
||||
Reference in New Issue
Block a user