Skip to content

How We Measure Performance

Andy Terranova edited this page Sep 24, 2019 · 3 revisions

Overview

This document identifies a set of primary application metrics for the Venia reference PWA storefront and the methodology used to collect them.

The Primary Metrics

How to Measure

Production Artifact

The public demo site for the Venia reference PWA storefront is located at https://venia.magento.com.

📝 Currently we only measure the home page. Soon we will add additional pages such as Category, PDP and additional flows such as Checkout.

Lighthouse

A Lighthouse Audit provides measurements for the following primary metrics:

  • First Contentful Paint
  • First Meaningful Paint
  • Speed Index
  • First CPU Idle
  • Time to Interactive
  • Max Potential First Input Delay

How to run a Lighthouse Audit

  1. Navigate to https://venia.magento.com
  2. Open the Chrome Developer Tools
  3. Open the Audits tab
  4. Select the following options:
Option Value
Device Mobile
Audits All of them
Throttling Simulated Slow 4G, 4x CPU Slowdown
Clear Storage Yes
  1. Run the audit
Audit Results

The metrics are reported like so:

Screen Shot 2019-09-19 at 9 38 13 AM

WebPageTest

A WebPageTest audit provides measurements for the following primary metrics:

  • Time to First Byte

How to run a WebPageTest Audit

  1. Navigate to https://www.webpagetest.org/
  2. Select the following options:
Option Value
Website URL https://venia.magento.com
Test Location Moto G (gen 4)
Browser Moto G4 - Chrome
  1. Click Start Test
Audit Results

The metrics are reported like so:

Screen Shot 2019-09-18 at 9 44 10 AM

Development

We could profile our React application and its components in production but best practices are to perform this profiling in development to better highlight areas for improvement.

Here are the official React docs.

There aren't any associated primary metrics with a React Performance Profile, but it does help us identify where our rendering bottlenecks are.

We follow this tutorial to identify potentially troublesome components.