Top AI Repos โ open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Automating Web Performance testing with Puppeteer ๐ช
| Date | Stars |
|---|---|
| 2026-07-24 | 1858 |
| 2026-07-25 | 1858 |
| 2026-07-28 | 1858 |
| 2026-07-30 | 1858 |
| 2026-08-06 | 1858 |
Today
โ stars today
This week
โ stars this week
This month
โ stars this month
Momentum
0.0
growth rate 0.00%/day
<p align="center">
<img src="https://user-images.githubusercontent.com/110953/80448571-91919100-88d1-11ea-936a-a8fb1785311e.jpg" alt="Puppeteer WebPerf logo" width="70%"/>
<h1>Automating Web Perf measurement with Puppeteer</h1>
</p>
๐น <a href="https://pptr.dev">Puppeteer</a> is a Node library which provides a high-level API to control headless Chrome or Chromium over the <a href="https://chromedevtools.github.io/devtools-protocol/">DevTools Protocol</a>. This repository has recipes for automating Web Performance measurement with Puppeteer.
## Table Of Contents
* [Get a DevTools performance trace for a page load](#devtools-profile)
* [Get a DevTools trace with screenshots](#devtools-screenshots)
* [Get a DevTools trace and extract filmstrip screenshots](#devtools-trace-screenshots)
* [Get a DevTools trace for a user interaction](#devtools-interaction)
* [Get Runtime performance metrics](#runtime-perf-metrics)
* [Generate a Lighthouse report](#lighthouse-report)
* [Extract Lighthouse performance metrics](#lighthouse-metrics)
* [Emulate a slow network](#throttle-network)
* [Emulate a slow network and CPU](#throttle-network-cpu)
* [Test your site renders with JavaScript disabled](#javascript-disabled)
* [Get Navigation Timing API metrics](#navigation-timing)
* [Measure First Paint and First Contentful Paint](#first-contentful-paint)
* [Measure Largest Contentful Paint w/PerformanceObserver](#largest-contentful-paint)
* [Measure Cumulative Layout Shift w/PerformanceObserver](#cumulative-layout-shift)
* [Measure SPA metrics with Next.js](#nextjs-metrics)
* [Get DevTools-specific metrics: Frames Per Second](#devtools-frame-rate)
* [Measure memory leaks](#measure-memory-leaks)
* [Override requests with Request Interception](#request-interception)
* [Block third-party domains](#block-third-parties)
* [Code Coverage for JavaScript and CSS](#code-coverage)
* [Save network requests to a HAR file](#har-file)
<h3 id="devtools-profile">Get a DevTools performance trace for a page load</h3>
Puppeteer API: [tracing.start()](https://pptr.dev/#?product=Puppeteer&show=api-tracingstartoptions)
```js
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Drag and drop this JSON file to the DevTools Performance panel!
await page.tracing.start({path: 'profile.json'});
await page.goto('https://pptr.dev');
await page.tracing.stop();
await browser.close();
})();
```
[Source](devtools-profile.js)
<img src="/assets/images/Performance-tracing0.png" alt="Screenshot of a DevTools performance profile from loading and rendering a page"/>
<h3 id="devtools-screenshots">Get a DevTools trace with screenshots</h3>
Puppeteer API: [tracing.start()](https://pptr.dev/#?product=Puppeteer&show=api-tracingstartoptions)
```js
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Drag and drop this JSON file to the DevTools Performance panel!
await page.tracing.start({ path: 'profile.json', screenshots: true });
await page.goto('https://pptr.dev');
await page.tracing.stop();
await browser.close();
})();
```
[Source](devtools-screenshots.js)
<img src="/assets/images/Performance-tracing2.png" alt="DevTools screenshots in the performance panel"/>
<h3 id="devtools-trace-screenshots">Get a DevTools trace and extract filmstrip screenshots</h3>
If you would like to record a performance trace and extract filmstrip screenshots from that trace to a local directory, the below snippet should do the trick. It works by filtering trace events for screenshot entries.
```js
const puppeteer = require('puppeteer');
const fs = require('fs');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.tracing.start({ screenshots: true, path: 'trace.json' });
await page.goto('https://netflix.com', { timeout: 60000 });Excerpt of 36,528 characters
Read on GitHubAddy Osmani ยท Google ยท United States
44
Mathias Bynens ยท @Google
6
Jan Scheffler
5
3
Would you bet a product on this? Bounded 0โ100 and slow moving.
matched fp:cfe36e154fdd51e6, topic:puppeteer