benchcorpus

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package benchcorpus supplies the review store that index benchmarks read: a copy of a real store named by BAUM_BENCH_STORE, or a deterministic synthetic one shaped like real stores. It is for benchmarks only; nothing imports it in production.

Index

Constants

View Source
const (
	PullRequests = 64
	// Version counts cycle through 1..MaxVersions.
	MaxVersions = 4
)

Synthetic corpus shape, close to a busy real clone: documents of about 150 KB, most of it patch text under index.hunks[].diff.

View Source
const Env = "BAUM_BENCH_STORE"

Env names a directory holding the versions.sqlite to measure. It is opened read-only and never written.

View Source
const Repository = "acme/widgets"

Repository is the identity of every synthetic pull request.

Variables

This section is empty.

Functions

func Generate

func Generate(root string) error

Generate publishes the synthetic corpus into a new store at root.

func ProjectedRoot

func ProjectedRoot(b testing.TB) (root, label string)

ProjectedRoot is Root with the summaries projection present. A real store is copied into b.TempDir and write-opened there, which backfills the copy; the original is never written. Synthetic stores are projected by construction (Put maintains the projection), so for them both benchmark variants measure the projected path; the fallback is measured only on a real copy.

func Root

func Root(b testing.TB) (root, label string)

Root returns a directory with a versions.sqlite and a label for reports. A real store is used as is; otherwise a synthetic one is published into b.TempDir.

Types

This section is empty.

Jump to

Keyboard shortcuts

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