metrics

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric added in v0.1.0

type Metric struct {
	Name        string
	Description string
	Format      string
	Unit        string
}

func AvailableMetrics added in v0.3.0

func AvailableMetrics() []Metric

func AvailableProcMetrics added in v0.5.0

func AvailableProcMetrics() []Metric

type Metrics added in v0.1.0

type Metrics struct {
	sync.Map
	// contains filtered or unexported fields
}

Metrics struct

func GetMetrics added in v0.4.0

func GetMetrics(interval time.Duration, pid int32) (*Metrics, error)

GetMetrics returns metrics

func NewMetrics added in v0.1.0

func NewMetrics(interval time.Duration) *Metrics

NewMetrics returns *Metrics

func (*Metrics) Collect added in v0.3.0

func (m *Metrics) Collect() error

func (*Metrics) Each added in v0.1.0

func (m *Metrics) Each(f func(metric Metric, value interface{}))

Each returns ordered metrics

func (*Metrics) Format added in v0.1.0

func (m *Metrics) Format(key string) string

func (*Metrics) Raw added in v0.1.1

func (m *Metrics) Raw() map[string]interface{}

Raw returns raw metrics map

func (*Metrics) SetProcPID added in v0.5.0

func (m *Metrics) SetProcPID(pid int32) error

Jump to

Keyboard shortcuts

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