sinks

package module
v0.0.0-...-22b8b0b Latest Latest
Warning

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

Go to latest
Published: May 23, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

README

go-metrics-sinks

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeStampedValue

type TimeStampedValue struct {
	Recorded time.Time
	Value    float32
}

func (*TimeStampedValue) String

func (tsv *TimeStampedValue) String() string

type ValueRing

type ValueRing struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewValueRing

func NewValueRing(maxValues int, maxAge time.Duration) *ValueRing

func (*ValueRing) Count

func (vr *ValueRing) Count() int

func (*ValueRing) Max

func (vr *ValueRing) Max() float32

func (*ValueRing) Mean

func (vr *ValueRing) Mean() float32

func (*ValueRing) Min

func (vr *ValueRing) Min() float32

func (*ValueRing) Stddev

func (vr *ValueRing) Stddev() float64

func (*ValueRing) Sum

func (vr *ValueRing) Sum() float64

func (*ValueRing) ToSlice

func (vr *ValueRing) ToSlice() []*TimeStampedValue

type WindowSink

type WindowSink struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewWindowSink

func NewWindowSink(maxAge time.Duration, maxValues int) *WindowSink

func (*WindowSink) AddSample

func (ws *WindowSink) AddSample(key []string, val float32)

Samples are for timing information, where quantiles are used

func (*WindowSink) EmitKey

func (ws *WindowSink) EmitKey(key []string, val float32)

Should emit a Key/Value pair for each call

func (*WindowSink) IncrCounter

func (ws *WindowSink) IncrCounter(key []string, val float32)

Counters should accumulate values

func (*WindowSink) Sample

func (ws *WindowSink) Sample(key []string) *ValueRing

func (*WindowSink) SetGauge

func (ws *WindowSink) SetGauge(key []string, val float32)

Jump to

Keyboard shortcuts

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