Measures the real browser load cost of importing a package from a CDN — how many files are fetched, how many round trips are needed, and the total decoded size. Runs an actual browser load and captures the resource waterfall.
Embeddable SVG that shows the package waterfall: file count, total size, and round-trip structure. Generated server-side from browser-measured data stored in D1.
/_banner/standard/:package[@version]
/_banner/standard/:package[@version]?cdn=esm.sh
Example:
The banner auto-updates as new measurements are recorded. Cached at the edge and purged on write.
Small size badge (still available as a public API endpoint):
/:package[@version][?cdn=jsdelivr|unpkg|esm.sh]
CDN: jsdelivr (default), unpkg, esm.sh — selected via ?cdn= query param
- Browser loads the package in a hidden iframe via the selected CDN
PerformanceResourceTimingentries are captured and annotated- Resources are grouped into round trips using the 5 ms gap heuristic
- The structural waterfall (round trip index, URL, decoded bytes) is posted to
/_recordand stored in D1 - The banner SVG is generated from the stored waterfall on demand
Runs on Cloudflare Workers + D1.
bun install
bunx wrangler deploy
bunx wrangler d1 migrations apply bulk-bundle --remote