benchdata

package
v1.1.2 Latest Latest
Warning

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

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

Documentation

Overview

Package benchdata provides the inputs of the benchmarks in packages diff and textdiff.

Index

Constants

This section is empty.

Variables

View Source
var Names = []string{"small", "medium", "large01", "large02", "large04", "manifest", "few", "one"}

Names lists the inputs that Load provides.

Functions

func Load

func Load(tb testing.TB, name string) (x, y []byte)

Load returns the inputs x and y with the given name, one of Names. "few" is x of large04 with 20 lines edited, and "one" is x of large04 with 1 line edited.

Types

type Pair

type Pair struct{ X, Y []byte }

Pair holds the inputs of a diff.

func All

func All(tb testing.TB, maxSize int) []Pair

All returns the inputs of the test cases of package textdiff and of internal/benchmarks with at most maxSize bytes, in a fixed pseudorandom order.

Jump to

Keyboard shortcuts

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