v1

package
v0.0.0-...-2f8a3a2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Generate the go code from the protocol buffer definitions.

Index

Constants

This section is empty.

Variables

View Source
var (
	AnomalyConfig_Step_name = map[int32]string{
		0: "ORIGINAL_STEP",
		1: "ABSOLUTE_STEP",
		2: "CONST_STEP",
		3: "PERCENT_STEP",
		4: "COHEN_STEP",
		5: "MANN_WHITNEY_U",
	}
	AnomalyConfig_Step_value = map[string]int32{
		"ORIGINAL_STEP":  0,
		"ABSOLUTE_STEP":  1,
		"CONST_STEP":     2,
		"PERCENT_STEP":   3,
		"COHEN_STEP":     4,
		"MANN_WHITNEY_U": 5,
	}
)

Enum value maps for AnomalyConfig_Step.

View Source
var (
	AnomalyConfig_Direction_name = map[int32]string{
		0: "BOTH",
		1: "UP",
		2: "DOWN",
	}
	AnomalyConfig_Direction_value = map[string]int32{
		"BOTH": 0,
		"UP":   1,
		"DOWN": 2,
	}
)

Enum value maps for AnomalyConfig_Direction.

View Source
var (
	AnomalyConfig_Action_name = map[int32]string{
		0: "NOACTION",
		1: "TRIAGE",
		2: "BISECT",
	}
	AnomalyConfig_Action_value = map[string]int32{
		"NOACTION": 0,
		"TRIAGE":   1,
		"BISECT":   2,
	}
)

Enum value maps for AnomalyConfig_Action.

View Source
var (
	AnomalyConfig_Algo_name = map[int32]string{
		0: "STEPFIT",
		1: "KMEANS",
	}
	AnomalyConfig_Algo_value = map[string]int32{
		"STEPFIT": 0,
		"KMEANS":  1,
	}
)

Enum value maps for AnomalyConfig_Algo.

View Source
var (
	Subscription_Priority_name = map[int32]string{
		0: "P_UNSPECIFIED",
		1: "P0",
		2: "P1",
		3: "P2",
		4: "P3",
		5: "P4",
	}
	Subscription_Priority_value = map[string]int32{
		"P_UNSPECIFIED": 0,
		"P0":            1,
		"P1":            2,
		"P2":            3,
		"P3":            4,
		"P4":            5,
	}
)

Enum value maps for Subscription_Priority.

View Source
var (
	Subscription_Severity_name = map[int32]string{
		0: "S_UNSPECIFIED",
		1: "S0",
		2: "S1",
		3: "S2",
		4: "S3",
		5: "S4",
	}
	Subscription_Severity_value = map[string]int32{
		"S_UNSPECIFIED": 0,
		"S0":            1,
		"S1":            2,
		"S2":            3,
		"S3":            4,
		"S4":            5,
	}
)

Enum value maps for Subscription_Severity.

View Source
var File_sheriff_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AnomalyConfig

type AnomalyConfig struct {

	// Anomaly detection algorithm.
	// Default: Original step.
	Step AnomalyConfig_Step `protobuf:"varint,1,opt,name=step,proto3,enum=sheriff_config.v1.AnomalyConfig_Step" json:"step,omitempty"`
	// How many commits to each side of a commit to consider when looking for a step.
	// TODO(eduardoyap): Determine default and document here.
	Radius *int32 `protobuf:"varint,2,opt,name=radius,proto3,oneof" json:"radius,omitempty"`
	// The threshold value beyond which values become interesting
	// (indicates a real regression). Range of this value depends on algorithm used.
	Threshold float32 `protobuf:"fixed32,3,opt,name=threshold,proto3" json:"threshold,omitempty"`
	// How many traces need to be found interesting before an alert is fired.
	// Default: 1.
	MinimumNum *int32 `protobuf:"varint,4,opt,name=minimum_num,json=minimumNum,proto3,oneof" json:"minimum_num,omitempty"`
	// If true, only include commits that have data.
	// Default: False
	Sparse *bool `protobuf:"varint,5,opt,name=sparse,proto3,oneof" json:"sparse,omitempty"`
	// If algo is set to K-means, this determines the K in K-means clustering.
	// Default: 0.
	K *int32 `protobuf:"varint,6,opt,name=k,proto3,oneof" json:"k,omitempty"`
	// Comma separated list of keys that all clustering should be broken up accross.
	// Keys must not be part of a pattern.
	// Default: "".
	GroupBy *string `protobuf:"bytes,7,opt,name=group_by,json=groupBy,proto3,oneof" json:"group_by,omitempty"`
	// Default: Both
	Direction AnomalyConfig_Direction `protobuf:"varint,8,opt,name=direction,proto3,enum=sheriff_config.v1.AnomalyConfig_Direction" json:"direction,omitempty"`
	// Default: No Action.
	Action AnomalyConfig_Action `protobuf:"varint,9,opt,name=action,proto3,enum=sheriff_config.v1.AnomalyConfig_Action" json:"action,omitempty"`
	// Default: Step Fit Grouping
	Algo AnomalyConfig_Algo `protobuf:"varint,10,opt,name=algo,proto3,enum=sheriff_config.v1.AnomalyConfig_Algo" json:"algo,omitempty"`
	// Which metrics should be captured by this AnomalyConfig.
	Rules *Rules `protobuf:"bytes,11,opt,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

An AnomalyConfig defines the bounds for which a change in a matching metric can be considered "anomalous". For metrics that are matched, we apply the anomaly config to determine whether we should create an alert.

The configuration settings defined for an anomaly configuration override defaults that are defined by the anomaly detection algorithm.

TODO(eduardoyap): Figure out default values and document them here.

func (*AnomalyConfig) Descriptor deprecated

func (*AnomalyConfig) Descriptor() ([]byte, []int)

Deprecated: Use AnomalyConfig.ProtoReflect.Descriptor instead.

func (*AnomalyConfig) GetAction

func (x *AnomalyConfig) GetAction() AnomalyConfig_Action

func (*AnomalyConfig) GetAlgo

func (x *AnomalyConfig) GetAlgo() AnomalyConfig_Algo

func (*AnomalyConfig) GetDirection

func (x *AnomalyConfig) GetDirection() AnomalyConfig_Direction

func (*AnomalyConfig) GetGroupBy

func (x *AnomalyConfig) GetGroupBy() string

func (*AnomalyConfig) GetK

func (x *AnomalyConfig) GetK() int32

func (*AnomalyConfig) GetMinimumNum

func (x *AnomalyConfig) GetMinimumNum() int32

func (*AnomalyConfig) GetRadius

func (x *AnomalyConfig) GetRadius() int32

func (*AnomalyConfig) GetRules

func (x *AnomalyConfig) GetRules() *Rules

func (*AnomalyConfig) GetSparse

func (x *AnomalyConfig) GetSparse() bool

func (*AnomalyConfig) GetStep

func (x *AnomalyConfig) GetStep() AnomalyConfig_Step

func (*AnomalyConfig) GetThreshold

func (x *AnomalyConfig) GetThreshold() float32

func (*AnomalyConfig) ProtoMessage

func (*AnomalyConfig) ProtoMessage()

func (*AnomalyConfig) ProtoReflect

func (x *AnomalyConfig) ProtoReflect() protoreflect.Message

func (*AnomalyConfig) Reset

func (x *AnomalyConfig) Reset()

func (*AnomalyConfig) String

func (x *AnomalyConfig) String() string

type AnomalyConfig_Action

type AnomalyConfig_Action int32

What actions should be taken for detected anomalies. - NOACTION: Only show anomaly in UI. Don't triage or bisect. - TRIAGE: File Buganizer issue for anomalies found. Don't bisect. - BISECT: Triage and bisect anomaly groups.

const (
	AnomalyConfig_NOACTION AnomalyConfig_Action = 0
	AnomalyConfig_TRIAGE   AnomalyConfig_Action = 1
	AnomalyConfig_BISECT   AnomalyConfig_Action = 2
)

func (AnomalyConfig_Action) Descriptor

func (AnomalyConfig_Action) Enum

func (AnomalyConfig_Action) EnumDescriptor deprecated

func (AnomalyConfig_Action) EnumDescriptor() ([]byte, []int)

Deprecated: Use AnomalyConfig_Action.Descriptor instead.

func (AnomalyConfig_Action) Number

func (AnomalyConfig_Action) String

func (x AnomalyConfig_Action) String() string

func (AnomalyConfig_Action) Type

type AnomalyConfig_Algo

type AnomalyConfig_Algo int32

What Clustering Algorithm to use. StepFit: Look at each trace individually. KMeans: Cluster traces using K-Means Clustering.

const (
	AnomalyConfig_STEPFIT AnomalyConfig_Algo = 0
	AnomalyConfig_KMEANS  AnomalyConfig_Algo = 1
)

func (AnomalyConfig_Algo) Descriptor

func (AnomalyConfig_Algo) Enum

func (AnomalyConfig_Algo) EnumDescriptor deprecated

func (AnomalyConfig_Algo) EnumDescriptor() ([]byte, []int)

Deprecated: Use AnomalyConfig_Algo.Descriptor instead.

func (AnomalyConfig_Algo) Number

func (AnomalyConfig_Algo) String

func (x AnomalyConfig_Algo) String() string

func (AnomalyConfig_Algo) Type

type AnomalyConfig_Direction

type AnomalyConfig_Direction int32

Which direction will trigger an alert.

const (
	AnomalyConfig_BOTH AnomalyConfig_Direction = 0
	AnomalyConfig_UP   AnomalyConfig_Direction = 1
	AnomalyConfig_DOWN AnomalyConfig_Direction = 2
)

func (AnomalyConfig_Direction) Descriptor

func (AnomalyConfig_Direction) Enum

func (AnomalyConfig_Direction) EnumDescriptor deprecated

func (AnomalyConfig_Direction) EnumDescriptor() ([]byte, []int)

Deprecated: Use AnomalyConfig_Direction.Descriptor instead.

func (AnomalyConfig_Direction) Number

func (AnomalyConfig_Direction) String

func (x AnomalyConfig_Direction) String() string

func (AnomalyConfig_Direction) Type

type AnomalyConfig_Step

type AnomalyConfig_Step int32
const (
	// Step detection algorithm.
	AnomalyConfig_ORIGINAL_STEP AnomalyConfig_Step = 0
	// Step detection using absolute magnitude as threshold.
	AnomalyConfig_ABSOLUTE_STEP AnomalyConfig_Step = 1
	// Step detection using a constant as threshold.
	AnomalyConfig_CONST_STEP AnomalyConfig_Step = 2
	// Step detection that checks if step size is greater than some
	// percentage of the mean of the first half of the trace.
	AnomalyConfig_PERCENT_STEP AnomalyConfig_Step = 3
	// CohenStep uses Cohen's d method to detect a change.
	// https://en.wikipedia.org/wiki/Effect_size#Cohen's_d
	AnomalyConfig_COHEN_STEP AnomalyConfig_Step = 4
	// MannWhitneyU uses the Mann-Whitney U test to detect a change.
	// https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test
	AnomalyConfig_MANN_WHITNEY_U AnomalyConfig_Step = 5
)

func (AnomalyConfig_Step) Descriptor

func (AnomalyConfig_Step) Enum

func (AnomalyConfig_Step) EnumDescriptor deprecated

func (AnomalyConfig_Step) EnumDescriptor() ([]byte, []int)

Deprecated: Use AnomalyConfig_Step.Descriptor instead.

func (AnomalyConfig_Step) Number

func (AnomalyConfig_Step) String

func (x AnomalyConfig_Step) String() string

func (AnomalyConfig_Step) Type

type Rules

type Rules struct {
	Match   []string `protobuf:"bytes,1,rep,name=match,proto3" json:"match,omitempty"`
	Exclude []string `protobuf:"bytes,2,rep,name=exclude,proto3" json:"exclude,omitempty"`
	// contains filtered or unexported fields
}

Rules specify how to capture traces for Anomaly Detection.

A match or exclude string must be of the string format: "{key1}={value1}&{key2=value2}&..." where key is the name of the parameter and value is the value to filter for. If a key doesn't match an actual key in the Skia DB, the alert config will simply get ignored.

For matching, if a parameter is not specified, the default value is wildcard "*", meaning match to any value. For excluding, each statement must only include a single key.

Consider the example below:

{
  match: [
    "master=ChromiumPerf"&bot=~lacros-.*-perf&benchmark=Speedometer2",
    "master=ChromiumPerf&benchmark=Jetstream2",
  ],
  exclude: [
    "bot=lacros-eve-perf",
    "bot=lacros-x86-perf",
  ]
}

In SQL grammar, this would translate to: ... SELECT * FROM Metrics WHERE (main='ChromiumPerf' AND bot REGEXP 'lacros-.*-perf' AND benchmark='Speedometer2' AND bot!='lacros-eve-perf' AND bot!='lacros-x86-perf') OR (main='ChromiumPerf' AND benchmark='Jetstream' AND bot!='lacros-eve-perf' AND bot!='lacros-x86-perf')

func (*Rules) Descriptor deprecated

func (*Rules) Descriptor() ([]byte, []int)

Deprecated: Use Rules.ProtoReflect.Descriptor instead.

func (*Rules) GetExclude

func (x *Rules) GetExclude() []string

func (*Rules) GetMatch

func (x *Rules) GetMatch() []string

func (*Rules) ProtoMessage

func (*Rules) ProtoMessage()

func (*Rules) ProtoReflect

func (x *Rules) ProtoReflect() protoreflect.Message

func (*Rules) Reset

func (x *Rules) Reset()

func (*Rules) String

func (x *Rules) String() string

type SheriffConfig

type SheriffConfig struct {
	Subscriptions []*Subscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
	// contains filtered or unexported fields
}

A SheriffConfig lists the subscriptions for a Skia Perf instance. Subscriptions may only capture metrics which are uploaded to the Skia Perf instance specified.

func (*SheriffConfig) Descriptor deprecated

func (*SheriffConfig) Descriptor() ([]byte, []int)

Deprecated: Use SheriffConfig.ProtoReflect.Descriptor instead.

func (*SheriffConfig) GetSubscriptions

func (x *SheriffConfig) GetSubscriptions() []*Subscription

func (*SheriffConfig) ProtoMessage

func (*SheriffConfig) ProtoMessage()

func (*SheriffConfig) ProtoReflect

func (x *SheriffConfig) ProtoReflect() protoreflect.Message

func (*SheriffConfig) Reset

func (x *SheriffConfig) Reset()

func (*SheriffConfig) String

func (x *SheriffConfig) String() string

type Subscription

type Subscription struct {

	// A name is a free-form name for human readability purposes. Also
	// serves as a unique key for the subscription and should be unique from
	// all other subscription names.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The contact email address who owns this subscription. This is a required
	// field. There must be an owner we can contact for each subscription.
	ContactEmail string `protobuf:"bytes,2,opt,name=contact_email,json=contactEmail,proto3" json:"contact_email,omitempty"`
	// A list of labels applied to the Buganizer issues associated with
	// this subscription.
	BugLabels []string `protobuf:"bytes,3,rep,name=bug_labels,json=bugLabels,proto3" json:"bug_labels,omitempty"`
	// A list of Hotlist labels applied to the Buganizer issues associated with
	// this subscription.
	HotlistLabels []string `protobuf:"bytes,4,rep,name=hotlist_labels,json=hotlistLabels,proto3" json:"hotlist_labels,omitempty"`
	// A Buganizer component in which to file issues for this subscription.
	BugComponent string `protobuf:"bytes,6,opt,name=bug_component,json=bugComponent,proto3" json:"bug_component,omitempty"`
	// Priority to set in Buganizer issue. Default is P2.
	BugPriority Subscription_Priority `` /* 140-byte string literal not displayed */
	// Severity to set in Buganizer issue. Default is S2.
	BugSeverity Subscription_Severity `` /* 141-byte string literal not displayed */
	// A list of e-mails to add to Buganizer issue CC list.
	BugCcEmails []string `protobuf:"bytes,7,rep,name=bug_cc_emails,json=bugCcEmails,proto3" json:"bug_cc_emails,omitempty"`
	// Here we specify the subset of metrics we are interested in and what anomaly
	// detection algorithms to apply. This field can be repeated so that
	// different algorithms can be applied depending on the metrics captured.
	//
	// Anomaly configs in the same subscription should not have
	// overlapping metrics.
	AnomalyConfigs []*AnomalyConfig `protobuf:"bytes,8,rep,name=anomaly_configs,json=anomalyConfigs,proto3" json:"anomaly_configs,omitempty"`
	// contains filtered or unexported fields
}

A Subscription describes a configuration through which we determine:

  • A set of metrics a group of users are interested in alert monitoring. These anomalies are grouped together into anomaly groups if they overlap.
  • Anomaly detection settings.
  • Alerting settings.

func (*Subscription) Descriptor deprecated

func (*Subscription) Descriptor() ([]byte, []int)

Deprecated: Use Subscription.ProtoReflect.Descriptor instead.

func (*Subscription) GetAnomalyConfigs

func (x *Subscription) GetAnomalyConfigs() []*AnomalyConfig

func (*Subscription) GetBugCcEmails

func (x *Subscription) GetBugCcEmails() []string

func (*Subscription) GetBugComponent

func (x *Subscription) GetBugComponent() string

func (*Subscription) GetBugLabels

func (x *Subscription) GetBugLabels() []string

func (*Subscription) GetBugPriority

func (x *Subscription) GetBugPriority() Subscription_Priority

func (*Subscription) GetBugSeverity

func (x *Subscription) GetBugSeverity() Subscription_Severity

func (*Subscription) GetContactEmail

func (x *Subscription) GetContactEmail() string

func (*Subscription) GetHotlistLabels

func (x *Subscription) GetHotlistLabels() []string

func (*Subscription) GetName

func (x *Subscription) GetName() string

func (*Subscription) ProtoMessage

func (*Subscription) ProtoMessage()

func (*Subscription) ProtoReflect

func (x *Subscription) ProtoReflect() protoreflect.Message

func (*Subscription) Reset

func (x *Subscription) Reset()

func (*Subscription) String

func (x *Subscription) String() string

type Subscription_Priority

type Subscription_Priority int32
const (
	// If unspecified, default is P2.
	Subscription_P_UNSPECIFIED Subscription_Priority = 0
	Subscription_P0            Subscription_Priority = 1
	Subscription_P1            Subscription_Priority = 2
	Subscription_P2            Subscription_Priority = 3
	Subscription_P3            Subscription_Priority = 4
	Subscription_P4            Subscription_Priority = 5
)

func (Subscription_Priority) Descriptor

func (Subscription_Priority) Enum

func (Subscription_Priority) EnumDescriptor deprecated

func (Subscription_Priority) EnumDescriptor() ([]byte, []int)

Deprecated: Use Subscription_Priority.Descriptor instead.

func (Subscription_Priority) Number

func (Subscription_Priority) String

func (x Subscription_Priority) String() string

func (Subscription_Priority) Type

type Subscription_Severity

type Subscription_Severity int32
const (
	// If unspecified, default is S2.
	Subscription_S_UNSPECIFIED Subscription_Severity = 0
	Subscription_S0            Subscription_Severity = 1
	Subscription_S1            Subscription_Severity = 2
	Subscription_S2            Subscription_Severity = 3
	Subscription_S3            Subscription_Severity = 4
	Subscription_S4            Subscription_Severity = 5
)

func (Subscription_Severity) Descriptor

func (Subscription_Severity) Enum

func (Subscription_Severity) EnumDescriptor deprecated

func (Subscription_Severity) EnumDescriptor() ([]byte, []int)

Deprecated: Use Subscription_Severity.Descriptor instead.

func (Subscription_Severity) Number

func (Subscription_Severity) String

func (x Subscription_Severity) String() string

func (Subscription_Severity) Type

Jump to

Keyboard shortcuts

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