stability

package
v0.0.0-...-a70aae3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package stability implements the test stability analysis used by the QueryStability RPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateQueryStabilityTestData

func CreateQueryStabilityTestData(ctx context.Context) error

CreateQueryStabilityTestData creates test data in Spanner for testing QueryStability.

func CreateSampleStabilityCriteria

func CreateSampleStabilityCriteria() *pb.TestStabilityCriteria

func QueryStability

QueryStability queries the stability of nominated test variants. Used to inform exoneration decisions.

Must be called in a Spanner transactional context. Context must support multiple reads (i.e. NOT spanner.Single()) as request may batched over multiple reads.

func QueryStabilitySampleResponse

func QueryStabilitySampleResponse() []*pb.TestVariantStabilityAnalysis

QueryStabilitySampleResponse returns expected response data from QueryFailureRate after being invoked with QueryFailureRateSampleRequest. It is assumed test data was setup with CreateQueryFailureRateTestData.

func QueryStabilitySampleResponseLargeWindow

func QueryStabilitySampleResponseLargeWindow() []*pb.TestVariantStabilityAnalysis

QueryStabilitySampleResponseLargeWindow is the expected response from QueryStability for FlakeRate.MinWindow = 100.

Types

type QueryStabilityOptions

type QueryStabilityOptions struct {
	// Project is the LUCI Project to query.
	Project string
	// SubRealms are the project-scoped realms (of the form "ci",
	// NOT "chromium:ci") within the project to query.
	SubRealms []string
	// TestVariantPositions are the test variant positions to query.
	TestVariantPositions []*pb.QueryTestVariantStabilityRequest_TestVariantPosition
	// The test stability criteria to apply.
	Criteria *pb.TestStabilityCriteria
	// AsAtTime is latest parititon time to include in the results;
	// outside of testing contexts, this should be the current time.
	// QueryTestVariants returns data for the 14 day period leading
	// up to this time.
	AsAtTime time.Time
}

QueryStabilityOptions specifies options for QueryStability().

func QueryStabilitySampleRequest

func QueryStabilitySampleRequest() QueryStabilityOptions

Jump to

Keyboard shortcuts

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