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
pnpm benchWhat the suite measures
Core math
dB/gain conversion, frequency clamping, and note-label formatting.
Core playback
tone, sweep, noise, gain, pan, duration scheduling, and stop cleanup with fake Web Audio nodes.
Analyser frames
analyser frame reads and waveform coordinate calculations.
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.