Benchmarks

Telemetry-free benchmark guide.

Run local timing checks for core math, playback scheduling, analyser processing, and React hook overhead without adding tracking or analytics.

Local only

Use benchmarks as trend checks.

Benchmark output is useful when comparing one local branch against another under the same machine, Node version, and system load.

Run

local benchmark command
pnpm bench

What the suite measures

benchmarks/core-math.bench.ts

Core math

dB/gain conversion, frequency clamping, and note-label formatting.

benchmarks/core-playback.bench.ts

Core playback

tone, sweep, noise, gain, pan, duration scheduling, and stop cleanup with fake Web Audio nodes.

benchmarks/analyser-frame.bench.ts

Analyser frames

analyser frame reads and waveform coordinate calculations.

benchmarks/react-hooks.bench.tsx

React hooks

AudioProvider and hook render/control overhead with a fake AudioContext.

How to read local numbers

Treat results as local trend signals, not release gates. Compare before and after numbers from the same machine, with the same Node and pnpm versions, and note whether the changed code touches math helpers, graph scheduling, analyser work, or React hooks.

Limits

Timing varies across browser engines, devices, CPU power modes, thermal state, background apps, and CI runners. The suite uses fake Web Audio nodes for repeatable JavaScript checks; it does not measure real speakers, sound hardware latency, or calibrated equipment.

No telemetry

pnpm bench does not add telemetry, analytics, tracking, network uploads, browser fingerprinting, or user measurement. Benchmark output stays local unless a developer explicitly shares it.