Skip to content

benchmark-iteration-mutation

Default severity: error

The testing package dynamically controls B.N to calibrate benchmark duration and calculate per-operation time. Benchmark code that changes N invalidates those measurements.

b.N = 1000
for range b.N { operation() }