Skip to content

Implement local connection for perf metrics in HostTarget#52838

Closed
huntie wants to merge 1 commit into
react:mainfrom
huntie:export-D78904766
Closed

Implement local connection for perf metrics in HostTarget#52838
huntie wants to merge 1 commit into
react:mainfrom
huntie:export-D78904766

Conversation

@huntie

@huntie huntie commented Jul 25, 2025

Copy link
Copy Markdown
Member

Summary:
Context

Experimental V2 Performance Monitor prototype, beginning by bringing the Interaction to Next Paint (INP) metric to React Native.

This diff

Wires up a client/subscriber for the "__chromium_devtools_metrics_reporter" runtime binding (to which we emit live metrics events since D78904748). This will be used to unpack these performance updates to send to the host platform.

  • Creates a new HostRuntimeBinding helper, which establishes a local/private CDP session.
  • Conditionally installs our perf metrics runtime binding in HostTarget when perfMonitorV2Enabled is set.
  • Wires up a new onPerfMonitorUpdate event on HostTargetDelegate (unimplemented until the next diff).

Differential Revision: D78904766

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jul 25, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D78904766

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D78904766

@huntie huntie force-pushed the export-D78904766 branch from cd4a12c to f9217a7 Compare August 4, 2025 13:35
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D78904766

@huntie huntie force-pushed the export-D78904766 branch 2 times, most recently from 1f6e13e to 8aa5a16 Compare August 5, 2025 15:02
Summary:
Pull Request resolved: #52838

**Context**

Experimental V2 Performance Monitor prototype, beginning by bringing the [Interaction to Next Paint (INP)](https://web.dev/articles/inp) metric to React Native.

**This diff**

Wires up a client/subscriber for the `"__chromium_devtools_metrics_reporter"` runtime binding (to which we emit live metrics events since D78904748). This will be used to unpack these performance updates to send to the host platform.

- Creates a new `HostRuntimeBinding` helper, which establishes a local/private CDP session.
- Conditionally installs our perf metrics runtime binding in `HostTarget` when `perfMonitorV2Enabled` is set.
- Wires up a new `onPerfMonitorUpdate` event on `HostTargetDelegate` (unimplemented until the next diff).

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D78904766
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D78904766

@huntie huntie force-pushed the export-D78904766 branch from 8aa5a16 to d2f9b2c Compare August 5, 2025 15:07
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 6, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in 2768c84.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @huntie in 2768c84

When will my fix make it into a release? | How to file a pick request?

@huntie huntie deleted the export-D78904766 branch August 21, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants