Documentation ¶
Overview ¶
Package checks implements gobenchdata checks and checks configuration
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateConfig ¶
GenerateConfig outputs configuration in the provided directory
Types ¶
type Check ¶
type Check struct { Name string `yaml:"name"` Description string `yaml:"description"` // regex matchers Package string `yaml:"package"` Benchmarks []string `yaml:"benchmarks"` // Diff functions are written as `antonmedv/expr` expressions: https://github.com/antonmedv/expr // // Two parameters are provided: // // * `base`: bench.Benchmark // * `current`: bench.Benchmark // // Return a flaot64-castable value. This is then checked against your defined Thresholds // // In general, calibrate your diff to return: // // * negative value for improvement // * positive value for regression // DiffFunc string `yaml:"diff"` Thresholds Thresholds `yaml:"thresholds"` }
Check describes a set of benchmarks to run a diff on and check against thresholds
type CheckResult ¶
type CheckResult struct { Status Status Diffs []DiffResult Thresholds Thresholds }
CheckResult reports the output of a Check
type Config ¶
type Config struct {
Checks []Check `yaml:"checks"`
}
Config declares checks configurations
func LoadConfig ¶
LoadConfig reads configuration from the given path
type DiffResult ¶
DiffResult is the result of a diff
type EnvDiffFunc ¶
type EnvDiffFunc struct { Check *Check // contains filtered or unexported fields }
EnvDiffFunc describes variables provided to a DiffFunc
type EvaluateOptions ¶
EvaluateOptions declares options for checks evaluation
type Report ¶
type Report struct { Status Status Base string Current string Checks map[string]*CheckResult }
Report reports the output of Evaluate
func Evaluate ¶
func Evaluate(checks []Check, base bench.RunHistory, current bench.RunHistory, opts *EvaluateOptions) (*Report, error)
Evaluate checks against benchmark runs
func LoadReport ¶
LoadReport loads checks results from the given path
type Thresholds ¶
Thresholds declares values from ChangeFunc to fail