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, passThreshold int) error
ValidateGpuCounters queries for the GPU counter from the trace and validates the value based on the associated check, up to the amount specified in passThreshold.
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.
type Validator ¶
type Validator interface { Validate(ctx context.Context, processor *perfetto.Processor) error GetCounters() []GpuCounter GetType() service.DeviceValidationResult_ValidatorType }
Validator is an interface implemented by the various hardware specific validators.