types

package
v0.0.0-...-101dd86 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: BSD-3-Clause Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AllClusterAlgos is a list of all valid RegressionDetectionGroupings.
	AllClusterAlgos = []RegressionDetectionGrouping{
		KMeansGrouping,
		StepFitGrouping,
	}

	// AllStepDetections is a list of all valid StepDetections.
	AllStepDetections = []StepDetection{
		OriginalStep,
		AbsoluteStep,
		Const,
		PercentStep,
		CohenStep,
		MannWhitneyU,
	}
)
View Source
var (
	// AllStepDetections is a list of all valid StepDetections.
	AllAlertActions = []AlertAction{
		NoAction,
		FileIssue,
		Bisection,
	}
)

AllAnomalyDetectionNotifyTypes is the list of all valid AnomalyDetectionNotifyTypes.

View Source
var (
	AllMeasurementStats = []string{
		"avg", "count", "max", "min", "std", "sum",
	}
)

All valid stat suffix from perf measurements.

View Source
var (
	// AllProjectIds is a list of all project ids.
	AllProjectIds = []ProjectId{
		"chromium",
	}
)

Functions

func TileCommitRangeForTileNumber

func TileCommitRangeForTileNumber(tileNumber TileNumber, tileSize int32) (CommitNumber, CommitNumber)

TileCommitRangeForTileNumber returns the first and last CommitNumbers that would appear in a tile of size tileSize.

Types

type AlertAction

type AlertAction string

AlertAction defines the action to trigger.

const (
	// NoAction means no action is needed for anomalies detected by this alert.
	NoAction AlertAction = "noaction"

	// Report means the anomalies detected by this alert should only create a
	// new issue or update an existing one.
	FileIssue AlertAction = "report"

	// Bisect means the anomalies detected by this alert should trigger a
	// bisection job to drill down to the culprit.
	Bisection AlertAction = "bisect"
)

type AnomalyDetectionNotifyType

type AnomalyDetectionNotifyType string
const (
	// IssueTracker means send Markdown formatted notifications to the
	// issue tracker.
	IssueNotify AnomalyDetectionNotifyType = "issuetracker"

	// None means do not send any notification.
	NoneNotify AnomalyDetectionNotifyType = "none"
)

type CL

type CL string

CL is the identifier for a change list, or pull request in GitHub lingo.

type CommitNumber

type CommitNumber int32

CommitNumber is the offset of any commit from the first commit in a repo. That is, the first commit is 0. The presumes that all commits are linearly ordered, i.e. no tricky branch merging.

const BadCommitNumber CommitNumber = -1

BadCommitNumber is an invalid CommitNumber.

func (CommitNumber) Add

func (c CommitNumber) Add(offset int32) CommitNumber

Add an offset to a CommitNumber and return the resulting CommitNumber.

type CommitNumberSlice

type CommitNumberSlice []CommitNumber

CommitNumberSlice is a utility class for sorting CommitNumbers.

func (CommitNumberSlice) Len

func (p CommitNumberSlice) Len() int

func (CommitNumberSlice) Less

func (p CommitNumberSlice) Less(i, j int) bool

func (CommitNumberSlice) Swap

func (p CommitNumberSlice) Swap(i, j int)

type Domain

type Domain struct {
	// N is the number of commits.
	N int32 `json:"n"`

	// End is the time when our range of N commits should end.
	End time.Time `json:"end"`

	// Offset is the exact commit we are interested in. If non-zero then ignore
	// both N and End.
	Offset int32 `json:"offset"`
}

Domain represents the range of commits over which to do some work, such as searching for regressions.

type ProgressCallback

type ProgressCallback func(message string)

ProgressCallback if a func that's called to return information on a currently running process.

type ProjectId

type ProjectId string

ProjectId defines the action to trigger.

type RegressionDetectionGrouping

type RegressionDetectionGrouping string

RegressionDetectionGrouping is how traces are grouped when regression detection is done.

const (
	KMeansGrouping  RegressionDetectionGrouping = "kmeans"  // Cluster traces using k-means clustering on their shapes.
	StepFitGrouping RegressionDetectionGrouping = "stepfit" // Look at each trace individually and determine if it steps up or down.
)

RegressionDetectionGrouping constants.

Update algo-select-sk if this enum is changed.

func ToClusterAlgo

func ToClusterAlgo(s string) (RegressionDetectionGrouping, error)

ToClusterAlgo converts a string to a RegressionDetectionGrouping

type StepDetection

type StepDetection string

StepDetection are the different ways we can look at an individual trace, or a cluster centroid (which is also a single trace), and detect if a step has occurred.

const (
	// OriginalStep is the original type of step detection. Note we leave as
	// empty string so we pick up the right default from old alerts.
	OriginalStep StepDetection = ""

	// AbsoluteStep is a step detection that looks for an absolute magnitude
	// change.
	AbsoluteStep StepDetection = "absolute"

	// Const is a step detection that detects if the absolute value of the trace
	// value exceeds some constant.
	Const StepDetection = "const"

	// PercentStep is a simple check if the step size is greater than some
	// percentage of the mean of the first half of the trace.
	PercentStep StepDetection = "percent"

	// CohenStep uses Cohen's d method to detect a change. https://en.wikipedia.org/wiki/Effect_size#Cohen's_d
	CohenStep StepDetection = "cohen"

	// MannWhitneyU uses the Mann-Whitney U test to detect a change. https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test
	MannWhitneyU StepDetection = "mannwhitneyu"
)

func ToStepDetection

func ToStepDetection(s string) (StepDetection, error)

ToStepDetection converts a string to a StepDetection.

type TileNumber

type TileNumber int32

TileNumber is the number of a Tile in the TraceStore. The first tile is always 0. The number of commits per Tile is configured per TraceStore.

const BadTileNumber TileNumber = -1

BadTileNumber is an invalid TileNumber.

func TileNumberFromCommitNumber

func TileNumberFromCommitNumber(commitNumber CommitNumber, tileSize int32) TileNumber

TileNumberFromCommitNumber converts a CommitNumber into a TileNumber given the tileSize.

func (TileNumber) Prev

func (t TileNumber) Prev() TileNumber

Prev returns the number of the previous tile.

May return a BadTileNumber.

type Trace

type Trace []float32

Trace is just a slice of float32s.

func NewTrace

func NewTrace(traceLen int) Trace

NewTrace returns a Trace of length 'traceLen' initialized to vec32.MISSING_DATA_SENTINEL.

type TraceSet

type TraceSet map[string]Trace

TraceSet is a set of Trace's, keyed by trace id.

Jump to

Keyboard shortcuts

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