Documentation
¶
Overview ¶
Command allocbase ratchets the allocations per operation of the repository's Go benchmarks. It runs the benchmarks of the hot packages once per sub-benchmark (-benchtime=5x, GOMAXPROCS=1, -benchmem), reads allocs/op, and compares each with automation/ci/allocbase/baseline.toml:
- a benchmark above its baseline by more than the tolerance fails;
- a benchmark below its baseline by more than the tolerance fails too, so a fix lowers its entry in the same change;
- a benchmark with no entry, and an entry with no benchmark, fail.
Allocation counts of a benchmark that starts goroutines or servers vary by a few allocations from run to run, so the tolerance is the larger of 2 allocations and 6% (BenchmarkNativeProviderStream varies 827 to 864 between runs).
Run it with `make alloc-baseline`. -update rewrites the baseline from a run, -packages limits the run.
Click to show internal directories.
Click to hide internal directories.