bench

package
v1.232.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package bench collects and compares reproducible performance snapshots.

Index

Constants

View Source
const (
	PrivateFile = 0o600

	Decimal   = 10
	FloatBits = 64

	CommentLimit = 55000

	Workflow = "benchmarks.yml"
	Marker   = "<!-- atmos-benchmarks -->"
)

Variables

This section is empty.

Functions

func Error

func Error(format string, args ...any) error

func Escape

func Escape(value string) string

func PRMatches

func PRMatches(pr *githubapi.PR, run *githubapi.Run, repo string) bool

func ReportRun

func ReportRun(ctx context.Context, client githubapi.API, repo string, id int64, publish func(int, string, *githubapi.Run) error) error

ReportRun validates PR run provenance and compares data-only artifacts using trusted code, then hands each report to the caller's composite publisher.

func TruncateReport

func TruncateReport(body string, limit int) string

Types

type Bench

type Bench mg.Namespace

Bench collects and compares reproducible performance snapshots.

func (Bench) Compare

func (Bench) Compare(snapshotsDir, candidateDir, outputDir string) error

Compare compares the candidate independently with each main snapshot.

func (Bench) Fetch

func (Bench) Fetch(repo, ref, outputDir string) error

Fetch retrieves up to ten compatible successful main snapshots. Candidate metadata defaults to the sibling candidate directory; override with ATMOS_BENCH_CANDIDATE_DIR when using another local layout.

func (Bench) FieldTest

func (Bench) FieldTest(refs, outputDir string) error

FieldTest rebuilds comma-separated historical refs and measures each binary with this checkout's identical CLI harness. The first ref is the known-good baseline. This is an explicit local experiment, never a CI baseline source.

func (Bench) Run

func (Bench) Run(outputDir string) error

Run builds the CLI and records a complete benchmark snapshot in outputDir.

Jump to

Keyboard shortcuts

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