metrics

package
v0.0.0-...-12b6520 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	// contains filtered or unexported fields
}

Simple incrementing and decrementing 64-bit integer:

func NewCounter

func NewCounter() *Counter

func (*Counter) Dec

func (c *Counter) Dec()

Decrements the counter.

func (*Counter) Get

func (c *Counter) Get() int64

func (*Counter) Inc

func (c *Counter) Inc()

Increments the counter.

type FloatGauge

type FloatGauge struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewFloatGauge

func NewFloatGauge() *FloatGauge

func (*FloatGauge) Get

func (c *FloatGauge) Get() float64

func (*FloatGauge) Set

func (c *FloatGauge) Set(v float64) *FloatGauge

type Histogram

type Histogram struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewHistogram

func NewHistogram() *Histogram

func (*Histogram) Record

func (s *Histogram) Record(v int64)

func (*Histogram) Snapshot

func (s *Histogram) Snapshot() *Snapshot

type IntGauge

type IntGauge struct {
	// contains filtered or unexported fields
}

func NewIntGauge

func NewIntGauge() *IntGauge

func (*IntGauge) Get

func (c *IntGauge) Get() int64

func (*IntGauge) Set

func (c *IntGauge) Set(v int64) *IntGauge

type IntGaugeSet

type IntGaugeSet struct {
	sync.Mutex

	Header []string
	// contains filtered or unexported fields
}

func NewIntGaugeSet

func NewIntGaugeSet(header ...string) *IntGaugeSet

func (*IntGaugeSet) Get

func (g *IntGaugeSet) Get() []int64

func (*IntGaugeSet) Set

func (g *IntGaugeSet) Set(v ...int64)

type Snapshot

type Snapshot struct {
	// contains filtered or unexported fields
}

func (*Snapshot) Count

func (s *Snapshot) Count() int64

func (*Snapshot) Quantile

func (s *Snapshot) Quantile(quantiles ...float64) []float64

Estimate the qth quantile value of the snapshot. The input value of q should be in the range [0.0, 1.0]; if it is outside that range, it will be clipped into it automatically.

Jump to

Keyboard shortcuts

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