Skip to content

perfproof 1.0.0

Choose a tag to compare

@feresbr1 feresbr1 released this 19 Oct 13:50
· 3 commits to main since this release

Find the slow line in Node.js, then prove the fix.

npx github:feresbr1/perfproof run -- npm test
npx github:feresbr1/perfproof bench --save before -- node build.js
# ...change the code...
npx github:feresbr1/perfproof bench --compare before -- node build.js

What's in 1.0.0

  • perfproof run profiles a command and every Node.js process and worker thread it starts, then ranks the hot lines with their code, enclosing function and a hint for common slow patterns. It also reports hot functions (self and total time), CPU split by your code, dependencies, Node.js internals, native code and GC, and notes on heavy GC or I/O-bound runs.
  • Accurate lines: on-stack replacement is disabled while profiling, so a hot loop's time is no longer blamed on the line that called the function.
  • perfproof bench gives mean ± 95% CI, saved baselines, a Welch's t-test verdict (FASTER / SLOWER / NO SIGNIFICANT DIFFERENCE) and --fail-if-slower.
  • perfproof analyze reports on existing .cpuprofile files.
  • Output as text, Markdown and JSON, plus a self-contained flamegraph.html for every run.
  • Agent skill: npx skills add feresbr1/perfproof.
  • Web viewer: https://feresbr1.github.io/perfproof/ (nothing is uploaded).

Requires Node.js 22.15+. perfproof.mjs below is the whole CLI in one dependency-free file: node perfproof.mjs run -- <command>.