Skip to content
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

refactor[react-devtools/tests]: use registered marks instead of cleared in tests #29929

Merged

Conversation

hoxyq
Copy link
Contributor

@hoxyq hoxyq commented Jun 19, 2024

Summary

This is the pre-requisite for #29231.

Current implementation of profiling hooks is only using performance.mark and then makes performance.clearMarks call right after it to free the memory. We've been relying on this assumption in the tests that every mark is cleared by the time we check something.

#29231 adds performance.measure calls and the start mark is not cleared until the corresponding stop one is registered, and then they are cleared together.

How did you test this change?

To test against React from source:

yarn test --build --project=devtools -r=experimental --ci

To test against React 18:

./scripts/circleci/download_devtools_regression_build.js 18.0 --replaceBuild
node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental --reactVersion 18.0 --ci

@hoxyq hoxyq requested a review from vzaidman June 19, 2024 09:06
Copy link

vercel bot commented Jun 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 9:11am

@hoxyq hoxyq merged commit e684ca6 into facebook:main Jun 19, 2024
44 checks passed
@hoxyq hoxyq deleted the react-devtools/refactor-timeline-profiler-tests branch June 19, 2024 14:45
hoxyq added a commit that referenced this pull request Jul 3, 2024
## Summary

Full list of changes, mostly fixes:
* chore[react-devtools/renderer]: dont show strict mode warning for prod
renderer builds ([hoxyq](https://github.com/hoxyq) in
[#30158](#30158))
* chore[react-devtools/ui]: fix strict mode badge styles
([hoxyq](https://github.com/hoxyq) in
[#30159](#30159))
* fix[react-devtools]: restore original args when recording errors
([hoxyq](https://github.com/hoxyq) in
[#30091](#30091))
* Read constructor name more carefully
([LoganDark](https://github.com/LoganDark) in
[#29954](#29954))
* refactor[react-devtools/extensions]: dont debounce cleanup logic on
navigation ([hoxyq](https://github.com/hoxyq) in
[#30027](#30027))
* lint: enable reportUnusedDisableDirectives and remove unused
suppressions ([kassens](https://github.com/kassens) in
[#28721](#28721))
* fix[react-devtools/extensions]: propagate globals from env
([hoxyq](https://github.com/hoxyq) in
[#29963](#29963))
* refactor[react-devtools/tests]: use registered marks instead of
cleared in tests ([hoxyq](https://github.com/hoxyq) in
[#29929](#29929))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants