Versions in this module Expand all Collapse all v1 v1.0.3 Feb 11, 2020 Changes in this version type Monitor — darwin/amd64, linux/amd64, windows/amd64 + func (m *Monitor) Range(f func(*Metric) bool) v1.0.2 Feb 10, 2020 Changes in this version + type Bin struct + Count int + Lower int32 + Upper int32 type Metric — darwin/amd64, linux/amd64, windows/amd64 + func (m *Metric) Histogram(bins ...int) []Bin v1.0.1 Nov 8, 2018 v1.0.0 Oct 20, 2018 Changes in this version + type Measurer interface — darwin/amd64, linux/amd64, windows/amd64 + Measure func(name string, value int32) + MeasureElapsed func(name string, start time.Time) + MeasureRuntime func() + Tag func(name, tag string) + type Metric struct — darwin/amd64, linux/amd64, windows/amd64 + func NewMetric(name string) *Metric + func (m *Metric) Count() int + func (m *Metric) Max() int + func (m *Metric) Mean() float64 + func (m *Metric) Min() int + func (m *Metric) Name() string + func (m *Metric) Quantile(quantiles ...float64) []float64 + func (m *Metric) Rate() float64 + func (m *Metric) Reset() + func (m *Metric) Snapshot() *Snapshot + func (m *Metric) StdDev() float64 + func (m *Metric) Tag() string + func (m *Metric) Update(v int32) + func (m *Metric) UpdateTag(tag string) + func (m *Metric) Variance() float64 + func (m *Metric) Window() (time.Time, time.Time) + type Monitor struct — darwin/amd64, linux/amd64, windows/amd64 + func New() *Monitor + func (m *Monitor) Get(name string) *Metric + func (m *Monitor) Measure(name string, value int32) + func (m *Monitor) MeasureElapsed(name string, start time.Time) + func (m *Monitor) MeasureRuntime() + func (m *Monitor) Snapshot() (out []byte) + func (m *Monitor) Tag(name, tag string) + type Noop struct — darwin/amd64, linux/amd64, windows/amd64 + func NewNoop() *Noop + func (m *Noop) Measure(name string, value int32) + func (m *Noop) MeasureElapsed(name string, start time.Time) + func (m *Noop) MeasureRuntime() + func (m *Noop) Snapshot() []byte + func (m *Noop) Tag(name, tag string) + type Snapshot struct + Amount int32 + Label string + Metric string + Sample sample + T0 int64 + T1 int64 + func (s *Snapshot) Count() int + func (s *Snapshot) Max() int + func (s *Snapshot) Mean() float64 + func (s *Snapshot) Merge(other Snapshot) + func (s *Snapshot) Min() int + func (s *Snapshot) Name() string + func (s *Snapshot) Quantile(quantiles ...float64) []float64 + func (s *Snapshot) Rate() float64 + func (s *Snapshot) StdDev() float64 + func (s *Snapshot) Sum() int + func (s *Snapshot) Tag() string + func (s *Snapshot) Variance() float64 + func (s *Snapshot) Window() (int64, int64) + type Snapshots []Snapshot + func Restore(encoded []byte) (snapshots Snapshots, err error) + func (snapshots *Snapshots) Merge(others Snapshots) + func (snapshots Snapshots) ToMap() map[string]Snapshot + type Snapshotter interface + Snapshot func() []byte