[NoQA] Restore render timer on performance tests#93573
Conversation
87da0e8 to
8fc0020
Compare
|
Before (actions for other PRs) example: https://github.com/Expensify/App/actions/runs/27538652971/job/81396123168 With this change: |
|
@abdulrahuman5196 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fc002028f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| doNotFake: ['nextTick'], | ||
| // `nextTick` is never faked because Onyx notifies its subscribers on process.nextTick. | ||
| // `performance` is left real only for perf runs (see isPerfTestRun above). | ||
| doNotFake: isPerfTestRun ? ['nextTick', 'performance'] : ['nextTick'], |
There was a problem hiding this comment.
Keep Reassure baselines on the same clock
In PRs that contain this migration, the Reassure workflow does not run the same Jest config for the two samples: I checked .github/workflows/reassurePerformanceTests.yml, where the baseline job force-checks out origin/$BASELINE_BRANCH before npx reassure --baseline (lines 21-30), while the branch job runs this checkout (lines 50-55). That means this new doNotFake only applies to the current sample; the baseline sample still has the old fake performance clock and records [render] durations as 0, so the comparison is non-zero real durations vs zeroed baselines and the perf result is invalid for the change that restores timing. Please ensure both sides use the same timer behavior during this migration.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
main is a baseline branch so it needs to land to work
|
Checking now |
|
@LukasMod To confirm does this need C+ review? |
|
@abdulrahuman5196 Why not, but Its very short config change. Im more worried how stable our current test suite is after this will be merged and we will have new baseline with real values |
Explanation of Change
Currently all [render] times show 0 duration in tests:

performance, which React's Scheduler captures once at module load — zeroing every React Profiler render duration and making Reassure[render]measurements meaningless.perf-test/__perf__) and addperformancetodoNotFakefor those runs only, leaving normal unit tests (which rely on faked timers) unchanged.Fixed Issues
$ #93819
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari