benchmark

package
v0.0.0-...-cc18b97 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ID

func ID(b Benchmark) string

ID computes a unique string for this benchmark.

Types

type Benchmark

type Benchmark interface {
	Name() string
	Run(client *runtime.Client, handler string) (Report, error)
	Labels() []string
}

func Filter

func Filter(items []Benchmark, filters []string) []Benchmark

Filter operates in-place on a slice of benchmarks.

type Index

type Index map[string]IndexEntry

func NewIndex

func NewIndex() Index

type IndexEntry

type IndexEntry struct {
	Labels   []string `json:"labels"`
	Datasets []int    `json:"datasets"`
}

type Matrix

type Matrix struct {
	CRIs  []string
	OCIs  []string
	Items []Benchmark
	Runs  int
}

func (*Matrix) Index

func (m *Matrix) Index(index Index)

func (*Matrix) Run

func (m *Matrix) Run() ([]MatrixEntry, error)

type MatrixEntry

type MatrixEntry struct {
	CRI     string         `json:"cri"`
	OCI     string         `json:"oci"`
	Results []MatrixResult `json:"results"`
}

type MatrixResult

type MatrixResult struct {
	Name       string   `json:"name"`
	Aggregated Report   `json:"aggregated"`
	Reports    []Report `json:"reports"`
}

type Report

type Report interface {
	Aggregate(r Report) Report
	Scale(n int) Report
}

type Suite

type Suite []Benchmark

func (Suite) Name

func (bs Suite) Name() string

func (Suite) Run

func (bs Suite) Run(client *runtime.Client, handler string) (interface{}, error)

type ValueReport

type ValueReport map[string]float64

func (ValueReport) Aggregate

func (report ValueReport) Aggregate(other Report) Report

func (ValueReport) Scale

func (report ValueReport) Scale(n int) Report

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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