metrics

package
v0.0.0-...-8366d43 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Histogram

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

func NewHistogram

func NewHistogram(opts HistogramOptions) *Histogram

func (*Histogram) Collect

func (h *Histogram) Collect() map[string]int64

func (*Histogram) CountBeforeRotation

func (h *Histogram) CountBeforeRotation() int64

CountBeforeRotation is for testing

func (*Histogram) Observe

func (h *Histogram) Observe(duration time.Duration) error

type HistogramOptions

type HistogramOptions struct {
	Name        string
	Buckets     []float64
	MaxDuration time.Duration
}

type Statter

type Statter interface {
	Inc(metric string, value int64)
	Gauge(metric string, value int64)
	TimingDuration(metric string, value time.Duration)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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