Skip to content

Conversation

@davibroc
Copy link
Contributor

@davibroc davibroc commented Apr 14, 2025

Description

This PR adds the following benchmark tests for Bridge to help catch performance issues introduced by new features.

  • Loading the Bridge page
  • Loading the asset-picker when there are more than 30 tokens available for a network
  • Searching for a token in the asset-picker

Gating for these tests has not been added yet. We plan to do this later after a system to gate test has been added to the framework

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. yarn && yarn build:test
  2. yarn tsx test/e2e/user-actions-benchmark.ts

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@davibroc davibroc requested a review from a team as a code owner April 14, 2025 21:52
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-qa QA team label Apr 14, 2025
@davibroc davibroc changed the title Added bridge user action benchmark test: Added bridge user action benchmark Apr 14, 2025
@metamaskbot
Copy link
Collaborator

metamaskbot commented Apr 14, 2025

✨ Files requiring CODEOWNER review ✨

🔄 @MetaMask/swaps-engineers

  • test/e2e/page-objects/pages/bridge/quote-page.ts
  • test/e2e/tests/bridge/bridge-test-utils.ts

@metamaskbot
Copy link
Collaborator

Builds ready [dd29654]
UI Startup Metrics (1240 ± 73 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1240109315367312641419
load107095612506810941232
domContentLoaded106392412436810861219
domInteractive19136591840
firstPaint733144123942110801209
backgroundConnect74334814
firstReactRender2216148142234
getState1253271627
initialActions001001
loadScripts82268499565848966
setupStore75142812
WebpackHomeuiStartup20731650246617421782318
load15781271207914116821781
domContentLoaded15681262187213216761777
domInteractive161158101346
firstPaint1798235055202320
backgroundConnect289333442458
firstReactRender20954501126342361
getState1033861221
initialActions315134
loadScripts15631261184913216741766
setupStore206291391828
FirefoxBrowserifyHomeuiStartup13431154196011314111543
load11961013178011012651341
domContentLoaded11961013177911012651341
domInteractive1073535144114194
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2012120122030
firstReactRender22193732227
getState10417624814
initialActions001001
loadScripts1177999176211112491324
setupStore6328469
WebpackHomeuiStartup15121338197412115851730
load12911119171010913611480
domContentLoaded12901119170910913601480
domInteractive84313133894151
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21158282233
firstReactRender35294943745
getState95437928
initialActions002111
loadScripts12721106169210913421460
setupStore85335823

@davibroc davibroc force-pushed the test/bridge-benchmark branch from a01d19a to 0f8072b Compare April 16, 2025 20:26
@davibroc davibroc force-pushed the test/bridge-benchmark branch from 0f8072b to f62b3b6 Compare April 17, 2025 15:58
@davibroc davibroc added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Apr 17, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [f62b3b6]
UI Startup Metrics (1213 ± 63 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1213110013876312471344
load105496012185910801173
domContentLoaded104895412135810741166
domInteractive1813103111628
firstPaint717132122640610611163
backgroundConnect7414179
firstReactRender22165572239
getState1243271827
initialActions001001
loadScripts81071996158833927
setupStore85193713
WebpackHomeuiStartup21941753276515822932417
load16921365216412617851868
domContentLoaded16851361213812517781864
domInteractive171163111446
firstPaint1836559779242304
backgroundConnect309373373065
firstReactRender22656421120344365
getState154209211633
initialActions318145
loadScripts16801360211412517741863
setupStore206183182333
FirefoxBrowserifyHomeuiStartup14141218182411714671692
load12531071165811313171486
domContentLoaded12521071165811313161486
domInteractive1073725532120156
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2514147172563
firstReactRender23195942428
getState84385824
initialActions001001
loadScripts12291057163211412981469
setupStore8416616610
WebpackHomeuiStartup15111325186311815811766
load1294112715849913551489
domContentLoaded1293112615839913551489
domInteractive83532542788137
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect23164972344
firstReactRender35295143744
getState94305923
initialActions006111
loadScripts12741111156310013351473
setupStore95526819
Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

@davibroc davibroc enabled auto-merge April 17, 2025 17:16
@davibroc davibroc added this pull request to the merge queue Apr 17, 2025
Merged via the queue into main with commit 2c1abb7 Apr 17, 2025
176 of 177 checks passed
@davibroc davibroc deleted the test/bridge-benchmark branch April 17, 2025 19:15
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants