scalar

package
Version: v0.0.0-...-a69e935 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterMaps

type CounterMaps map[resourceKey]tally.Counter

CounterMaps wraps around a group of metrics which can be used for reporting scalar resources as a group of counter.

func NewCounterMaps

func NewCounterMaps(scope tally.Scope) CounterMaps

NewCounterMaps returns the CounterMaps initialized at given tally scope.

func (CounterMaps) Inc

func (g CounterMaps) Inc(resources Resources)

Inc increments all counters for given resources.

type GaugeMaps

type GaugeMaps map[resourceKey]tally.Gauge

GaugeMaps wraps around a group of metrics which can be used for reporting scalar resources as a group of gauges.

func NewGaugeMaps

func NewGaugeMaps(scope tally.Scope) GaugeMaps

NewGaugeMaps returns the GaugeMaps initialized at given tally scope.

func (GaugeMaps) Update

func (g GaugeMaps) Update(resources Resources)

Update updates all gauges from given resources.

type Resources

type Resources interface {
	GetCPU() float64
	GetMem() float64
	GetDisk() float64
	GetGPU() float64
}

Resources represents a scalar resource having CPU, Memory, Disk and GPU

Jump to

Keyboard shortcuts

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