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

Dev/ci perf test search #14044

Merged
merged 4 commits into from
Jan 7, 2023
Merged

Conversation

hannojg
Copy link
Contributor

@hannojg hannojg commented Jan 6, 2023

Details

  • Adds test for the performance regression test suite for opening the search page
  • Corrects how the TTI gets measured for the search page (correct results will now be submitted to grafana)

Fixed Issues

#14103

Tests

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Doesn't apply as its only internal test code

@hannojg hannojg requested a review from a team as a code owner January 6, 2023 00:13
@melvin-bot melvin-bot bot requested review from stitesExpensify and removed request for a team January 6, 2023 00:14
@melvin-bot
Copy link

melvin-bot bot commented Jan 6, 2023

@stitesExpensify 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]

src/libs/E2E/tests/openSearchPageTest.e2e.js Outdated Show resolved Hide resolved
tests/e2e/config.js Outdated Show resolved Hide resolved
hannojg and others added 2 commits January 6, 2023 14:54
Co-authored-by: Andrew Gable <andrewgable@gmail.com>
@AndrewGable
Copy link
Contributor

AndrewGable commented Jan 7, 2023

Reviewer Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

N/A - No source code changes

@AndrewGable AndrewGable merged commit 78a8bad into Expensify:main Jan 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2023

Performance Comparison Report 📊

Significant Changes To Duration

Name Duration
TTI 796.714 ms → 694.741 ms (-101.973 ms, -12.8%) 🟢
Show details
Name Duration
TTI Baseline
Mean: 796.714 ms
Stdev: 41.266 ms (5.2%)
Runs: 732.4769919998944 734.6740070004016 737.8210710007697 737.9165390003473 747.4496260005981 762.1387499999255 764.9432730004191 767.6371759995818 770.4199340008199 770.4426109995693 772.7932420000434 776.5312399994582 779.8812220003456 789.290270999074 789.8424399998039 790.6631870009005 800.7264559995383 801.285204000771 811.382729999721 813.4621440004557 814.8554829992354 815.3808650001884 816.6511950008571 829.2457090001553 829.8550649993122 831.8608790002763 832.2011900004 833.8273850008845 858.2583659999073 890.8227319996804 893.3981330003589

Current
Mean: 694.741 ms
Stdev: 28.847 ms (4.2%)
Runs: 636.4045380000025 647.4226779993623 652.2632899992168 660.8056920003146 666.202500000596 673.8224010001868 673.9625410009176 676.151344999671 676.551346000284 677.6475479993969 677.9685469996184 681.4294119998813 685.413799000904 685.7237989995629 688.2039880007505 690.3075300008059 690.4036640003324 695.1944670006633 697.0730499997735 703.7807749994099 706.2958809994161 706.3883389998227 709.7483029998839 710.4306339994073 712.5621000006795 717.484797000885 718.3969219997525 722.0873809996992 735.6920999996364 741.8857979997993 752.149512000382 761.8513980004936

Meaningless Changes To Duration

Show entries
Name Duration
nativeLaunch 9.138 ms → 9.969 ms (+0.831 ms, +9.1%)
regularAppStart 0.015 ms → 0.016 ms (+0.001 ms, +6.2%)
runJsBundle 191.000 ms → 190.438 ms (-0.563 ms, ±0.0%)
Show details
Name Duration
nativeLaunch Baseline
Mean: 9.138 ms
Stdev: 0.860 ms (9.4%)
Runs: 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 11 11

Current
Mean: 9.969 ms
Stdev: 1.794 ms (18.0%)
Runs: 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 10 10 11 11 11 11 11 12 12 12 12 13 13 15
regularAppStart Baseline
Mean: 0.015 ms
Stdev: 0.001 ms (5.4%)
Runs: 0.013304999098181725 0.013305999338626862 0.013590000569820404 0.01371300034224987 0.013794001191854477 0.013833999633789062 0.013955999165773392 0.0139979999512434 0.014079000800848007 0.014159999787807465 0.014321999624371529 0.014364000409841537 0.014566998928785324 0.014607999473810196 0.01464799977838993 0.014688998460769653 0.014689000323414803 0.014810999855399132 0.014932999387383461 0.01505499891936779 0.01505500078201294 0.01521800085902214 0.015298999845981598 0.01534000039100647 0.015420999377965927 0.015421001240611076 0.015461999922990799 0.015544001013040543 0.015584999695420265 0.015706000849604607 0.015828000381588936 0.016560999676585197

Current
Mean: 0.016 ms
Stdev: 0.002 ms (10.7%)
Runs: 0.01342800073325634 0.0138349998742342 0.013916000723838806 0.014038000255823135 0.014079000800848007 0.014364000409841537 0.014567000791430473 0.01456800103187561 0.014607999473810196 0.014689000323414803 0.014689000323414803 0.014689000323414803 0.014730000868439674 0.01476999931037426 0.014770999550819397 0.01489199884235859 0.014932999387383461 0.014932999387383461 0.01493300125002861 0.015056001022458076 0.015461999922990799 0.015461999922990799 0.016112999990582466 0.016683001071214676 0.017211999744176865 0.017333999276161194 0.017780998721718788 0.01786300167441368 0.01794399879872799 0.019001999869942665 0.019042998552322388 0.019612999632954597
runJsBundle Baseline
Mean: 191.000 ms
Stdev: 18.572 ms (9.7%)
Runs: 158 162 164 165 166 168 172 179 181 181 182 183 183 184 185 190 190 193 195 202 204 204 204 205 207 208 210 212 213 213 216 233

Current
Mean: 190.438 ms
Stdev: 25.577 ms (13.4%)
Runs: 159 161 164 167 167 167 170 171 171 171 173 174 174 177 179 183 184 184 185 186 188 194 203 209 216 218 218 220 225 242 244 250

@OSBotify
Copy link
Contributor

OSBotify commented Jan 7, 2023

🚀 Deployed to staging by @AndrewGable in version: 1.2.50-12 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Jan 9, 2023

🚀 Deployed to production by @Julesssss in version: 1.2.50-14 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants