bench

package
v0.1.51 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBenchmarkSuite

func RegisterBenchmarkSuite(bs *BenchmarkSuite)

Types

type Benchmark

type Benchmark struct {
	Name          string
	Inputs        any
	BenchmarkFunc func(*testing.B)
}

type BenchmarkResult

type BenchmarkResult struct {
	testing.BenchmarkResult
	Benchmark
}

func (BenchmarkResult) OpsPerSec

func (br BenchmarkResult) OpsPerSec() float64

type BenchmarkSuite

type BenchmarkSuite struct {
	Name          string
	SkipFlag      *bool
	BenchmarkFunc func(bs *BenchmarkSuite) []BenchmarkResult
	Runner        *testing.B
}

func BenchmarkSuites

func BenchmarkSuites() []*BenchmarkSuite

func NewBenchmarkSuite

func NewBenchmarkSuite(name string, skipFlag string, benchSuiteFunc func(bs *BenchmarkSuite) []BenchmarkResult) *BenchmarkSuite

func (*BenchmarkSuite) Benchmark

func (bs *BenchmarkSuite) Benchmark(benchmark Benchmark) BenchmarkResult

Jump to

Keyboard shortcuts

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