-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[NoQA] e2e: new common metrics (FPS, CPU, RAM) #43482
Conversation
507a0c3
to
53b6269
Compare
One quick note: I see that all units are in ms. I think we should fix that, so the units can be different. |
Yeah, I also noticed that, but decided that it will bring a lot of changes in a single PR, so probably it would be good to handle as a separate task 👀 I think main units will be:
|
How often did you ran the tests from the screenshot? We should run a full test run (I think these are 30x?) on a real device. We need to check if the values we get are stable. |
@hannojg it was captured on debug build with dev config (x8 runs) on emulator. Below I attached a screenshot from a real device (my Pixel 7 Pro), 60x runs, release variant: Metrics are very stable as you can see 👀 I'll update a description with a new screenshot 👍 |
@alitoshmatov 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] |
@hannojg @mountiny @alitoshmatov this one is ready for review 🙌 Feel free to have a look 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good, just a few things to think about twice 😊
const ram = processRamOutput(ramStr, this.getRAMPageSize()); | ||
- const { frameTimes, interval: atraceInterval } = frameTimeParser.getFrameTimes(atrace, pid); | ||
+ | ||
+ let output; | ||
+ try { | ||
+ output = frameTimeParser.getFrameTimes(atrace, pid); | ||
+ } catch (e) { | ||
+ console.error(e); | ||
+ } | ||
+ | ||
+ if (!output) { | ||
+ return; | ||
+ } | ||
+ | ||
+ const { frameTimes, interval: atraceInterval } = output; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this patch, or was that just for your debugging?
If we need it, we need an upstream issue + PR please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hannojg I already created it bamlab/flashlight#291 but haven't received any comments yet 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah awesome - I think we should add this to the PR description !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hannojg done 😊
MAIN_APP_PACKAGE: packageName, | ||
DELTA_APP_PACKAGE: packageName, | ||
BRANCH_MAIN: 'main', | ||
BRANCH_DELTA: 'main', | ||
MAIN_APP_PATH: appPath, | ||
DELTA_APP_PATH: appPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hannojg yes. When we submit test result, then we specify branch
and then we use the name of the branch to store the result.
Flashlight
is running on the server, so we have to distinguish different builds (that's why I added BRANCH_MAIN
/BRANCH_DELTA
).
For dev
config we run the same debug build (always main
). That's why we specify main
in both cases 🙂
export * from "./utils/sanitizeProcessName"; | ||
export * from "./utils/round"; | ||
export * from "./reporting/cpu"; | ||
+export * from "./reporting/ram"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For that I created PR to upstream: bamlab/flashlight#294
8475499
to
043e362
Compare
Also added separate metrics for JS and UI thread. So now we track next metrics:
|
@alitoshmatov @mountiny this PR is ready for review 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think we need C+ review here. @hayata-suenaga do you want to review and add the checklist?
|
||
let measures: Measure[] = []; | ||
let polling = { | ||
stop: (): void => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will this version of the method callled?
I can see that the pulling
is assigned a value inside start
, but will the stop
method change to this original definition when the profiler is stopped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I added missing code in 7b1994b 🙌
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
Just one question, but other than that, the code looks good to me! |
7202a82
to
eeaa464
Compare
I think this is ready for another look @hayata-suenaga |
@hayata-suenaga just a friendly reminder 😊 |
sorry I have been on and off with travel sickness. I'm reviewing this now 🙇 |
@hayata-suenaga okay, sure 🙌 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the change looks good to me 🟢 sorry for the late review 🙇
✋ 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 production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
Details
Capture CPU, FPS and RAM for all tests.
Dev run (debug build, emulator, 8x runs):
Release run (release build, real device, 60x runs):
I also had to patch the new library - I opened the issue with all details bamlab/flashlight#291 (basically it was reproducible only on emulator, but I decided to keep the patch anyway because it improves the stability and maybe someone as me sometimes is running e2e tests on emulator too).
For second patch I created a PR to upstream: bamlab/flashlight#294
Fixed Issues
$ #19596
PROPOSAL: #19596 (comment)
Tests
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop