Skip to content

fix: simulation metrics performance#23992

Merged
matthewwalsh0 merged 1 commit intodevelopfrom
fix/simulation-metrics-performance
Apr 12, 2024
Merged

fix: simulation metrics performance#23992
matthewwalsh0 merged 1 commit intodevelopfrom
fix/simulation-metrics-performance

Conversation

@matthewwalsh0
Copy link
Copy Markdown
Member

@matthewwalsh0 matthewwalsh0 commented Apr 12, 2024

Description

The simulation metrics provided via the useSimulationMetrics hook were causing excessive calls to updateTransactionEventFragment.

This was due to the dependencies of updateTransactionEventFragment being very broad, meaning the function reference was changing very frequently.

Open in GitHub Codespaces

Related issues

Manual testing steps

  1. High level regression of simulation component.
  2. Login to metrics debugger on Segment website.
  3. Create transaction in extension.
  4. Reject transaction.
  5. Verify simulation metrics are in Transaction Rejected event.

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

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.

@matthewwalsh0 matthewwalsh0 added the team-confirmations-system-deprecated DEPRECATED: please use "team-confirmations" instead label Apr 12, 2024
@matthewwalsh0 matthewwalsh0 requested review from a team as code owners April 12, 2024 12:39
@sleepytanya
Copy link
Copy Markdown
Contributor

The regression testing has been successfully completed. The simulation metrics are accurately reflected within the Segment metrics debugger.

Screenshot 2024-04-12 at 9 37 17 AM

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 12, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 67.54%. Comparing base (d15cc54) to head (843f50b).

Files Patch % Lines
...confirmations/hooks/useTransactionEventFragment.js 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #23992   +/-   ##
========================================
  Coverage    67.54%   67.54%           
========================================
  Files         1245     1245           
  Lines        48864    48866    +2     
  Branches     12744    12744           
========================================
+ Hits         33003    33005    +2     
  Misses       15861    15861           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [843f50b]
Page Load Metrics (1178 ± 645 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7642717710349
domContentLoaded1591352311
load54332611781342645
domInteractive1591352311
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 15 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@matthewwalsh0 matthewwalsh0 merged commit 1098a10 into develop Apr 12, 2024
@matthewwalsh0 matthewwalsh0 deleted the fix/simulation-metrics-performance branch April 12, 2024 14:06
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2024
@metamaskbot metamaskbot added the release-11.15.0 Issue or pull request that will be included in release 11.15.0 label Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.15.0 Issue or pull request that will be included in release 11.15.0 team-confirmations-system-deprecated DEPRECATED: please use "team-confirmations" instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants