counters

package
v0.0.0-...-d8d43c0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DCGMExpClockEventsCount = "DCGM_EXP_CLOCK_EVENTS_COUNT"
	DCGMExpXIDErrorsCount   = "DCGM_EXP_XID_ERRORS_COUNT"
	DCGMExpGPUHealthStatus  = "DCGM_EXP_GPU_HEALTH_STATUS"
)

Variables

DCGMFields maps DCGMExporterMetric String to enum

Functions

func ReadCSVFile

func ReadCSVFile(filename string) ([][]string, error)

Types

type Counter

type Counter struct {
	FieldID   dcgm.Short
	FieldName string
	PromType  string
	Help      string
}

func (Counter) IsLabel

func (c Counter) IsLabel() bool

type CounterList

type CounterList []Counter

func (CounterList) LabelCounters

func (c CounterList) LabelCounters() CounterList

type CounterSet

type CounterSet struct {
	DCGMCounters     CounterList
	ExporterCounters CounterList
}

func ExtractCounters

func ExtractCounters(records [][]string, c *appconfig.Config) (*CounterSet, error)

func GetCounterSet

func GetCounterSet(c *appconfig.Config) (*CounterSet, error)

type ExporterCounter

type ExporterCounter uint16
const (
	DCGMFIUnknown        ExporterCounter = 0
	DCGMXIDErrorsCount   ExporterCounter = iota + 9000
	DCGMClockEventsCount ExporterCounter = iota + 9000
	DCGMGPUHealthStatus  ExporterCounter = iota + 9000
)

func IdentifyMetricType

func IdentifyMetricType(s string) (ExporterCounter, error)

func (ExporterCounter) String

func (enm ExporterCounter) String() string

String method to convert the enum value to a string

Jump to

Keyboard shortcuts

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