benchsync

command
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Command benchsync regenerates the benchmark tables in docs from a fresh `go test -bench` output file. It parses the bench output line-by-line, emits one markdown row per known benchmark name, and replaces the table inside a managed marker block in the target document.

The input must be produced with `-benchmem`: the parser only matches lines that include the `B/op` and `allocs/op` columns. Without them the parse returns no rows and `run` fails with "missing benchmark result for ..." on the first expected target row it cannot find. `make bench-ci` already passes `-benchmem`, so use that target rather than invoking `go test` by hand.

Run via `make bench-sync` from the repo root.

Jump to

Keyboard shortcuts

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