historicaldata

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentReleaseFromMap

func CurrentReleaseFromMap(releasesInQueryResults map[string]bool) string

func DurationOrDie

func DurationOrDie(seconds float64) time.Duration

func PreviousReleaseUpgrade

PreviousReleaseUpgrade if we don't have data for the current toRelease, perhaps we have data for the congruent test on the prior release. A 4.11 to 4.11 upgrade will attempt a 4.10 to 4.10 upgrade. A 4.11 no upgrade, will attempt a 4.10 no upgrade.

Types

type AlertBestMatcher

type AlertBestMatcher struct {
	HistoricalData map[AlertDataKey]AlertStatisticalData
}

func NewAlertMatcher

func NewAlertMatcher(historicalJSON []byte) (*AlertBestMatcher, error)

func NewAlertMatcherWithHistoricalData

func NewAlertMatcherWithHistoricalData(data map[AlertDataKey]AlertStatisticalData) *AlertBestMatcher

func (*AlertBestMatcher) BestMatchDuration

func (b *AlertBestMatcher) BestMatchDuration(key AlertDataKey) (StatisticalDuration, string, error)

BestMatchDuration returns the best possible match for this historical data. It attempts an exact match first, then it attempts to match on the most important keys in order, before giving up and returning an empty default, which means to skip testing against this data.

func (*AlertBestMatcher) BestMatchP99

func (b *AlertBestMatcher) BestMatchP99(key AlertDataKey) (*time.Duration, string, error)

type AlertDataKey

type AlertDataKey struct {
	AlertName      string
	AlertNamespace string
	AlertLevel     string

	platformidentification.JobType `json:",inline"`
}

type AlertStatisticalData

type AlertStatisticalData struct {
	AlertDataKey  `json:",inline"`
	Name          string
	P50           float64
	P75           float64
	P95           float64
	P99           float64
	FirstObserved time.Time
	LastObserved  time.Time
	JobRuns       int64
}

type DataKey

type DataKey struct {
	BackendName string

	platformidentification.JobType `json:",inline"`
}

type DisruptionBestMatcher

type DisruptionBestMatcher struct {
	HistoricalData map[DataKey]DisruptionStatisticalData
}

func NewDisruptionMatcher

func NewDisruptionMatcher(historicalJSON []byte) (*DisruptionBestMatcher, error)

func NewDisruptionMatcherWithHistoricalData

func NewDisruptionMatcherWithHistoricalData(data map[DataKey]DisruptionStatisticalData) *DisruptionBestMatcher

func (*DisruptionBestMatcher) BestMatchDuration

func (b *DisruptionBestMatcher) BestMatchDuration(name string, jobType platformidentification.JobType, minJobRuns int) (StatisticalDuration, string, error)

BestMatchDuration returns the best possible match for this historical data. It attempts an exact match first, then it attempts to match on the most important keys in order, before giving up and returning an empty default, which means to skip testing against this data.

func (*DisruptionBestMatcher) BestMatchP99

type DisruptionStatisticalData

type DisruptionStatisticalData struct {
	DataKey       `json:",inline"`
	P50           float64
	P75           float64
	P95           float64
	P99           float64
	FirstObserved time.Time
	LastObserved  time.Time
	JobRuns       int64
}

type NextBestKey

NextBestKey returns the next best key in the query_results.json generated from BigQuery and a bool indicating whether this guesser has an opinion. If the bool is false, the key should not be used. Returning true doesn't mean the key exists, it just means that the key is worth trying.

type StatisticalDuration

type StatisticalDuration struct {
	platformidentification.JobType `json:",inline"`
	P50                            time.Duration
	P75                            time.Duration
	P95                            time.Duration
	P99                            time.Duration
	FirstObserved                  time.Time
	LastObserved                   time.Time
	JobRuns                        int64
}

Jump to

Keyboard shortcuts

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