Skip to content

[WIP] App startup steady ping after bundles loaded#203

Closed
vzaidman wants to merge 3 commits into
mainfrom
app-startup-steady-ping-after-bundles-loaded
Closed

[WIP] App startup steady ping after bundles loaded#203
vzaidman wants to merge 3 commits into
mainfrom
app-startup-steady-ping-after-bundles-loaded

Conversation

@vzaidman
Copy link
Copy Markdown

Summary

Test plan

  • This change maintains backwards compatibility with previous Local Storage data (if modifying settings, experiments, or other persisted client state).

Upstreaming plan

@meta-cla meta-cla Bot added the cla signed label Aug 27, 2025
@vzaidman vzaidman force-pushed the app-startup-steady-ping-after-bundles-loaded branch 8 times, most recently from 9a5af6d to 6a18930 Compare August 27, 2025 14:40
@vzaidman vzaidman force-pushed the app-startup-steady-ping-after-bundles-loaded branch from 6a18930 to 67572ef Compare August 28, 2025 09:07
// https://github.com/facebook/hermes/blob/ae235193b9329867afaa2838183cbffa34aca098/API/hermes/cdp/DebuggerDomainAgent.cpp#L183-L185
// It measures the round trip time for CDP message after being queued in the CDP queue in each direction.
await debuggerModel.syncDebuggerId();
const roundtripTime = Date.now() - startMs;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we use performance.now()?

}
}

tryReportingCdpLowRoundtrip(cdpLowRoundtripStartTime: number): boolean {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about the "low roundtrip" naming — not quite descriptive enough.

Maybe

  • tryReportAchievedResponsiveRoundtrip(startTime: number)
  • tryReportBackendRoundtripPerfSettled
  • tryReportStartupLivenessPingSettled (probably best?)
  • tryReportStartupPingSettled

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And, let's add a doc comment above this method to describe how we define/measure this metric.


import nodeIconStyles from './nodeIcon.css.js';

const MS_BETWEEN_ROUNDTRIP_MEASUREMENTS = 3000;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if this should be more frequent, as (IIUC) this will create a very coarse, 3s incremented, metric? What about 1s/500ms?

@vzaidman vzaidman closed this Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants