metric

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MessageCounter measures number of messages.
	MessageCounter = "Messages"
	// SampleCounter measures number of samples.
	SampleCounter = "Samples"
	// LatencyCounter measures latency between processing calls.
	LatencyCounter = "Latency"
	// DurationCounter counts what's the duration of signal.
	DurationCounter = "Duration"
	// ComponentCounter counts number of calls.
	ComponentCounter = "Components"
)

Variables

This section is empty.

Functions

func Get added in v0.5.0

func Get(component interface{}) map[string]string

Get metrics values for provided component type.

func GetAll added in v0.5.0

func GetAll() map[string]map[string]string

GetAll returns counters for all measured components.

Types

type MeasureFunc added in v0.5.0

type MeasureFunc func(bufferSize int)

MeasureFunc captures metrics when buffer is processed.

type ResetFunc added in v0.5.0

type ResetFunc func() MeasureFunc

ResetFunc returns new Measure closure. This closure is needed to postpone metrics capture until component is actually running.

func Meter

func Meter(component interface{}, sampleRate signal.SampleRate) ResetFunc

Meter creates new meter closure to capture component counters.

Jump to

Keyboard shortcuts

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