model

package
v0.0.0-...-9dd33c3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package model contains the model for the GPU check, with types shared between the system-probe GPU probe and the gpu core agent check

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GPUStats

type GPUStats struct {
	Metrics []StatsTuple `json:"metrics"`
}

GPUStats contains the statistics generated by the system-probe GPU module, which are sent to the core agent. Contains an array of StatsTuple, where each entry is a tuple of a StatsKey and the corresponding UtilizationMetrics

type MemoryMetrics

type MemoryMetrics struct {
	CurrentBytes uint64 `json:"current_bytes"`
	MaxBytes     uint64 `json:"max_bytes"`
}

MemoryMetrics contains the memory stats for a given memory type

type StatsKey

type StatsKey struct {
	// PID is the process ID
	PID uint32 `json:"pid"`

	// DeviceUUID is the UUID of the device
	DeviceUUID string `json:"device_uuid"`

	// ContainerID is the ID of the container the process is running on
	ContainerID string `json:"container_id"`
}

StatsKey is the key used to identify a GPUStats object

type StatsTuple

type StatsTuple struct {
	Key                StatsKey
	UtilizationMetrics UtilizationMetrics
}

StatsTuple is a single entry in the GPUStats array, as we cannot use a complex key in the map

type UtilizationMetrics

type UtilizationMetrics struct {
	UtilizationPercentage float64       `json:"utilization_percentage"`
	Memory                MemoryMetrics `json:"memory"`
}

UtilizationMetrics contains the GPU stats for a given device and process

Jump to

Keyboard shortcuts

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