https://addyosmani.com/blog/puppeteer-recipes/
Table Of Contents
Get a DevTools performance trace for a page load
Get a DevTools trace with screenshots
Get a DevTools trace for a user interaction
Get Runtime performance metrics
Generate a Lighthouse report
Extract Lighthouse performance metrics
Emulate a slow network
Emulate a slow network and CPU
Test your site renders with JavaScript disabled
Get Navigation Timing API metrics
Measure First Paint and First Contentful Paint
Measure Largest Contentful Paint w/PerformanceObserver
Measure Cumulative Layout Shift w/PerformanceObserver
Measure SPA metrics with Next.js
Get DevTools-specific metrics: Frames Per Second
Measure memory leaks
Override requests with Request Interception