Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobComparisonData ¶
type JobComparisonData struct {
Data map[MetricKey]*MetricComparisonData
}
JobComparisonData is a struct holding a map with keys as the metrics' keys and values as their comparison data.
func GetFlattennedComparisonData ¶
func GetFlattennedComparisonData(leftJobMetrics, rightJobMetrics []map[string][]perftype.PerfData, minAllowedAPIRequestCount int) *JobComparisonData
GetFlattennedComparisonData flattens latencies from various runs of left & right jobs into JobComparisonData. In the process, it also discards those metric samples with request count less than minAllowedAPIRequestCount.
func NewJobComparisonData ¶
func NewJobComparisonData() *JobComparisonData
NewJobComparisonData is a constructor for JobComparisonData struct.
func (*JobComparisonData) ComputeStatsForMetricSamples ¶
func (j *JobComparisonData) ComputeStatsForMetricSamples()
ComputeStatsForMetricSamples computes avg, std-dev and max for each metric's left and right samples.
func (*JobComparisonData) PrettyPrint ¶
func (j *JobComparisonData) PrettyPrint()
PrettyPrint prints the job comparison data in a table without any filtering.
func (*JobComparisonData) PrettyPrintWithFilter ¶
func (j *JobComparisonData) PrettyPrintWithFilter(filter MetricFilterFunc)
PrettyPrintWithFilter prints the job comparison data in a table with columns aligned, after sorting the metrics by their avg ratio and removing entries based on filter.
type MetricComparisonData ¶
type MetricComparisonData struct {
LeftJobSample []float64 // Sample values from the left job's runs
RightJobSample []float64 // Sample values from the right job's runs
Matched bool // Boolean indicating if the samples matched
Comments string // Any comments wrt the matching (for human interpretation)
// Below are some common statistical measures, that we would compute for the left
// and right job samples. They are used by some comparison schemes.
AvgL, AvgR, AvgRatio float64 // Average
StDevL, StDevR float64 // Standard deviation
MaxL, MaxR float64 // Max value
}
MetricComparisonData holds all the values corresponding to a metric's comparison.
type MetricFilterFunc ¶
type MetricFilterFunc func(MetricKey, MetricComparisonData) bool
MetricFilterFunc tells if a given MetricKey is to be filtered out.
type MetricKey ¶
type MetricKey struct {
TestName string // Name of the test ("Load Capacity", "Density", etc)
Verb string // "GET","LIST",etc for API calls and "POD STARTUP" for pod startup
Resource string // "nodes","pods",etc for API calls and empty value for pod startup
Subresource string // "status","binding",etc. Empty for pod startup and most API calls
Scope string // Used for API calls: "resource" (for GETs), "namespace"/"cluster" (for LISTs).
Percentile string // The percentile string ("Perc50", "Perc90", etc)
}
MetricKey is used to identify a metric uniquely.