Documentation ¶
Overview ¶
Package stability implements the test stability analysis used by the QueryStability RPC.
Index ¶
- func CreateQueryStabilityTestData(ctx context.Context) error
- func CreateSampleStabilityCriteria() *pb.TestStabilityCriteria
- func QueryStability(ctx context.Context, opts QueryStabilityOptions) ([]*pb.TestVariantStabilityAnalysis, error)
- func QueryStabilitySampleResponse() []*pb.TestVariantStabilityAnalysis
- func QueryStabilitySampleResponseLargeWindow() []*pb.TestVariantStabilityAnalysis
- type QueryStabilityOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateQueryStabilityTestData ¶
CreateQueryStabilityTestData creates test data in Spanner for testing QueryStability.
func CreateSampleStabilityCriteria ¶
func CreateSampleStabilityCriteria() *pb.TestStabilityCriteria
func QueryStability ¶
func QueryStability(ctx context.Context, opts QueryStabilityOptions) ([]*pb.TestVariantStabilityAnalysis, error)
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