npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

web-perf-audit

v1.2.0

Published

Zero-dependency Chrome CDP performance auditor — Web Vitals, Navigation Timing, JS Coverage, resource waterfall, and HTML reports

Readme

web-perf-audit

Zero-dependency Chrome CDP performance auditor. Launches headless Chrome, collects Web Vitals, Navigation Timing, JS Coverage, resource waterfalls, and generates console + HTML reports.

Features

  • Web Vitals — TTFB, FCP, LCP, CLS, TBT, INP with Good/Needs work/Poor ratings
  • Performance Score — Lighthouse v10-style weighted score (0–100)
  • Phase Breakdowns — TTFB, FCP, LCP, CLS, INP broken into sub-phases with bar charts
  • JS Coverage & Execution Time — unused bytes per script with CPU profile data
  • TBT Breakdown — per-script blocking time via Long Animation Frames API
  • Resource Analysis — render-blocking detection, preload audit, largest resources
  • Network Waterfall — ASCII (console) and visual (HTML) timeline
  • Device & Network Emulation — desktop, tablet, mobile presets + 3G/4G throttling
  • Multi-run Mode — run N iterations, report median vitals (sequential or parallel)
  • HTML Reports — self-contained HTML with inline CSS, no external dependencies
  • Zero dependencies — uses system Chrome + CDP over Node built-ins

Requirements

  • Node.js >= 18
  • Chromium-based browser installed — Google Chrome, Chromium, Brave, Microsoft Edge, or any other Chromium-based browser

Supported platforms

| Platform | Browser discovery | |---|---| | macOS | Google Chrome, Chromium, Chrome Canary, Brave (standard /Applications paths) | | Linux | google-chrome, google-chrome-stable, chromium-browser, chromium (resolved via $PATH) | | Windows | C:\Program Files\Google\Chrome\Application\chrome.exe, C:\Program Files (x86)\...\chrome.exe |

The tool auto-detects the browser by trying known paths in order. If your browser is installed in a non-standard location, ensure it is available in your system $PATH.

Note: Firefox and Safari are not supported — the tool communicates with the browser via Chrome DevTools Protocol (CDP), which is only available in Chromium-based browsers. Some features (Long Animation Frames API for TBT attribution) require Chrome 123+.

Installation

npm install -g web-perf-audit

Or use directly with npx:

npx web-perf-audit https://example.com

Usage

web-perf-audit [url] [options]

Options

| Option | Description | Default | |---|---|---| | --runs N | Run audit N times, report median vitals | 1 | | --parallel | Run iterations concurrently (with --runs) | false | | --device <preset> | Device emulation: desktop, tablet, mobile | desktop | | --throttle <preset> | Network: slow-3g, fast-3g, 4g, none | none | | --cpu-throttle <N> | CPU slowdown multiplier (e.g. 4 = 4x slower) | 1 | | --header "Name: Val" | Add custom HTTP header (repeatable) | — | | --cookie "name=val" | Add cookie for target domain (repeatable) | — | | --html [path] | Save HTML report (auto-named if no path given) | — | | -h, --help | Show help | — |

Examples

# Basic audit
web-perf-audit https://example.com

# Mobile on 4G with 5 runs
web-perf-audit https://example.com --device mobile --throttle 4g --cpu-throttle 4 --runs 5

# Parallel runs with HTML output
web-perf-audit https://example.com --runs 5 --parallel --html

# Save HTML to specific file
web-perf-audit https://example.com --html report.html

# Audit a page behind authentication
web-perf-audit https://example.com --header "Authorization: Bearer tok123"

# Pass a session cookie
web-perf-audit https://example.com --cookie "session=abc123"

# Multiple headers and cookies
web-perf-audit https://example.com --header "Authorization: Bearer tok" --header "X-Custom: val" --cookie "sid=abc"

Report Sections

| Section | Description | |---|---| | Navigation Timing | DNS, TCP, TLS, TTFB, download, DOM lifecycle, total load | | Performance Score | Lighthouse-style 0–100 weighted score | | Web Vitals | TTFB, FCP, LCP, CLS, TBT, INP with thresholds | | TTFB Breakdown | Redirect, DNS, TCP, TLS, request/response phases | | FCP Breakdown | TTFB, blocking resources, HTML parse, style/font load | | LCP Breakdown | TTFB, resource delay/download, render delay sub-phases | | CLS Breakdown | Session windows with source elements | | INP Breakdown | Input delay, processing, presentation delay sub-phases | | TBT Breakdown | Per-script blocking time with Long Animation Frames | | Resource Summary | Count, transfer size, slowest time per type | | JS Coverage | Used vs unused bytes per script, execution time | | Render-Blocking | Resources with renderBlockingStatus === 'blocking' | | Preload Audit | Cross-references <link rel="preload"> with usage | | Largest Resources | Top 10 by transfer size | | Network Waterfall | Timeline of the 20 slowest resources |

License

MIT