Documentation ¶
Index ¶
- Constants
- Variables
- func BuildFQNameAndMultiplier(prefix string, rField RField) (string, float64)
- func BuildQFieldToMetricInfoMap(prefix string, qFieldtoRFieldMap map[QField]RField) map[QField]MetricInfo
- func QFieldSliceToStringSlice(qs []QField) []string
- func TransformRawValue(rawValue string, valueMultiplier float64) (float64, error)
- type Cell
- type GPUExporter
- type MetricInfo
- type QField
- type RField
- type Row
- type Table
Constants ¶
View Source
const ( DefaultPrefix = "nvidia_smi" DefaultNvidiaSmiCommand = "nvidia-smi" )
View Source
const (
DefaultQField = qFieldsAuto
)
Variables ¶
View Source
var ( ErrUnexpectedQueryField = errors.New("unexpected query field") ErrParseNumber = errors.New("could not parse number from value") )
View Source
var ErrFieldCountMismatch = fmt.Errorf("field count mismatch")
View Source
var (
ErrNoQueryFields = errors.New("could not extract any query fields")
)
Functions ¶
func BuildFQNameAndMultiplier ¶ added in v1.1.0
func BuildQFieldToMetricInfoMap ¶ added in v1.1.0
func BuildQFieldToMetricInfoMap(prefix string, qFieldtoRFieldMap map[QField]RField) map[QField]MetricInfo
func QFieldSliceToStringSlice ¶ added in v0.1.7
Types ¶
type GPUExporter ¶ added in v0.5.0
type GPUExporter struct { Command runCmd // contains filtered or unexported fields }
GPUExporter collects stats and exports them using the prometheus metrics package.
func (*GPUExporter) Collect ¶ added in v0.5.0
func (e *GPUExporter) Collect(metricCh chan<- prometheus.Metric)
Collect fetches the stats and delivers them as Prometheus metrics. It implements prometheus.Collector.
func (*GPUExporter) Describe ¶ added in v0.5.0
func (e *GPUExporter) Describe(ch chan<- *prometheus.Desc)
Describe describes all the metrics ever exported by the exporter. It implements prometheus.Collector.
type MetricInfo ¶
type MetricInfo struct { MType prometheus.ValueType ValueMultiplier float64 // contains filtered or unexported fields }
func BuildMetricInfo ¶ added in v1.1.0
func BuildMetricInfo(prefix string, rField RField) MetricInfo
type QField ¶ added in v1.1.0
type QField string
QField stands for query field - the field name before the query.
func ExtractQFields ¶ added in v1.1.0
func ParseAutoQFields ¶ added in v0.1.7
type RField ¶ added in v1.1.0
type RField string
RField stands for returned field - the field name as returned by the nvidia-smi.
Click to show internal directories.
Click to hide internal directories.