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

Add performance measurement to Cart AJAX #3719

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

haeky
Copy link

@haeky haeky commented Feb 6, 2025

PR Summary:

Start capturing RUM around cart interaction to express the buyers' experience when going through Dawn. These metrics will be extracted by perf-kit and emitted to our data pipeline.

What approach did you take?

Adding a Performance to be used in different cart operations.

  • Performance.measureFromEvent: Measure against a starting event. This is useful when we need to measure the end of an asynchronous event.
  • Performance.measure: Measure the time elapsed in a callback.

Testing steps/scenarios

Using the demo store, add an item to the store. Afterward, using the console, type performance.getEntriesByType("measure"); and you should see performance measurement. Here's the other different scenario to test:

  • Changing the quantity
  • Removing a line
  • Changing a note

Demo links

Checklist

Copy link
Contributor

@ludoboludo ludoboludo left a comment

Choose a reason for hiding this comment

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

Looks good, just gotta revert the change for the settings_data.json

@@ -168,7 +168,7 @@
"currency_code_enabled": true,
"cart_type": "notification",
"show_vendor": false,
"show_cart_note": false,
"show_cart_note": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be changed to true but kept as it's default was 👍

@haeky haeky force-pushed the performance-measurement branch from 7bcf90b to 5be4190 Compare February 7, 2025 15:17
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.

2 participants