validate

package
v0.0.0-...-6c7272e Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLargerThanZero

CheckLargerThanZero is a checker that checks that the values are all greater than zero.

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(c1, c2 Checker) Checker

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

func CheckApproximateTo

func CheckApproximateTo(num, err float64) Checker

CheckApproximateTo returns a checker that checks that values are within a margin of the given value.

func CheckEqualTo

func CheckEqualTo(num float64) Checker

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

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