allocbase

command
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 12 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL