Replace DOMHighResTimeStamp alias in ReactCommon with new abstractions (#50585)#51512
Closed
hoxyq wants to merge 2 commits intofacebook:mainfrom
Closed
Replace DOMHighResTimeStamp alias in ReactCommon with new abstractions (#50585)#51512hoxyq wants to merge 2 commits intofacebook:mainfrom
hoxyq wants to merge 2 commits intofacebook:mainfrom
Conversation
Summary: # Changelog: [Internal] There are multiple changes: 1. `PerformanceTracer` class, `TraceEvent` struct are moved to `tracing` namespace. These are parts of the Tracing subsystems of the jsinspector, this should bring more clarity and make things more explicit. 2. Added `Timing.h` class which defines conversion logic from `HighResTimeStamp` to absolute units that are expected by CDP. 3. `PerformanceTracer` will receive timestamps for Performance Web API entries in `HighResTimeStamp`. Also, we will explicilty define a Tracking Clock time origin that will be epoch of the `steady_clock`. This aligns with the approach in Chromium and saves us from aligning custom DOMHighResTimeStamps that can be specified in performance.mark / performance.measure calls: these should not extend the timeline window. I've confirmed that this is the current behavior in Chromium. Reviewed By: rubennorte Differential Revision: D75185467
facebook#50585) Summary: Pull Request resolved: facebook#50585 # Changelog: [Internal] Replaces `DOMHighResTimeStamp` alias completely in `ReactCommon` with `HighResTimeStamp`. `DOMHighResTimeStamp` as a type is now expected to be used only in JavaScript. I didn't update places where we explcitly use `std::chrono::high_resolution_clock`, since it is platform-specific and there is no guarantee that `std::chrono::high_resolution_clock` == `std::chrono::steady_clock`. Also, places that are isolated and not part of the Web Performance APIs, such as Telemetry for Fabric, are not updates as part of this diff. Although these subsystems are also using `std::chrono::steady_clock` as a low-level representation, they are not sharing it with other parts of the React Native core. Differential Revision: D75185613
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D75185613 |
Contributor
|
This pull request has been merged in f03268b. |
ghost
pushed a commit
to discord/react-native
that referenced
this pull request
Jul 29, 2025
facebook#51512) Summary: Pull Request resolved: facebook#51512 Pull Request resolved: facebook#50585 Replaces `DOMHighResTimeStamp` alias completely in `ReactCommon` with `HighResTimeStamp`. `DOMHighResTimeStamp` as a type is now expected to be used only in JavaScript. I didn't update places where we explcitly use `std::chrono::high_resolution_clock`, since it is platform-specific and there is no guarantee that `std::chrono::high_resolution_clock` == `std::chrono::steady_clock`. Also, places that are isolated and not part of the Web Performance APIs, such as Telemetry for Fabric, are not updates as part of this diff. Although these subsystems are also using `std::chrono::steady_clock` as a low-level representation, they are not sharing it with other parts of the React Native core. Reviewed By: rubennorte Differential Revision: D75185613 fbshipit-source-id: 889719368de163e6f529689df6cc16d816fde66c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Changelog: [Internal]
Replaces
DOMHighResTimeStampalias completely inReactCommonwithHighResTimeStamp.DOMHighResTimeStampas a type is now expected to be used only in JavaScript.I didn't update places where we explcitly use
std::chrono::high_resolution_clock, since it is platform-specific and there is no guarantee thatstd::chrono::high_resolution_clock==std::chrono::steady_clock.Also, places that are isolated and not part of the Web Performance APIs, such as Telemetry for Fabric, are not updates as part of this diff. Although these subsystems are also using
std::chrono::steady_clockas a low-level representation, they are not sharing it with other parts of the React Native core.Differential Revision: D75185613