perftypes

package
v0.0.0-...-03d6fc4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MISSING_DATA_SENTINEL = 1e100
)

Variables

View Source
var ValidStatusValues = []string{"New", "Ignore", "Bug"}

ValidStatusValues are the valid values of ClusterSummary.Status when the ClusterSummary is used as an alert.

Functions

func BytesFromFloat64

func BytesFromFloat64(f float64) []byte

func PerfTraceBuilder

func PerfTraceBuilder(n int) tiling.Trace

Types

type ClusterSummary

type ClusterSummary struct {
	// Traces contains at most config.MAX_SAMPLE_TRACES_PER_CLUSTER sample
	// traces, the first is the centroid.
	Traces [][][]float64

	// Keys of all the members of the Cluster.
	Keys []string

	// ParamSummaries is a summary of all the parameters in the cluster.
	ParamSummaries [][]ValueWeight

	// StepFit is info on the fit of the centroid to a step function.
	StepFit *StepFit

	// Hash is the Git hash at the step point.
	Hash string

	// Timestamp is when this hash was committed.
	Timestamp int64

	// Status is the status, "New", "Ingore" or "Bug".
	Status string

	// A note about the Status.
	Message string

	// ID is the identifier for this summary in the datastore.
	ID int64

	// Bugs is a list of IDs of bugs in the issue tracker.
	Bugs []int64
}

ClusterSummary is a summary of a single cluster of traces.

func NewClusterSummary

func NewClusterSummary(numKeys, numTraces int) *ClusterSummary

func (*ClusterSummary) Merge

func (c *ClusterSummary) Merge(from *ClusterSummary)

Merge adds in new info from the passed in ClusterSummary.

type PerfTrace

type PerfTrace struct {
	Values  []float64         `json:"values"`
	Params_ map[string]string `json:"params"`
}

PerfTrace represents all the values of a single floating point measurement. *PerfTrace implements Trace.

func NewPerfTrace

func NewPerfTrace() *PerfTrace

NewPerfTrace allocates a new Trace set up for the given number of samples.

The Trace Values are pre-filled in with the missing data sentinel since not all tests will be run on all commits.

func NewPerfTraceN

func NewPerfTraceN(n int) *PerfTrace

NewPerfTraceN allocates a new Trace set up for the given number of samples.

The Trace Values are pre-filled in with the missing data sentinel since not all tests will be run on all commits.

func (*PerfTrace) DeepCopy

func (t *PerfTrace) DeepCopy() tiling.Trace

func (*PerfTrace) Grow

func (t *PerfTrace) Grow(n int, fill tiling.FillType)

func (*PerfTrace) IsMissing

func (t *PerfTrace) IsMissing(i int) bool

func (*PerfTrace) Len

func (t *PerfTrace) Len() int

func (*PerfTrace) Merge

func (t *PerfTrace) Merge(next tiling.Trace) tiling.Trace

func (*PerfTrace) Params

func (t *PerfTrace) Params() map[string]string

func (*PerfTrace) SetAt

func (g *PerfTrace) SetAt(index int, value []byte) error

func (*PerfTrace) Trim

func (g *PerfTrace) Trim(begin, end int) error

type StepFit

type StepFit struct {
	// LeastSquares is the Least Squares error for a step function curve fit to the trace.
	LeastSquares float64

	// TurningPoint is the index where the Step Function changes value.
	TurningPoint int

	// StepSize is the size of the step in the step function. Negative values
	// indicate a step up, i.e. they look like a performance regression in the
	// trace, as opposed to positive values which look like performance
	// improvements.
	StepSize float64

	// The "Regression" value is calculated as Step Size / Least Squares Error.
	//
	// The better the fit the larger the number returned, because LSE
	// gets smaller with a better fit. The higher the Step Size the
	// larger the number returned.
	Regression float64

	// Status of the cluster.
	//
	// Values can be "High", "Low", and "Uninteresting"
	Status string
}

StepFit stores information on the best Step Function fit on a trace.

Used in ClusterSummary.

type TryBotResults

type TryBotResults struct {
	// Map from Trace key to value.
	Values map[string]float64
}

func NewTryBotResults

func NewTryBotResults() *TryBotResults

type ValueWeight

type ValueWeight struct {
	Value  string
	Weight int
}

ValueWeight is a weight proportional to the number of times the parameter Value appears in a cluster. Used in ClusterSummary.

Jump to

Keyboard shortcuts

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