validate

package
v3.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTrackIDs

func GetTrackIDs(ctx context.Context, s Scope, processor *perfetto.Processor) ([]int64, error)

GetTrackIDs returns all track ids from gpu_track with the given scope.

func IsNumber

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

func ValidateGpuSlices(ctx context.Context, processor *perfetto.Processor) error

ValidateGpuSlices validates gpu slices, returns nil if all validation passes.

func ValidateVulkanEvents

func ValidateVulkanEvents(ctx context.Context, processor *perfetto.Processor) error

ValidateVulkanEvents validates vulkan events slices, returns nil if all validation passes.

Types

type Checker

Checker is a function that checks the validity of the values of the given result set column.

func And

func And(cs ...Checker) Checker

And returns a checker that is only valid if all of its arguments are.

func Average

func Average(check func(float64) bool) Checker

Average returns a checker that checks whether the average values meets the condition

func CheckAllEqualTo

func CheckAllEqualTo(num float64) Checker

CheckAllEqualTo returns a checker that checks that all returned value equal the given value.

func CheckAverageApproximateTo

func CheckAverageApproximateTo(num, margin float64) Checker

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

func ForeachValue(check func(float64) bool) Checker

func Not

func Not(c Checker) Checker

Not returns a checker that returns the inverse of the given checker.

type GpuCounter

type GpuCounter struct {
	Id    uint32
	Name  string
	Check Checker
}

GpuCounter represents a GPU counter for which the profiling data is validated.

type Scope

type Scope string

type Validator

type Validator interface {
	Validate(ctx context.Context, processor *perfetto.Processor) error
	GetCounters() []GpuCounter
}

Validator is an interface implemented by the various hardware specific validators.

Jump to

Keyboard shortcuts

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