Documentation ¶
Index ¶
Constants ¶
View Source
const ( MetricNsPerOpDisplay string = "time" // NsPerOp metric MetricAllocedBytesPerOpDisplay string = "memory" // AllocedBytesPerOp metric MetricAllocsPerOpDisplay string = "allocations" // AllocsPerOp metric )
These constants specifies the display name for some metrics
View Source
const ( MetricNsPerOpMeasure string = "ns" // Nanoseconds per operation MetricAllocedBytesPerOpMeasure string = "bytes" // Bytes allocated per operation MetricAllocsPerOpMeasure string = "times" // Allocation times per operation )
Measures used in the metrics
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comparision ¶
type Comparision struct { Name string Test string Metrics []MetricComparision }
Comparision represents a whole comparision between two results
func Compare ¶
func Compare(latest *Result, current *Result, threshold uint) (bool, []Comparision)
Compare two different benchmark results
func (*Comparision) IsValid ¶
func (cmp *Comparision) IsValid() bool
IsValid determines if is valid even being worse but stills over threshold
func (*Comparision) IsWorse ¶
func (cmp *Comparision) IsWorse() bool
IsWorse indicates if comparasion is fully or partially worse than previous one
type MetricComparision ¶
type MetricComparision struct { Metric string CurrentValue float64 LatestValue float64 Measure string Diff float64 Valid bool }
MetricComparision represents a metric comparision against latest results
func (*MetricComparision) IsWorse ¶
func (mc *MetricComparision) IsWorse() bool
IsWorse defines whether metric is worse than previous one or not
type Result ¶
type Result map[string]*TestResult
Result of a complete benchmark execution
type TestResult ¶
TestResult represents an specific test benchmark result
func NewTestResult ¶
func NewTestResult(b *parse.Benchmark) *TestResult
NewTestResult generates a TestResult from a benchmark parse
Click to show internal directories.
Click to hide internal directories.