Documentation ¶
Index ¶
- func GetTrackIDs(ctx context.Context, s Scope, processor *perfetto.Processor) ([]int64, error)
- func IsNumber(column *perfetto_service.QueryResult_ColumnValues, ...) bool
- func ValidateGpuCounters(ctx context.Context, processor *perfetto.Processor, counters []GpuCounter) error
- func ValidateGpuSlices(ctx context.Context, processor *perfetto.Processor) error
- func ValidateVulkanEvents(ctx context.Context, processor *perfetto.Processor) error
- type Checker
- func And(cs ...Checker) Checker
- func Average(check func(float64) bool) Checker
- func CheckAllEqualTo(num float64) Checker
- func CheckAverageApproximateTo(num, margin float64) Checker
- func CheckLargerThanZero() Checker
- func CheckNonNegative() Checker
- func ForeachValue(check func(float64) bool) Checker
- func Not(c Checker) Checker
- type GpuCounter
- type Scope
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTrackIDs ¶
GetTrackIDs returns all track ids from gpu_track with the given scope.
func IsNumber ¶
func IsNumber(column *perfetto_service.QueryResult_ColumnValues, columnType perfetto_service.QueryResult_ColumnDesc_Type) bool
IsNumber is a checker that checks that the column is a number type.
func ValidateGpuCounters ¶
func ValidateGpuCounters(ctx context.Context, processor *perfetto.Processor, counters []GpuCounter) error
ValidateGpuCounters validates the GPU counters. GPU counters validation will fail in the below cases: 1. Fail to query 2. Missing GPU counter samples 3. Fail to check
func ValidateGpuSlices ¶
ValidateGpuSlices validates gpu slices, returns nil if all validation passes.
Types ¶
type Checker ¶
type Checker func(column *perfetto_service.QueryResult_ColumnValues, columnType perfetto_service.QueryResult_ColumnDesc_Type) bool
Checker is a function that checks the validity of the values of the given result set column.
func CheckAllEqualTo ¶
CheckAllEqualTo returns a checker that checks that all returned value equal the given value.
func CheckAverageApproximateTo ¶
CheckAverageApproximateTo checks whether the average of the values is within a margin of the given value.
func CheckLargerThanZero ¶
func CheckLargerThanZero() Checker
CheckLargerThanZero is a checker that checks that the values are all greater than zero.
func CheckNonNegative ¶
func CheckNonNegative() Checker
CheckNonNegative is a checker that checks that no value is less than zero.
func ForeachValue ¶
type GpuCounter ¶
GpuCounter represents a GPU counter for which the profiling data is validated.