reliability

package
v0.0.0-...-be7f909 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Overview

Package reliability models task reliability statistics.

Index

Constants

View Source
const (
	MaxQueryLimit        = taskstats.MaxQueryLimit - 1 // (1000) route.ReliabilityAPIMaxNumTasks
	MaxSignificanceLimit = 1.0
	MinSignificanceLimit = 0.0
	DefaultSignificance  = 0.05

	GroupByTask = taskstats.GroupByTask

	GroupByDistro = taskstats.GroupByDistro

	SortLatestFirst = taskstats.SortLatestFirst
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskReliability

type TaskReliability struct {
	TaskName           string
	BuildVariant       string
	Distro             string
	Date               time.Time
	NumTotal           int
	NumSuccess         int
	NumFailed          int
	NumTimeout         int
	NumTestFailed      int
	NumSystemFailed    int
	NumSetupFailed     int
	AvgDurationSuccess float64
	SuccessRate        float64
	Z                  float64
	LastUpdate         time.Time
}

TaskReliability represents task execution statistics.

func GetTaskReliabilityScores

func GetTaskReliabilityScores(filter TaskReliabilityFilter) ([]TaskReliability, error)

GetTaskReliabilityScores queries the precomputed task statistics using a filter and then calculates the success reliability score from the lower bound wilson confidence interval. https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval.

type TaskReliabilityFilter

type TaskReliabilityFilter struct {
	taskstats.StatsFilter
	Significance float64
}

TaskReliabilityFilter represents search and aggregation parameters when querying task statistics.

func (TaskReliabilityFilter) BuildTaskStatsQueryGroupStage

func (filter TaskReliabilityFilter) BuildTaskStatsQueryGroupStage() bson.M

BuildTaskStatsQueryGroupStage creates an aggregation pipeline to query task statistics.

func (TaskReliabilityFilter) GetTaskStats

func (filter TaskReliabilityFilter) GetTaskStats() (taskStats []taskstats.TaskStats, err error)

GetTaskStats create an aggregation to find task stats matching the filter state.

func (*TaskReliabilityFilter) ValidateForTaskReliability

func (f *TaskReliabilityFilter) ValidateForTaskReliability() error

ValidateForTaskReliability validates that the StartAt struct is valid for use with task stats.

Jump to

Keyboard shortcuts

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