Web Performance Regression Detection (Part 1 of 3)
Michelle Vu | Web Performance Engineer
Michelle Vu | Web性能工程师
Detecting, preventing, and resolving performance regressions has been a standard at Pinterest for many years. Over the years, we have seen many examples showing significant business metric movements resulting from performance optimizations and regressions. These concrete examples motivate us to optimize and maintain performance. In particular, fighting regressions was made a priority because we’ve seen countless times that months of hard earned optimizations can easily be wiped out by a regression. Oftentimes, the regression was from a single line of code, and investing a little bit of time to change the implementation brings us back to baseline. In this three-part series of articles, we will be focusing on the systems we have in place for holding the line on web performance. To begin with, this first part will provide a brief overview of the Performance Program at Pinterest.
在Pinterest,检测、预防和解决性能回归已经成为标准多年。多年来,我们看到了许多例子,显示出由性能优化和回归引起的重大业务指标变动。这些具体的例子激励我们进行性能优化和维护。特别是,对抗回归成为了首要任务,因为我们多次看到,几个月辛苦优化的成果很容易被回归所抹去。往往,回归只是来自一行代码,稍微投入一点时间来改变实现方式,就能使我们回到基准线。在这个由三部分组成的系列文章中,我们将重点介绍Pinterest在Web性能方面的系统。首先,本文将简要介绍Pinterest的性能计划。
Performance Metrics
性能指标
While the Performance team logs and monitors many performance metrics, we goal and communicate on a set of custom metrics we call Pinner Wait Time (PWT). Each critical surface has a PWT defined to track the most important elements on the page. For example, on a Pin closeup page we track how long it takes to load the large hero image as well as the button to save a Pin to your board.
虽然性能团队记录和监控许多性能指标,但我们的目标和沟通是一组我们称之为Pinner Wait Time(PWT)的自定义指标。每个关键表面都有一个定义的PWT,用于跟踪页面上最重要的元素。例如,在Pin放大页面上,我们跟踪加载大型主图像和保存Pin到您的画板的按钮所需的时间。
Figure 1: The hero image and save button are tracked as part of the PWT metric for the Pin closeup page
图1:主图像和保存按钮作为PWT指标的一部分,用于Pin放大页面
On web, the Core Web Vitals joined our PWT metrics as topline performance metrics we guard and optimize. They’ve been the target of heavy optimization efforts and ha...