changepointspb

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SegmentState_name = map[int32]string{
		0: "SEGMENT_STATE_UNSPECIFIED",
		1: "ACTIVE",
		2: "FINALIZING",
		3: "FINALIZED",
	}
	SegmentState_value = map[string]int32{
		"SEGMENT_STATE_UNSPECIFIED": 0,
		"ACTIVE":                    1,
		"FINALIZING":                2,
		"FINALIZED":                 3,
	}
)

Enum value maps for SegmentState.

View Source
var File_go_chromium_org_luci_analysis_internal_changepoints_proto_spanner_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Counts

type Counts struct {

	// The number of unexpected non-skipped test results.
	UnexpectedResults int64 `protobuf:"varint,1,opt,name=unexpected_results,json=unexpectedResults,proto3" json:"unexpected_results,omitempty"`
	// The total number of non-skipped test results.
	TotalResults int64 `protobuf:"varint,2,opt,name=total_results,json=totalResults,proto3" json:"total_results,omitempty"`
	// The number of expected passed test results.
	ExpectedPassedResults int64 `` /* 128-byte string literal not displayed */
	// The number of expected failed test results.
	ExpectedFailedResults int64 `` /* 128-byte string literal not displayed */
	// The number of expected crashed test results.
	ExpectedCrashedResults int64 `` /* 131-byte string literal not displayed */
	// The number of expected aborted test results.
	ExpectedAbortedResults int64 `` /* 131-byte string literal not displayed */
	// The number of unexpected passed test results.
	UnexpectedPassedResults int64 `` /* 134-byte string literal not displayed */
	// The number of unexpected failed test results.
	UnexpectedFailedResults int64 `` /* 134-byte string literal not displayed */
	// The number of unexpected crashed test results.
	UnexpectedCrashedResults int64 `` /* 137-byte string literal not displayed */
	// The number of unexpected aborted test results.
	UnexpectedAbortedResults int64 `` /* 137-byte string literal not displayed */
	// The number of test runs which had an unexpected test result but were
	// not retried.
	UnexpectedUnretriedRuns int64 `` /* 133-byte string literal not displayed */
	// The number of test run which had an unexpected test result, were
	// retried, and still contained only unexpected test results.
	UnexpectedAfterRetryRuns int64 `` /* 138-byte string literal not displayed */
	// The number of test runs which had an unexpected test result, were
	// retried, and eventually recorded an expected test result.
	FlakyRuns int64 `protobuf:"varint,5,opt,name=flaky_runs,json=flakyRuns,proto3" json:"flaky_runs,omitempty"`
	// The total number of test runs.
	TotalRuns int64 `protobuf:"varint,6,opt,name=total_runs,json=totalRuns,proto3" json:"total_runs,omitempty"`
	// The number of source verdicts which had only unexpected test results.
	// Excludes partial_source_verdict (if any).
	UnexpectedSourceVerdicts int64 `` /* 136-byte string literal not displayed */
	// The number of source verdicts that had both unexpected and expected
	// test results.
	// Excludes partial_source_verdict (if any).
	FlakySourceVerdicts int64 `protobuf:"varint,8,opt,name=flaky_source_verdicts,json=flakySourceVerdicts,proto3" json:"flaky_source_verdicts,omitempty"`
	// The total number of source verdicts.
	// Excludes partial_source_verdict (if any).
	TotalSourceVerdicts int64 `protobuf:"varint,9,opt,name=total_source_verdicts,json=totalSourceVerdicts,proto3" json:"total_source_verdicts,omitempty"`
	// Statistics about the last (partial) source verdict evicted from
	// the input buffer (if any).
	// As not all results at the source position may have been evicted
	// in one go, it is stored separately here in an incomplete state
	// until the segment is finalized.
	PartialSourceVerdict *PartialSourceVerdict `protobuf:"bytes,18,opt,name=partial_source_verdict,json=partialSourceVerdict,proto3" json:"partial_source_verdict,omitempty"`
	// contains filtered or unexported fields
}

All exclude the effect of skipped test results. Next ID: 19

func (*Counts) Descriptor deprecated

func (*Counts) Descriptor() ([]byte, []int)

Deprecated: Use Counts.ProtoReflect.Descriptor instead.

func (*Counts) GetExpectedAbortedResults

func (x *Counts) GetExpectedAbortedResults() int64

func (*Counts) GetExpectedCrashedResults

func (x *Counts) GetExpectedCrashedResults() int64

func (*Counts) GetExpectedFailedResults

func (x *Counts) GetExpectedFailedResults() int64

func (*Counts) GetExpectedPassedResults

func (x *Counts) GetExpectedPassedResults() int64

func (*Counts) GetFlakyRuns

func (x *Counts) GetFlakyRuns() int64

func (*Counts) GetFlakySourceVerdicts

func (x *Counts) GetFlakySourceVerdicts() int64

func (*Counts) GetPartialSourceVerdict

func (x *Counts) GetPartialSourceVerdict() *PartialSourceVerdict

func (*Counts) GetTotalResults

func (x *Counts) GetTotalResults() int64

func (*Counts) GetTotalRuns

func (x *Counts) GetTotalRuns() int64

func (*Counts) GetTotalSourceVerdicts

func (x *Counts) GetTotalSourceVerdicts() int64

func (*Counts) GetUnexpectedAbortedResults

func (x *Counts) GetUnexpectedAbortedResults() int64

func (*Counts) GetUnexpectedAfterRetryRuns

func (x *Counts) GetUnexpectedAfterRetryRuns() int64

func (*Counts) GetUnexpectedCrashedResults

func (x *Counts) GetUnexpectedCrashedResults() int64

func (*Counts) GetUnexpectedFailedResults

func (x *Counts) GetUnexpectedFailedResults() int64

func (*Counts) GetUnexpectedPassedResults

func (x *Counts) GetUnexpectedPassedResults() int64

func (*Counts) GetUnexpectedResults

func (x *Counts) GetUnexpectedResults() int64

func (*Counts) GetUnexpectedSourceVerdicts

func (x *Counts) GetUnexpectedSourceVerdicts() int64

func (*Counts) GetUnexpectedUnretriedRuns

func (x *Counts) GetUnexpectedUnretriedRuns() int64

func (*Counts) ProtoMessage

func (*Counts) ProtoMessage()

func (*Counts) ProtoReflect

func (x *Counts) ProtoReflect() protoreflect.Message

func (*Counts) Reset

func (x *Counts) Reset()

func (*Counts) String

func (x *Counts) String() string

type PartialSourceVerdict

type PartialSourceVerdict struct {

	// The source position.
	CommitPosition int64 `protobuf:"varint,1,opt,name=commit_position,json=commitPosition,proto3" json:"commit_position,omitempty"`
	// The most recent hour at which a result was recorded for this commit
	// position.
	LastHour *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_hour,json=lastHour,proto3" json:"last_hour,omitempty"`
	// The number of unexpected test results at this commit position (so far).
	UnexpectedResults int64 `protobuf:"varint,3,opt,name=unexpected_results,json=unexpectedResults,proto3" json:"unexpected_results,omitempty"`
	// The number of test results at this commit position (so far).
	ExpectedResults int64 `protobuf:"varint,4,opt,name=expected_results,json=expectedResults,proto3" json:"expected_results,omitempty"`
	// contains filtered or unexported fields
}

Statistics about a source verdict. A source verdict comprises all test results at a commit postiion.

func (*PartialSourceVerdict) Descriptor deprecated

func (*PartialSourceVerdict) Descriptor() ([]byte, []int)

Deprecated: Use PartialSourceVerdict.ProtoReflect.Descriptor instead.

func (*PartialSourceVerdict) GetCommitPosition

func (x *PartialSourceVerdict) GetCommitPosition() int64

func (*PartialSourceVerdict) GetExpectedResults

func (x *PartialSourceVerdict) GetExpectedResults() int64

func (*PartialSourceVerdict) GetLastHour

func (x *PartialSourceVerdict) GetLastHour() *timestamppb.Timestamp

func (*PartialSourceVerdict) GetUnexpectedResults

func (x *PartialSourceVerdict) GetUnexpectedResults() int64

func (*PartialSourceVerdict) ProtoMessage

func (*PartialSourceVerdict) ProtoMessage()

func (*PartialSourceVerdict) ProtoReflect

func (x *PartialSourceVerdict) ProtoReflect() protoreflect.Message

func (*PartialSourceVerdict) Reset

func (x *PartialSourceVerdict) Reset()

func (*PartialSourceVerdict) String

func (x *PartialSourceVerdict) String() string

type Segment

type Segment struct {

	// The state of the segment.
	// Only finalizing or finalized segments will be stored in spanner.
	State SegmentState `protobuf:"varint,1,opt,name=state,proto3,enum=luci.analysis.internal.changepoints.SegmentState" json:"state,omitempty"`
	// If set, means the start of the segment is as a result of a change point
	// being identified.
	// If unset, means the segment started because this was the first result in
	// the known history of the test.
	HasStartChangepoint bool `protobuf:"varint,2,opt,name=has_start_changepoint,json=hasStartChangepoint,proto3" json:"has_start_changepoint,omitempty"`
	// The earliest commit position included in the segment.
	StartPosition int64 `protobuf:"varint,3,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"`
	// The earliest hour a run with the given start_position was recorded.
	StartHour *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_hour,json=startHour,proto3" json:"start_hour,omitempty"`
	// The end commit position of the segment.
	// If set, the invariant end_position >= start_position holds.
	EndPosition int64 `protobuf:"varint,5,opt,name=end_position,json=endPosition,proto3" json:"end_position,omitempty"`
	// The latest hour a run with the last commit position in the segment
	// was recorded.
	EndHour *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=end_hour,json=endHour,proto3" json:"end_hour,omitempty"`
	// The lower bound of the change point position at the start of the segment
	// in a 99% two-tailed confidence interval. Inclusive.
	// Only set if has_start_changepoint is set. If set, the invariant
	// previous_segment.start_position <= start_position_lower_bound_99th <= start_position_upper_bound_99th
	// holds.
	StartPositionLowerBound_99Th int64 `` /* 149-byte string literal not displayed */
	// The upper bound of the change point position at the start of the segment
	// in a 99% two-tailed confidence interval. Inclusive.
	// Only set if has_start_changepoint is set. If set, the invariant
	// start_position_lower_bound_99th <= start_position_upper_bound_99th <= end_position
	// holds.
	StartPositionUpperBound_99Th int64 `` /* 149-byte string literal not displayed */
	// The hour the most recent run with an unexpected test result
	// was produced. *Only* captures the most recent hour for runs
	// that are no longer in the input buffer. Used to set
	// has_recent_unexpected_results on the output.
	MostRecentUnexpectedResultHour *timestamppb.Timestamp `` /* 157-byte string literal not displayed */
	// Finalized counts for the segment. Note that this should
	// *only* capture counts for runs that are no longer in
	// the input buffer.
	// Counts for runs in the input buffer can be obtained from the input
	// buffer.
	FinalizedCounts *Counts `protobuf:"bytes,10,opt,name=finalized_counts,json=finalizedCounts,proto3" json:"finalized_counts,omitempty"`
	// Serialized representation of model.PositionDistribution,
	// the distribution of possible changepoint start positions.
	//
	// Only in the serialized representation, after the first
	// position only position deltas are stored, i.e.
	// start_position_distribution[0] = StartPositionDistribution[0],
	// start_position_distribution[1] =
	//
	//	StartPositionDistribution[1] - StartPositionDistribution[0],
	//
	// start_position_distribution[2] =
	//
	//	StartPositionDistribution[2] - StartPositionDistribution[1], etc.
	//
	// Proto varint encodings are shorter for small integers, and more
	// importantly, ZStd compresses small integers very well.
	//
	// Only set if has_start_changepoint is set.
	StartPositionDistribution []int64 `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

Segment stores the finalized parts of finalizing and finalized segments in Spanner. Finalized segments will be stored in full. Only the finalized part of a finalizing segment will be stored. The unfinalized parts of segments can be computed from the input buffer.

func (*Segment) Descriptor deprecated

func (*Segment) Descriptor() ([]byte, []int)

Deprecated: Use Segment.ProtoReflect.Descriptor instead.

func (*Segment) GetEndHour

func (x *Segment) GetEndHour() *timestamppb.Timestamp

func (*Segment) GetEndPosition

func (x *Segment) GetEndPosition() int64

func (*Segment) GetFinalizedCounts

func (x *Segment) GetFinalizedCounts() *Counts

func (*Segment) GetHasStartChangepoint

func (x *Segment) GetHasStartChangepoint() bool

func (*Segment) GetMostRecentUnexpectedResultHour

func (x *Segment) GetMostRecentUnexpectedResultHour() *timestamppb.Timestamp

func (*Segment) GetStartHour

func (x *Segment) GetStartHour() *timestamppb.Timestamp

func (*Segment) GetStartPosition

func (x *Segment) GetStartPosition() int64

func (*Segment) GetStartPositionDistribution

func (x *Segment) GetStartPositionDistribution() []int64

func (*Segment) GetStartPositionLowerBound_99Th

func (x *Segment) GetStartPositionLowerBound_99Th() int64

func (*Segment) GetStartPositionUpperBound_99Th

func (x *Segment) GetStartPositionUpperBound_99Th() int64

func (*Segment) GetState

func (x *Segment) GetState() SegmentState

func (*Segment) ProtoMessage

func (*Segment) ProtoMessage()

func (*Segment) ProtoReflect

func (x *Segment) ProtoReflect() protoreflect.Message

func (*Segment) Reset

func (x *Segment) Reset()

func (*Segment) String

func (x *Segment) String() string

type SegmentState

type SegmentState int32
const (
	SegmentState_SEGMENT_STATE_UNSPECIFIED SegmentState = 0
	// Both the start and end commit positions of the segment are the result
	// of analysis on the current input buffer.
	SegmentState_ACTIVE SegmentState = 1
	// The end commit position of the segment is the result of analysis on the
	// current input buffer, but the start commit position is the result of
	// past analysis.
	SegmentState_FINALIZING SegmentState = 2
	// Both the start and end commit positions of the segment are the result
	// of past analysis.
	SegmentState_FINALIZED SegmentState = 3
)

func (SegmentState) Descriptor

func (SegmentState) Enum

func (x SegmentState) Enum() *SegmentState

func (SegmentState) EnumDescriptor deprecated

func (SegmentState) EnumDescriptor() ([]byte, []int)

Deprecated: Use SegmentState.Descriptor instead.

func (SegmentState) Number

func (SegmentState) String

func (x SegmentState) String() string

func (SegmentState) Type

type Segments

type Segments struct {

	// Segments, in ascending commit position order (oldest segment first).
	Segments []*Segment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"`
	// contains filtered or unexported fields
}

Segments is used to store the finalized segments in Spanner.

func (*Segments) Descriptor deprecated

func (*Segments) Descriptor() ([]byte, []int)

Deprecated: Use Segments.ProtoReflect.Descriptor instead.

func (*Segments) GetSegments

func (x *Segments) GetSegments() []*Segment

func (*Segments) ProtoMessage

func (*Segments) ProtoMessage()

func (*Segments) ProtoReflect

func (x *Segments) ProtoReflect() protoreflect.Message

func (*Segments) Reset

func (x *Segments) Reset()

func (*Segments) String

func (x *Segments) String() string

type Statistics

type Statistics struct {

	// Statistics by partition time hour. Stored in ascending order (oldest
	// hour first).
	//
	// Retained for 11 days (as 1 + 3 + 7 days):
	//   - 1 day to support the functional requirement of calculating flakiness
	//     using data from up to the last 24 hours.
	//   - 3 days to account for the fact that some builds may be long-running
	//     and could take up to 3 days to complete, so we need flakiness as at
	//     a partition time of up to 3 days ago.
	//   - 7 days to allow time to respond to operational incidents that involve
	//     delayed or stuck ingestion tasks, without losing data.
	HourlyBuckets []*Statistics_HourBucket `protobuf:"bytes,1,rep,name=hourly_buckets,json=hourlyBuckets,proto3" json:"hourly_buckets,omitempty"`
	// Statistics about the last (partial) source verdict evicted from
	// the input buffer (if any).
	// As not all test runs at the source position may have been evicted
	// in one go, they are accumulated separately here until the source
	// verdict is complete and it can be merged into an hour bucket.
	PartialSourceVerdict *PartialSourceVerdict `protobuf:"bytes,2,opt,name=partial_source_verdict,json=partialSourceVerdict,proto3" json:"partial_source_verdict,omitempty"`
	// contains filtered or unexported fields
}

Store statistics about runs evicted from the input buffer in Spanner.

Purpose is described in go/luci-analysis-test-variant-analysis-in-clusters.

Statistics about runs not yet evicted from the input buffer are not stored here because they can be computed directly from the input buffer. This means this proto only needs to be updated in Spanner when runs are evicted from the input buffer (approximately every 1/100 run ingestions), rather than on every run ingestion, reducing the number of writes required.

func (*Statistics) Descriptor deprecated

func (*Statistics) Descriptor() ([]byte, []int)

Deprecated: Use Statistics.ProtoReflect.Descriptor instead.

func (*Statistics) GetHourlyBuckets

func (x *Statistics) GetHourlyBuckets() []*Statistics_HourBucket

func (*Statistics) GetPartialSourceVerdict

func (x *Statistics) GetPartialSourceVerdict() *PartialSourceVerdict

func (*Statistics) ProtoMessage

func (*Statistics) ProtoMessage()

func (*Statistics) ProtoReflect

func (x *Statistics) ProtoReflect() protoreflect.Message

func (*Statistics) Reset

func (x *Statistics) Reset()

func (*Statistics) String

func (x *Statistics) String() string

type Statistics_HourBucket

type Statistics_HourBucket struct {

	// The hour of the verdict's partition time.
	// This is the partition time, as the number of seconds since January 1, 1970 UTC
	// (i.e. as a unix timestamp), divided by 3600.
	Hour int64 `protobuf:"varint,1,opt,name=hour,proto3" json:"hour,omitempty"`
	// The number of source verdicts with only unexpected test results (excluding skips).
	UnexpectedSourceVerdicts int64 `` /* 136-byte string literal not displayed */
	// The number of source verdicts with a mix of expected and unexpected test results
	// (excluding skips.)
	FlakySourceVerdicts int64 `protobuf:"varint,3,opt,name=flaky_source_verdicts,json=flakySourceVerdicts,proto3" json:"flaky_source_verdicts,omitempty"`
	// The total number of source verdicts.
	TotalSourceVerdicts int64 `protobuf:"varint,4,opt,name=total_source_verdicts,json=totalSourceVerdicts,proto3" json:"total_source_verdicts,omitempty"`
	// contains filtered or unexported fields
}

func (*Statistics_HourBucket) Descriptor deprecated

func (*Statistics_HourBucket) Descriptor() ([]byte, []int)

Deprecated: Use Statistics_HourBucket.ProtoReflect.Descriptor instead.

func (*Statistics_HourBucket) GetFlakySourceVerdicts

func (x *Statistics_HourBucket) GetFlakySourceVerdicts() int64

func (*Statistics_HourBucket) GetHour

func (x *Statistics_HourBucket) GetHour() int64

func (*Statistics_HourBucket) GetTotalSourceVerdicts

func (x *Statistics_HourBucket) GetTotalSourceVerdicts() int64

func (*Statistics_HourBucket) GetUnexpectedSourceVerdicts

func (x *Statistics_HourBucket) GetUnexpectedSourceVerdicts() int64

func (*Statistics_HourBucket) ProtoMessage

func (*Statistics_HourBucket) ProtoMessage()

func (*Statistics_HourBucket) ProtoReflect

func (x *Statistics_HourBucket) ProtoReflect() protoreflect.Message

func (*Statistics_HourBucket) Reset

func (x *Statistics_HourBucket) Reset()

func (*Statistics_HourBucket) String

func (x *Statistics_HourBucket) String() string

Jump to

Keyboard shortcuts

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