-
Notifications
You must be signed in to change notification settings - Fork 25k
Refactor tracing in performance.mark and performance.measure #49639
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
Closed
Conversation
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
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D69246772 |
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Feb 24, 2025
…k#49639) Summary: Changelog: [internal] This refactors some code in the performance API and Perfetto to avoid doing unnecessary work when not tracing (e.g.: string manipulation for tracks). It also reduces the cost of logging marks/measures to tracing backends if not actively tracing (e.g.: moving the check to outside the lock). Differential Revision: D69246772
ee72e11 to
855c1d3
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D69246772 |
Summary: Changelog: [internal] This adds a basic benchmark for different use cases of the `performance` API. Baseline: | (index) | Task name | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples | | ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- | | 0 | 'mark (default)' | '5692.08 ± 0.33%' | '5590.00' | '177735 ± 0.02%' | '178891' | 175683 | | 1 | 'mark (with custom startTime)' | '5775.21 ± 0.27%' | '5690.00' | '174880 ± 0.02%' | '175747' | 173154 | | 2 | 'measure (with start and end timestamps)' | '6842.61 ± 0.35%' | '6730.00' | '147672 ± 0.02%' | '148588' | 146144 | | 3 | 'measure (with mark names)' | '6828.01 ± 0.75%' | '6700.00' | '148371 ± 0.02%' | '149254' | 146456 | | 4 | 'clearMarks' | '817.04 ± 0.03%' | '800.00' | '1233054 ± 0.01%' | '1250000' | 1223933 | | 5 | 'clearMeasures' | '835.59 ± 0.03%' | '820.00' | '1203121 ± 0.01%' | '1219512' | 1196758 | | 6 | 'mark + clearMarks' | '6137.42 ± 1.32%' | '5920.00' | '167661 ± 0.02%' | '168919' | 162935 | | 7 | 'measure + clearMeasures (with start and end timestamps)' | '7353.85 ± 0.60%' | '7200.00' | '138196 ± 0.02%' | '138889' | 135984 | | 8 | 'measure + clearMeasures (with mark names)' | '7342.93 ± 0.66%' | '7170.00' | '138726 ± 0.02%' | '139470' | 136186 | Reviewed By: bgirard Differential Revision: D66926182
…k#49639) Summary: Changelog: [internal] This refactors some code in the performance API and Perfetto to avoid doing unnecessary work when not tracing (e.g.: string manipulation for tracks). It also reduces the cost of logging marks/measures to tracing backends if not actively tracing (e.g.: moving the check to outside the lock). Reviewed By: bgirard Differential Revision: D69246772
855c1d3 to
bda1f00
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D69246772 |
Contributor
|
This pull request has been merged in 8989bc2. |
ghost
pushed a commit
to discord/react-native
that referenced
this pull request
Jul 29, 2025
…k#49639) Summary: Pull Request resolved: facebook#49639 Changelog: [internal] This refactors some code in the performance API and Perfetto to avoid doing unnecessary work when not tracing (e.g.: string manipulation for tracks). It also reduces the cost of logging marks/measures to tracing backends if not actively tracing (e.g.: moving the check to outside the lock). Reviewed By: bgirard Differential Revision: D69246772 fbshipit-source-id: 141a13f609f12be7ab8ca00f7aa1892b34770bbb
ghost
pushed a commit
to discord/react-native
that referenced
this pull request
Jul 29, 2025
…k#49639) Summary: Pull Request resolved: facebook#49639 Changelog: [internal] This refactors some code in the performance API and Perfetto to avoid doing unnecessary work when not tracing (e.g.: string manipulation for tracks). It also reduces the cost of logging marks/measures to tracing backends if not actively tracing (e.g.: moving the check to outside the lock). Reviewed By: bgirard Differential Revision: D69246772 fbshipit-source-id: 141a13f609f12be7ab8ca00f7aa1892b34770bbb
gabrieldonadel
pushed a commit
to gabrieldonadel/react-native
that referenced
this pull request
Aug 12, 2025
…k#49639) Summary: Pull Request resolved: facebook#49639 Changelog: [internal] This refactors some code in the performance API and Perfetto to avoid doing unnecessary work when not tracing (e.g.: string manipulation for tracks). It also reduces the cost of logging marks/measures to tracing backends if not actively tracing (e.g.: moving the check to outside the lock). Reviewed By: bgirard Differential Revision: D69246772 fbshipit-source-id: 141a13f609f12be7ab8ca00f7aa1892b34770bbb
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
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]
This refactors some code in the performance API and Perfetto to avoid doing unnecessary work when not tracing (e.g.: string manipulation for tracks).
It also reduces the cost of logging marks/measures to tracing backends if not actively tracing (e.g.: moving the check to outside the lock).
Differential Revision: D69246772