gpm

package
v0.0.1-alpha9 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package gpm tracks the NVIDIA per-GPU GPM metrics.

Index

Constants

View Source
const (
	StateNameGPM = "gpm"

	StateKeyGPMData           = "data"
	StateKeyGPMEncoding       = "encoding"
	StateValueGPMEncodingJSON = "json"
)
View Source
const Name = "accelerator-nvidia-gpm"

Variables

This section is empty.

Functions

func CreateGet

func CreateGet() query.GetFunc

DO NOT for-loop here the query.GetFunc is already called periodically in a loop by the poller

func New

Types

type Config

type Config struct {
	Query query_config.Config `json:"query"`
}

func ParseConfig

func ParseConfig(b any, db *sql.DB) (*Config, error)

func (Config) Validate

func (cfg Config) Validate() error

type Output

type Output struct {
	NVMLGPMEvent *nvidia_query_nvml.GPMEvent `json:"nvml_gpm_event,omitempty"`
}

func ParseOutputJSON

func ParseOutputJSON(data []byte) (*Output, error)

func ParseOutputYAML

func ParseOutputYAML(data []byte) (*Output, error)

func ParseStateGPM

func ParseStateGPM(m map[string]string) (*Output, error)

func ParseStatesToOutput

func ParseStatesToOutput(states ...components.State) (*Output, error)

func (*Output) Events

func (o *Output) Events() []components.Event

func (*Output) JSON

func (o *Output) JSON() ([]byte, error)

func (*Output) States

func (o *Output) States() ([]components.State, error)

func (*Output) YAML

func (o *Output) YAML() ([]byte, error)

Jump to

Keyboard shortcuts

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