feat: export performance data#54412
Conversation
b1924cb to
64a637a
Compare
|
cc @mountiny @hannojg I'm testing this now further, but for a TLDR I reworked how the whole Performance module is being declared. I figured why its' init has been postponed until invoked (dynamic require) and moved the possible 'heavy' workload into opt-in calls - the dependency module (react-native-performance) is now always there, but does ~nothing until invoked because all the observers are turned off by default. This enables us to:
If any part of the profiling turns to be too heavy during runtime measurements, we can turn turn it off and stick to the debug workflows (eg. for resource logging). |
|
Also moved the |
|
@rayane-djouah can you please test and review this PR? @adhorodyski, can you please add testing steps to make sure everything related to performance monitoring works as expected after this change? |
|
Yes, I will update these in a few hours. I tested this on web + mobile ios (works fine), will also run on mobile android. |
|
@hannojg / @kirillzyusko can I ask you to help verify if the e2e tests pass fine for you with these updates? Changes included here should be transparent and non-breaking :) |
|
@mountiny I'm still fighting with Android builds today to verify on this platform. I'll update when done. Please let me know if there's anything else missing on my end. |
4fa0b75 to
48e5d1b
Compare
|
@tgolen addressed all the comments, thanks! |
|
Ready for @rayane-djouah to review and test. |
|
Managed to finally run on Android, spotted one bug that prints the TTI metric under Edit: all good across the platforms cc @mountiny |
|
I run However, Additionally, I tried starting profiling in a dev build on iOS native, and the app crashed. Could this be due to the absence of a source map? @adhorodyski, if possible, could you clarify the test steps further? Thanks! |
|
@rayane-djouah I believe the crash is due to this known issue: #53061 As for the iOS builds, can you share the output you're getting? I'll also re-sync this branch with main now, though changes proposed here do not impact native builds (suggesting it's local to your machine). |
|
@adhorodyski here is the output I'm getting:
|
This worked for me, thanks! |
|
Here are the resulting ios-App_Info_9.0.80-3.json |
|
@adhorodyski Let’s move the current steps to the "Tests" section of the author checklist and add the following steps to the "QA Steps" section for the QA team to test on staging/production:
|
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid_native.mp4Android: mWeb ChromeiOS: NativeUntitled.mp4iOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2025-01-02.at.4.07.02.PM.movMacOS: DesktopScreen.Recording.2025-01-02.at.3.28.01.PM.movios-App_Info_9.0.80-3.json |
|
Updated the lists, thanks @rayane-djouah! :) |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/tgolen in version: 9.0.81-0 🚀
|
|
@adhorodyski PR is failing with issue #54886 can not check iOS because #53061 |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.0.81-6 🚀
|

@mountiny @hannojg
Explanation of Change
This PR adds support for exporting performance measures collected during a profiling session with the
Use Profilingdebug feature. They are added to the AppInfo file under theperformanceproperty.I've attached a recording from web with additional debug logs to visualize what gets fired when we enable the profiler now.
Fixed Issues
$ #50652
PROPOSAL: N/A
Tests
open_report*entries.AppInfo<app version>.jsonfile. This should now include aperformanceproperty on it. It's an array of measures collected during the profiling session. They should reflect actions successfully collected with thePerformance.markStart/End()API.Offline tests
Same as the QA steps.
QA Steps
performanceproperty on it.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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
devtools.mp4
MacOS: Desktop