flareperf — Unified Cloudflare Edge Performance & Budget Guardian
RUST · THE FLARE SUITE

flareperf — Cloudflare Worker Bundle Quota & Isolate Performance Auditor

flareperf enforces strict performance and size budgets for Cloudflare Workers and Pages Functions in local development and CI pipelines. It audits raw and gzipped bundle quotas, estimates V8 isolate cold-start latency, checks the 50-subrequest ceiling, and detects unbatched D1 SQL queries inside loops.

$ cargo install flareperf
GitHub ↗
Subcommand: bundle

📦 Edge Bundle Size Quotas

Enforce gzip, brotli, and zstd size budgets against Free (1MB), Paid (10MB), and Workers AI (5MB) tiers with full sourcemap package decompositions.

flareperf bundle dist/_worker.js
Subcommand: isolate

🧊 Isolate Cold-Start Analyzer

OXC AST engine analyzing global module scope outside request handlers to detect synchronous loops and heavy parsing that trigger Cloudflare Error 1101.

flareperf isolate src/index.ts
Subcommand: subrequests

🌐 50-Subrequest Limit Linter

Detects unbounded Promise.all loops, recursive fan-outs, and unbatched edge storage calls that breach Cloudflare's 50 subrequest limit (Error 1042).

flareperf subrequests src/
Subcommand: d1

🗄️ D1 N+1 Query Advisor

Flags SQLite queries inside loops and generates env.DB.batch([stmt1, stmt2]) refactoring suggestions for single-roundtrip execution.

flareperf d1 src/

Pre-Deploy CI/CD Integration

# In your .github/workflows/ci.yml - name: Edge Performance & Budget Check uses: bhubbard/flareperf@main with: command: check strict: true