Documentation ¶
Overview ¶
Package reliability models task reliability statistics.
Index ¶
Constants ¶
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.