Skip to content

perf(quality-gates): Add tbt metrics to global startup and flow timer gates#41963

Draft
MajorLift wants to merge 10 commits into
mainfrom
jongsun/perf/quality-gates/260420-tbt-thresholds
Draft

perf(quality-gates): Add tbt metrics to global startup and flow timer gates#41963
MajorLift wants to merge 10 commits into
mainfrom
jongsun/perf/quality-gates/260420-tbt-thresholds

Conversation

@MajorLift
Copy link
Copy Markdown
Contributor

@MajorLift MajorLift commented Apr 20, 2026

Description

Adds tbt (Total Blocking Time) quality gate for all startup and user-journey benchmark presets by adding corresponding threshold entries to THRESHOLD_REGISTRY.

This commit builds on #39715 which shipped TBT instrumentation via buildLongTaskTimerResults in long-task-helper.ts, which emits { id: 'tbt', value, unit: 'ms' } per benchmark run. W

Baselines were pulled from the CI benchmark Sentry project (metamask-performance) using the 2026-04-07 → 2026-04-20 window (ci.branch:main), querying avg(tags[benchmark.p75.tbt]) / avg(tags[benchmark.p95.tbt]) for startup presets and avg(tags[performance.p75.tbt]) / avg(tags[performance.p95.tbt]) for user-journey presets.

Calibration rule: warn = observed_p × 1.20, fail = observed_p × 1.30, ciMultiplier: 1.5.

Preset Baseline p75 Baseline p95 warn p75 fail p75 warn p95 fail p95
startupStandardHome 313 ms 351 ms 375 425 425 475
startupPowerUserHome 1189 ms 1367 ms 1425 1550 1650 1775
onboardingImportWallet 485 ms 559 ms 575 625 675 725
onboardingNewWallet 326 ms 377 ms 400 425 450 500
importSrpHome 3354 ms 3552 ms 4000 4350 4250 4625
swap 438 ms 483 ms 525 575 575 625
sendTransactions 151 ms 151 ms 200 225 200 225
assetDetails 95 ms 127 ms 125 150 150 175
solanaAssetDetails ~1 ms ~1 ms 50 75 75 100

solanaAssetDetails observed near-zero TBT — a 50 ms floor was applied to avoid noise-triggered false positives.

dappPageLoad is excluded: the dapp-page-load flow does not call buildLongTaskTimerResults, so no TBT data exists in Sentry for that preset.

Interaction benchmarks (confirmTx, loadNewAccount, bridgeUserActions) are also excluded — single-step flows where TBT is dominated by one outlier long-task.

No logic changes. compare-benchmarks.ts reads THRESHOLD_REGISTRY generically; adding the tbt key is sufficient to activate enforcement.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/7194

Manual testing steps

  1. Run the existing Jest suite: yarn jest development/metamaskbot-build-announce/compare-benchmarks.test.ts
  2. Confirm all existing assertions pass and that tbt violations route through the same warn/fail path as other metrics
  3. Optionally feed a recent benchmark JSON artifact through compare-benchmarks.ts locally and confirm tbt is evaluated for startup/journey presets

Screenshots/Recordings

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.

Note

Medium Risk
Changes CI performance quality gates by introducing new tbt (Total Blocking Time) thresholds across multiple benchmark presets, which could cause new CI failures or flaky gating if baselines/multipliers are miscalibrated. No production/runtime logic is modified.

Overview
Adds tbt (Total Blocking Time) to the benchmark threshold registry for startup and multi-step user-journey presets by introducing per-preset p75/p95 warn/fail limits (with baseline comments) in test/e2e/benchmarks/utils/thresholds.ts.

These new thresholds activate TBT enforcement for onboarding/import, swap/send, asset-details, and startup home benchmarks (using the default CI multiplier), while leaving interaction-only and dapp-page-load presets unchanged.

Reviewed by Cursor Bugbot for commit 707f906. Bugbot is set up for automated code reviews on this repo. Configure here.

Calibrated from 14-day Sentry baseline (ci.branch:main, 2026-04-07–2026-04-20):

| preset               | p75 obs | p95 obs |
|----------------------|---------|---------|
| startupStandardHome  |  313 ms |  351 ms |
| startupPowerUserHome | 1189 ms | 1367 ms |
| onboardingImport     |  485 ms |  559 ms |
| onboardingNew        |  326 ms |  377 ms |
| importSrpHome        | 3354 ms | 3552 ms |
| swap                 |  438 ms |  483 ms |
| sendTransactions     |  151 ms |  151 ms |
| assetDetails         |   95 ms |  127 ms |
| solanaAssetDetails   |    ~1ms |    ~1ms |

Thresholds: warn = p×1.2, fail = p×1.3, ciMultiplier = 1.5.
solanaAssetDetails uses a 50/75/100ms floor (near-zero baseline).
dappPageLoad excluded — flow does not call buildLongTaskTimerResults.

Closes MetaMask/MetaMask-planning#7194
@MajorLift MajorLift self-assigned this Apr 20, 2026
@MajorLift MajorLift added the team-extension-platform Extension Platform team label Apr 20, 2026
@github-actions
Copy link
Copy Markdown
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.

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 21, 2026

Builds ready [88d36eb] [reused from 1b1b67a]
⚡ Performance Benchmarks (Total: 🟢 1 pass · 🟡 1 warn · 🔴 0 fail)

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24740516050 | Baseline logs

Interaction Benchmarks · Samples: 5

⚠️ Missing data: chrome/browserify/interactionUserActions

✅ No regressions detected

Startup Benchmarks · Samples: 100

⚠️ Missing data: chrome/browserify/startupStandardHome, chrome/browserify/startupPowerUserHome, chrome/webpack/startupStandardHome, chrome/webpack/startupPowerUserHome, firefox/browserify/startupStandardHome, firefox/browserify/startupPowerUserHome, firefox/webpack/startupStandardHome, firefox/webpack/startupPowerUserHome

✅ No regressions detected

User Journey Benchmarks · Samples: 5 · mock API

⚠️ Missing data: chrome/browserify/userJourneyAssets, chrome/browserify/userJourneyAccountManagement, chrome/browserify/userJourneyTransactions

Benchmarkchrome-browserify
onboardingImportWallet🟡 [Show logs]
onboardingNewWallet🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: -86%
  • onboardingImportWallet/confirmSrpToPwForm: -10%
  • onboardingImportWallet/metricsToWalletReadyScreen: -28%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: -18%
  • onboardingNewWallet/srpButtonToPwForm: -81%
  • onboardingNewWallet/createPwToRecoveryScreen: -21%
  • onboardingNewWallet/skipBackupToMetricsScreen: -71%
  • onboardingNewWallet/doneButtonToAssetList: -40%
  • onboardingNewWallet/total: -39%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 onboardingImportWallet/FCP: p75 2.1s
Dapp Page Load Benchmarks · Samples: 100

⚠️ Missing data: chrome/browserify/pageLoadBenchmark

✅ No regressions detected

Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

@MajorLift MajorLift marked this pull request as ready for review April 21, 2026 19:49
@github-project-automation github-project-automation Bot moved this to Needs dev review in PR review queue Apr 21, 2026
Comment thread test/e2e/benchmarks/utils/thresholds.ts
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 22, 2026

Builds ready [cd85d26] [reused from 9594df6]
⚡ Performance Benchmarks (Total: 🟢 4 pass · 🟡 7 warn · 🔴 2 fail)

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24795301305 | Baseline logs

Metricschrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🔴 [logs]🟢 [logs]🟢 [logs]🟢 [logs]
importSrpHome🔴 homeAfterImportWithNewWallet(p95) [logs]

Regressions (🔴 2 failures)

  • startupStandardHome · chrome-browserify — tbt(p95) [Show logs]
  • importSrpHome · chrome-browserify — tbt(p75) [Show logs]
Interaction Benchmarks · Samples: 5
Benchmarkchrome-browserify
loadNewAccount🟡 [Show logs]
confirmTx🟡 [Show logs]
bridgeUserActions🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: -69%
  • loadNewAccount/total: -69%
  • bridgeUserActions/bridge_load_page: -17%
  • bridgeUserActions/bridge_load_asset_picker: -34%
  • bridgeUserActions/bridge_search_token: -27%
  • bridgeUserActions/total: -26%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 2.6s
  • 🟡 confirmTx/FCP: p75 2.6s
  • 🟡 confirmTx/LCP: p75 2.5s
  • 🟡 bridgeUserActions/FCP: p75 2.5s
Startup Benchmarks · Samples: 100 🔴 1
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🔴 [Show logs] · 🔴 tbt🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/uiStartup: -18%
  • startupStandardHome/domInteractive: +14%
  • startupStandardHome/backgroundConnect: +19%
  • startupStandardHome/firstReactRender: +12%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -13%
  • startupStandardHome/setupStore: +14%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -22%
  • startupStandardHome/load: -18%
  • startupStandardHome/domContentLoaded: -18%
  • startupStandardHome/firstPaint: -31%
  • startupStandardHome/backgroundConnect: -37%
  • startupStandardHome/firstReactRender: -23%
  • startupStandardHome/loadScripts: -18%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/domInteractive: -28%
  • startupStandardHome/backgroundConnect: +13%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/numNetworkReqs: -32%
  • startupStandardHome/uiStartup: -18%
  • startupStandardHome/load: -11%
  • startupStandardHome/domContentLoaded: -11%
  • startupStandardHome/domInteractive: -61%
  • startupStandardHome/initialActions: -43%
  • startupStandardHome/loadScripts: -11%
  • startupStandardHome/setupStore: -60%
  • startupStandardHome/numNetworkReqs: -34%
User Journey Benchmarks · Samples: 5 · mock API 🔴 1

⚠️ Missing data: chrome/browserify/userJourneyTransactions

Benchmarkchrome-browserify
onboardingImportWallet🟡 [Show logs]
onboardingNewWallet🟡 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🔴 [Show logs] · 🔴 tbt · 🟡 cls

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: -84%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: -19%
  • onboardingNewWallet/srpButtonToPwForm: -79%
  • onboardingNewWallet/skipBackupToMetricsScreen: -62%
  • onboardingNewWallet/doneButtonToAssetList: +24%
  • onboardingNewWallet/total: +13%
  • assetDetails/assetClickToPriceChart: -83%
  • assetDetails/total: -83%
  • solanaAssetDetails/assetClickToPriceChart: -72%
  • solanaAssetDetails/total: -72%
  • importSrpHome/loginToHomeScreen: -27%
  • importSrpHome/openAccountMenuAfterLogin: -69%
  • importSrpHome/homeAfterImportWithNewWallet: +61%
  • importSrpHome/total: +56%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 onboardingImportWallet/FCP: p75 2.2s
  • 🟡 onboardingNewWallet/INP: p75 232ms
  • 🟡 onboardingNewWallet/FCP: p75 2.0s
  • 🟡 assetDetails/INP: p75 328ms
  • 🟡 assetDetails/FCP: p75 2.4s
  • 🟡 solanaAssetDetails/FCP: p75 2.4s
  • 🟡 importSrpHome/INP: p75 288ms
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 importSrpHome/CLS: p75 0.104
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]
Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 22, 2026

Builds ready [b1f6aee]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 8 warn · 🔴 1 fail)

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24800904308 | Baseline logs

Metricschrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🔴 [logs]🟢 [logs]🟢 [logs]🟢 [logs]

Regressions (🔴 1 failure)

  • startupStandardHome · chrome-browserify — tbt(p95) [Show logs]
Interaction Benchmarks · Samples: 5
Benchmarkchrome-browserify
loadNewAccount🟡 [Show logs]
confirmTx🟡 [Show logs]
bridgeUserActions🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: -52%
  • loadNewAccount/total: -52%
  • bridgeUserActions/bridge_load_page: -27%
  • bridgeUserActions/bridge_load_asset_picker: -53%
  • bridgeUserActions/bridge_search_token: -22%
  • bridgeUserActions/total: -31%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 2.5s
  • 🟡 confirmTx/FCP: p75 2.5s
  • 🟡 bridgeUserActions/FCP: p75 2.5s
Startup Benchmarks · Samples: 100 🔴 1
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🔴 [Show logs] · 🔴 tbt🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/uiStartup: -20%
  • startupStandardHome/domContentLoaded: -10%
  • startupStandardHome/backgroundConnect: +23%
  • startupStandardHome/firstReactRender: -10%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -23%
  • startupStandardHome/load: -18%
  • startupStandardHome/domContentLoaded: -18%
  • startupStandardHome/backgroundConnect: -42%
  • startupStandardHome/firstReactRender: -23%
  • startupStandardHome/loadScripts: -18%
  • startupStandardHome/setupStore: -13%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/uiStartup: -10%
  • startupStandardHome/domInteractive: -58%
  • startupStandardHome/backgroundConnect: +11%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/numNetworkReqs: -34%
  • startupStandardHome/uiStartup: -12%
  • startupStandardHome/domInteractive: -41%
  • startupStandardHome/initialActions: +14%
  • startupStandardHome/setupStore: -57%
  • startupStandardHome/numNetworkReqs: -34%
User Journey Benchmarks · Samples: 5 · mock API
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🟡 [Show logs]
sendTransactions🟡 [Show logs]
swap🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: -84%
  • onboardingImportWallet/metricsToWalletReadyScreen: -38%
  • onboardingImportWallet/doneButtonToHomeScreen: -77%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +18%
  • onboardingImportWallet/total: -46%
  • onboardingNewWallet/srpButtonToPwForm: -79%
  • onboardingNewWallet/skipBackupToMetricsScreen: -68%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -21%
  • onboardingNewWallet/doneButtonToAssetList: -24%
  • onboardingNewWallet/total: -26%
  • assetDetails/assetClickToPriceChart: -41%
  • assetDetails/total: -41%
  • solanaAssetDetails/assetClickToPriceChart: -70%
  • solanaAssetDetails/total: -70%
  • importSrpHome/loginToHomeScreen: -14%
  • importSrpHome/openAccountMenuAfterLogin: -58%
  • importSrpHome/homeAfterImportWithNewWallet: -67%
  • importSrpHome/total: -60%
  • sendTransactions/openSendPageFromHome: -15%
  • sendTransactions/selectTokenToSendFormLoaded: -26%
  • sendTransactions/reviewTransactionToConfirmationPage: +35%
  • sendTransactions/total: +32%
  • swap/openSwapPageFromHome: -97%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +11%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 assetDetails/FCP: p75 2.8s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/FCP: p75 2.4s
  • 🟡 swap/FCP: p75 2.4s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]
Bundle size diffs
  • background: 7 Bytes (0%)
  • ui: 617 Bytes (0.01%)
  • common: 20 Bytes (0%)

Comment thread test/e2e/benchmarks/utils/thresholds.ts
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 22, 2026

Builds ready [f1965d7]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24802413889 | Baseline logs

Interaction Benchmarks · Samples: 5
Benchmarkchrome-browserify
loadNewAccount🟡 [Show logs]
confirmTx🟡 [Show logs]
bridgeUserActions🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: -67%
  • loadNewAccount/total: -67%
  • bridgeUserActions/bridge_load_page: -16%
  • bridgeUserActions/bridge_load_asset_picker: -35%
  • bridgeUserActions/bridge_search_token: -22%
  • bridgeUserActions/total: -28%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 2.8s
  • 🟡 confirmTx/FCP: p75 2.6s
  • 🟡 bridgeUserActions/FCP: p75 2.6s
Startup Benchmarks · Samples: 100
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/uiStartup: -26%
  • startupStandardHome/load: -15%
  • startupStandardHome/domContentLoaded: -17%
  • startupStandardHome/firstPaint: -44%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -21%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -21%
  • startupStandardHome/load: -16%
  • startupStandardHome/domContentLoaded: -15%
  • startupStandardHome/firstPaint: -43%
  • startupStandardHome/backgroundConnect: -35%
  • startupStandardHome/firstReactRender: -27%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/setupStore: -13%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/uiStartup: -12%
  • startupStandardHome/domInteractive: -42%
  • startupStandardHome/initialActions: +33%
  • startupStandardHome/numNetworkReqs: -34%
  • startupStandardHome/uiStartup: -16%
  • startupStandardHome/domInteractive: -65%
  • startupStandardHome/initialActions: +14%
  • startupStandardHome/setupStore: -60%
  • startupStandardHome/numNetworkReqs: -34%
User Journey Benchmarks · Samples: 5 · mock API
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🟡 [Show logs]
sendTransactions🟡 [Show logs]
swap🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: -84%
  • onboardingImportWallet/pwFormToMetricsScreen: +63%
  • onboardingImportWallet/metricsToWalletReadyScreen: -46%
  • onboardingImportWallet/doneButtonToHomeScreen: -73%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +19%
  • onboardingImportWallet/total: -44%
  • onboardingNewWallet/srpButtonToPwForm: -77%
  • onboardingNewWallet/skipBackupToMetricsScreen: -63%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -19%
  • onboardingNewWallet/doneButtonToAssetList: -30%
  • onboardingNewWallet/total: -30%
  • assetDetails/assetClickToPriceChart: -75%
  • assetDetails/total: -75%
  • solanaAssetDetails/assetClickToPriceChart: -72%
  • solanaAssetDetails/total: -72%
  • importSrpHome/loginToHomeScreen: -19%
  • importSrpHome/openAccountMenuAfterLogin: -70%
  • importSrpHome/homeAfterImportWithNewWallet: -69%
  • importSrpHome/total: -63%
  • sendTransactions/openSendPageFromHome: +95%
  • sendTransactions/selectTokenToSendFormLoaded: -25%
  • sendTransactions/reviewTransactionToConfirmationPage: +35%
  • sendTransactions/total: +33%
  • swap/openSwapPageFromHome: -97%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +11%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.6s
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/FCP: p75 2.5s
  • 🟡 swap/FCP: p75 2.6s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]
Bundle size diffs
  • background: 7 Bytes (0%)
  • ui: 617 Bytes (0.01%)
  • common: 20 Bytes (0%)

@MajorLift MajorLift force-pushed the jongsun/perf/quality-gates/260420-tbt-thresholds branch from a9e976b to f1965d7 Compare April 23, 2026 01:03
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 23, 2026

Builds ready [f1965d7]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24810888983 | Baseline logs

Interaction Benchmarks · Samples: 5
Benchmarkchrome-browserify
loadNewAccount🟡 [Show logs]
confirmTx🟡 [Show logs]
bridgeUserActions🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: -73%
  • loadNewAccount/total: -73%
  • bridgeUserActions/bridge_load_page: -27%
  • bridgeUserActions/bridge_load_asset_picker: -42%
  • bridgeUserActions/bridge_search_token: -19%
  • bridgeUserActions/total: -29%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 2.6s
  • 🟡 confirmTx/FCP: p75 2.4s
  • 🟡 bridgeUserActions/FCP: p75 2.4s
Startup Benchmarks · Samples: 100
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/uiStartup: -38%
  • startupStandardHome/load: -29%
  • startupStandardHome/domContentLoaded: -30%
  • startupStandardHome/domInteractive: -19%
  • startupStandardHome/firstPaint: -15%
  • startupStandardHome/backgroundConnect: -10%
  • startupStandardHome/firstReactRender: -36%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -34%
  • startupStandardHome/setupStore: -17%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -17%
  • startupStandardHome/load: -12%
  • startupStandardHome/domContentLoaded: -11%
  • startupStandardHome/domInteractive: +21%
  • startupStandardHome/backgroundConnect: -34%
  • startupStandardHome/firstReactRender: -19%
  • startupStandardHome/loadScripts: -12%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/uiStartup: -13%
  • startupStandardHome/domInteractive: -60%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/numNetworkReqs: -34%
  • startupStandardHome/uiStartup: -10%
  • startupStandardHome/domInteractive: -39%
  • startupStandardHome/initialActions: +14%
  • startupStandardHome/setupStore: -60%
  • startupStandardHome/numNetworkReqs: -34%
User Journey Benchmarks · Samples: 5 · mock API
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🟡 [Show logs]
sendTransactions🟡 [Show logs]
swap🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: -85%
  • onboardingImportWallet/confirmSrpToPwForm: -10%
  • onboardingImportWallet/metricsToWalletReadyScreen: -42%
  • onboardingImportWallet/doneButtonToHomeScreen: -77%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +18%
  • onboardingImportWallet/total: -43%
  • onboardingNewWallet/srpButtonToPwForm: -76%
  • onboardingNewWallet/skipBackupToMetricsScreen: -66%
  • onboardingNewWallet/doneButtonToAssetList: -27%
  • onboardingNewWallet/total: -27%
  • assetDetails/assetClickToPriceChart: -44%
  • assetDetails/total: -44%
  • solanaAssetDetails/assetClickToPriceChart: -72%
  • solanaAssetDetails/total: -72%
  • importSrpHome/loginToHomeScreen: -13%
  • importSrpHome/openAccountMenuAfterLogin: -86%
  • importSrpHome/homeAfterImportWithNewWallet: -68%
  • importSrpHome/total: -61%
  • sendTransactions/selectTokenToSendFormLoaded: -18%
  • sendTransactions/reviewTransactionToConfirmationPage: +34%
  • sendTransactions/total: +33%
  • swap/openSwapPageFromHome: -96%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +11%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/FCP: p75 2.4s
  • 🟡 sendTransactions/FCP: p75 2.5s
  • 🟡 sendTransactions/LCP: p75 2.5s
  • 🟡 swap/FCP: p75 2.5s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]
Bundle size diffs
  • background: 7 Bytes (0%)
  • ui: 617 Bytes (0.01%)
  • common: 20 Bytes (0%)

@sonarqubecloud
Copy link
Copy Markdown

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 27, 2026

Builds ready [36d90a6]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 25012019336 | Baseline logs

Interaction Benchmarks · Samples: 5
Benchmarkchrome-browserify
loadNewAccount
[Sentry log · main/release]
🟡 [CI log]
confirmTx
[Sentry log · main/release]
🟡 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: -54%
  • loadNewAccount/total: -54%
  • bridgeUserActions/bridge_load_page: -13%
  • bridgeUserActions/bridge_load_asset_picker: -29%
  • bridgeUserActions/bridge_search_token: -26%
  • bridgeUserActions/total: -25%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 2.5s
  • 🟡 confirmTx/FCP: p75 2.5s
  • 🟡 bridgeUserActions/FCP: p75 2.6s
Startup Benchmarks · Samples: 100
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/uiStartup: -21%
  • startupStandardHome/domContentLoaded: -11%
  • startupStandardHome/domInteractive: +16%
  • startupStandardHome/backgroundConnect: +15%
  • startupStandardHome/firstReactRender: -10%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -21%
  • startupStandardHome/load: -16%
  • startupStandardHome/domContentLoaded: -16%
  • startupStandardHome/backgroundConnect: -38%
  • startupStandardHome/firstReactRender: -23%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/uiStartup: -15%
  • startupStandardHome/domInteractive: -63%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/setupStore: -17%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -12%
  • startupStandardHome/domInteractive: -25%
  • startupStandardHome/initialActions: +14%
  • startupStandardHome/setupStore: -64%
  • startupStandardHome/numNetworkReqs: -37%
User Journey Benchmarks · Samples: 5 · mock API

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: -82%
  • onboardingImportWallet/metricsToWalletReadyScreen: -34%
  • onboardingImportWallet/doneButtonToHomeScreen: -75%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +27%
  • onboardingImportWallet/total: -42%
  • onboardingNewWallet/srpButtonToPwForm: -77%
  • onboardingNewWallet/skipBackupToMetricsScreen: -67%
  • onboardingNewWallet/doneButtonToAssetList: -34%
  • onboardingNewWallet/total: -34%
  • assetDetails/assetClickToPriceChart: -23%
  • assetDetails/total: -23%
  • solanaAssetDetails/assetClickToPriceChart: -69%
  • solanaAssetDetails/total: -69%
  • importSrpHome/openAccountMenuAfterLogin: -87%
  • importSrpHome/homeAfterImportWithNewWallet: -67%
  • importSrpHome/total: -60%
  • sendTransactions/openSendPageFromHome: -32%
  • sendTransactions/selectTokenToSendFormLoaded: -20%
  • sendTransactions/reviewTransactionToConfirmationPage: +35%
  • sendTransactions/total: +33%
  • swap/openSwapPageFromHome: -97%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +11%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/INP: p75 224ms
  • 🟡 sendTransactions/FCP: p75 2.7s
  • 🟡 sendTransactions/LCP: p75 2.6s
  • 🟡 swap/FCP: p75 2.6s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -533.55 KiB (-8.93%)
  • ui: 33.01 KiB (0.39%)
  • common: -471.91 KiB (-3.58%)

@MajorLift MajorLift requested review from a team as code owners May 18, 2026 15:21
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented May 18, 2026

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/extension-platform (1 files, +54 -0)
  • 📁 test/
    • 📁 e2e/
      • 📁 benchmarks/
        • 📁 utils/
          • 📄 thresholds.ts +54 -0

🧪 @MetaMask/qa (1 files, +54 -0)
  • 📁 test/
    • 📁 e2e/
      • 📁 benchmarks/
        • 📁 utils/
          • 📄 thresholds.ts +54 -0

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 707f906. Configure here.

p75: { warn: 1020, fail: 1100 },
p95: { warn: 1225, fail: 1325 },
ciMultiplier: DEFAULT_CI_MULTIPLIER,
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

STANDARD_HOME TBT thresholds ~2.7x higher than documented

Medium Severity

The STANDARD_HOME tbt baseline comment says p75≈850ms / p95≈1021ms (from 2026-04-22, chrome-browserify), producing thresholds of warn=1020/fail=1100. But the PR description table documents a p75=313ms baseline with thresholds of warn=375/fail=425 — about 2.7x tighter. All other presets match their documented baselines. This discrepancy means the quality gate for startupStandardHome TBT is far more permissive than intended, potentially masking regressions.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 707f906. Configure here.

@MajorLift MajorLift added skip-e2e Skip E2E test jobs force-builds labels May 18, 2026
@MajorLift MajorLift marked this pull request as draft May 18, 2026 15:36
@MajorLift MajorLift removed the status in PR review queue May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

force-builds size-S skip-e2e Skip E2E test jobs team-extension-platform Extension Platform team

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant