summarizer

package
v0.0.73 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package summarizer provides a method to read state protos defined in a config an output summary protos.

Index

Constants

View Source
const (

	// DefaultInterval is the default number of days of analysis
	DefaultInterval = 7
)

Variables

This section is empty.

Functions

func CalculateHealthiness added in v0.0.13

func CalculateHealthiness(grid *statepb.Grid, startTime int, endTime int, tab string) *summarypb.HealthinessInfo

CalculateHealthiness extracts the test run data from each row (which represents a test) of the Grid and then analyzes it with an implementation of flakinessAnalyzer, which has implementations in the subdir naive and can be injected as needed.

func CalculateTrend added in v0.0.14

func CalculateTrend(currentHealthiness, previousHealthiness *summarypb.HealthinessInfo)

CalculateTrend populates the ChangeFromLastInterval fields of each TestInfo by comparing the current flakiness to the flakiness calculated for the last interval. Interval length is a config value that is 7 days by default. The Trend enum defaults to UNKNOWN, so there is no need to explicitly assign UNKNOWN when a test appears in currentHealthiness but not in previousHealthiness.

func Update

func Update(ctx context.Context, client gcs.ConditionalClient, mets *Metrics, configPath gcs.Path, concurrency int, dashboard, gridPathPrefix, summaryPathPrefix string, confirm bool) error

Update summary protos by reading the state protos defined in the config.

Will use concurrency go routines to update dashboards in parallel. Setting dashboard will limit update to this dashboard. Will write summary proto when confirm is set.

Types

type Metrics added in v0.0.72

type Metrics struct {
	Successes metrics.Counter
	Errors    metrics.Counter
}

Metrics holds metrics relevant to the Updater.

func (*Metrics) Error added in v0.0.73

func (mets *Metrics) Error()

Error increments the counter for failed updates.

func (*Metrics) Success added in v0.0.73

func (mets *Metrics) Success()

Success increments the counter for successful updates.

Directories

Path Synopsis
Package analyzers represents ways to analyze healthiness and flakiness of tests Package analyzers represents ways to analyze healthiness and flakiness of tests
Package analyzers represents ways to analyze healthiness and flakiness of tests Package analyzers represents ways to analyze healthiness and flakiness of tests

Jump to

Keyboard shortcuts

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