bench

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Operations = "ops"
	Latency    = "ns/op"
	Throughput = "B/op"
	Heap       = "allocs/op"
	Key        = "size-key"
	Value      = "size-value"
	Num        = "num-objects"
)

Variables

This section is empty.

Functions

func Format added in v0.1.0

func Format(attributes map[string]int, labels ...string) string

Types

type Benchmark

type Benchmark struct {
	// contains filtered or unexported fields
}

func (Benchmark) Heap

func (b Benchmark) Heap() (float64, bool)

func (Benchmark) Labels

func (b Benchmark) Labels() []string

func (Benchmark) Latency

func (b Benchmark) Latency() (float64, bool)

func (Benchmark) Operations

func (b Benchmark) Operations() (float64, bool)

func (Benchmark) Throughput

func (b Benchmark) Throughput() (float64, bool)

type Benchmarks

type Benchmarks []Benchmark

Benchmarks is a collection of Benchmark results

func New

func New(f string) (Benchmarks, error)

New creates a collection of Benchmark items from a given becnhmark output file

func (Benchmarks) Extract

func (b Benchmarks) Extract(x, y string, filters ...Filter) *oremi.Collection

Extract extracts Latency and operation information from the given benchmarks x value to be used for the x-axis y value to be used for the y-axis

type Filter

type Filter struct {
	Type FilterType
	// contains filtered or unexported fields
}

func Exclude

func Exclude(f map[string]float64) Filter

func Include

func Include(f map[string]float64) Filter

func Label added in v0.0.3

func Label(f ...string) Filter

func (Filter) Apply added in v0.1.0

func (f Filter) Apply(benchmark Benchmark, match *bool)

type FilterType

type FilterType int
const (
	IN FilterType = iota + 1
	OUT
	LABEL
)

Jump to

Keyboard shortcuts

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