internal

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DegradingChange     = -1 // represents a statistically significant degradation
	InsignificantChange = 0  // represents no statistically significant change
	ImprovingChange     = 1  // represents a statistically significant improvement
)

BenchmarkChangeType values

Variables

This section is empty.

Functions

This section is empty.

Types

type Benchdiff

type Benchdiff struct {
	BenchCmd    string
	BenchArgs   string
	ResultsDir  string
	BaseRef     string
	Path        string
	GitCmd      string
	Writer      io.Writer
	Benchstat   *benchstatter.Benchstat
	Force       bool
	JSONOutput  bool
	Cooldown    time.Duration
	WarmupCount int
	WarmupTime  string
	Debug       *log.Logger
}

Benchdiff runs benchstats and outputs their deltas

func (*Benchdiff) Run

func (c *Benchdiff) Run() (*RunResult, error)

Run runs the Benchdiff

type BenchmarkChangeType

type BenchmarkChangeType int

BenchmarkChangeType is whether a change is an improvement or degradation

type RunResult

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

RunResult is the result of a Run

func (*RunResult) HasDegradedResult added in v0.4.3

func (r *RunResult) HasDegradedResult(tolerance float64) bool

HasDegradedResult returns true if there are any rows with DegradingChange and PctDelta over tolerance

func (*RunResult) WriteOutput

func (r *RunResult) WriteOutput(w io.Writer, opts *RunResultOutputOptions) error

WriteOutput outputs the result

type RunResultOutputOptions

type RunResultOutputOptions struct {
	BenchstatFormatter benchstatter.OutputFormatter // default benchstatter.TextFormatter(nil)
	OutputFormat       string                       // one of json or human. default: human
	Tolerance          float64
}

RunResultOutputOptions options for RunResult.WriteOutput

Jump to

Keyboard shortcuts

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