Skip to content

Make processingStartTime and processingEndTime optional #51390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

hoxyq
Copy link
Contributor

@hoxyq hoxyq commented May 16, 2025

Summary:

Changelong: [Internal]

Ideally, these should not be optional, but these values are set at runtime.

Assertions added to validate that these values are set before reporting to PerformanceEntryReporter.

Differential Revision: D74811439

@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 May 16, 2025
@facebook-github-bot
Copy link
Contributor

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

hoxyq added 5 commits May 16, 2025 10:10
Summary:
Pull Request resolved: facebook#51254

# Changelog: [Internal]

Defines single timestamp abstraction that will be used in C++ layer of React Native core:
Key primitives include:
- `HighResTimeStamp`: A class representing a specific point in time with high precision.
- `HighResDuration`: A class representing a duration of time with high precision.

Right now, all these just encapsulate `std::chrono::steady_clock` with no extra custom logic. We might revisit this in a future, once we decide to add support for [`Performance.timeOrigin`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin).

This diff also adds a `README.md` documentation file with a brief summary of the `react/timing` module.

Differential Revision: D72796412
…facebook#51253)

Summary:
Pull Request resolved: facebook#51253

# Changelog: [Internal]

Defines bridging template for `HighResTimeStamp` and `HighResTimeDuration`.

When these values are passed to JavaScript over bridge, they will be converted to [`DOMHighResTimeStamp`](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp).

Also the other way around, when we list `HighResTimeStamp` or `HighResTimeDuration` as a type of TurboModule spec, it will expect number value from JavaScript.

Differential Revision: D74506516
…acebook#51251)

Summary:
Pull Request resolved: facebook#51251

# Changelog: [Internal]

Replaces `RuntimeSchedulerClock`, which was an alias for `std::chrono::steady_clock` with previously defined single timestamp abstraction.

Differential Revision: D74246459

Reviewed By: rubennorte
…rt (facebook#51252)

Summary:
Pull Request resolved: facebook#51252

# Changelog: [Internal]

Removes usage of `DOM_HIGH_RES_TIME_STAMP_UNSET` stub contstexpr.

Instead, all events that were using it will now declare timestamps as optional. This is the pre-requisite before migrating these raw `double` values to `HighResTimeStamp`.

Differential Revision: D74248998

Reviewed By: javache
Summary:
Pull Request resolved: facebook#51390

# Changelong: [Internal]

Ideally, these should not be optional, but these values are set at runtime.

Assertions added to validate that these values are set before reporting to `PerformanceEntryReporter`.

Reviewed By: rshest

Differential Revision: D74811439
@facebook-github-bot
Copy link
Contributor

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

@hoxyq hoxyq force-pushed the export-D74811439 branch from 3eb03fc to f2f4621 Compare May 16, 2025 17:21
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 p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants