Versions in this module Expand all Collapse all v1 v1.0.2 Jan 27, 2021 v1.0.1 May 29, 2015 Changes in this version + const NsInSec + var Percentiles = []float64 + type BasicCounter uint64 + func NewBasicCounter() *BasicCounter + func (c *BasicCounter) Add(delta uint64) + func (c *BasicCounter) Get() uint64 + func (c *BasicCounter) MarshalJSON() ([]byte, error) + func (c *BasicCounter) Reset() + func (c *BasicCounter) Set(v uint64) + type Counter struct + func NewCounter() *Counter + func (c *Counter) Add(delta uint64) + func (c *Counter) ComputeRate() float64 + func (c *Counter) Get() uint64 + func (c *Counter) MarshalJSON() ([]byte, error) + func (c *Counter) Reset() + func (c *Counter) Set(v uint64) + type Gauge struct + func NewGauge() *Gauge + func (g *Gauge) Get() float64 + func (g *Gauge) MarshalJSON() ([]byte, error) + func (g *Gauge) Reset() + func (g *Gauge) Set(v float64) + type MetricContext struct + BasicCounters map[string]*BasicCounter + Counters map[string]*Counter + Gauges map[string]*Gauge + OutputFilter OutputFilterFunc + StatsTimers map[string]*StatsTimer + func NewMetricContext(namespace string) *MetricContext + func (m *MetricContext) EncodeJSON(w io.Writer) error + func (m *MetricContext) HttpJsonHandler(w http.ResponseWriter, r *http.Request) + func (m *MetricContext) Register(v interface{}, name string) + func (m *MetricContext) Unregister(v interface{}, name string) + type MetricJSON struct + Name string + Type string + Value interface{} + type OutputFilterFunc func(name string, v interface{}) bool + type StatsTimer struct + func NewStatsTimer(timeUnit time.Duration, nsamples int) *StatsTimer + func (s *StatsTimer) MarshalJSON() ([]byte, error) + func (s *StatsTimer) Percentile(percentile float64) (float64, error) + func (s *StatsTimer) Reset() + func (s *StatsTimer) Start() *Timer + func (s *StatsTimer) Stop(t *Timer) float64 + type Timer struct + func NewTimer() *Timer + func (t *Timer) Get() int64 + func (t *Timer) Start() + func (t *Timer) Stop() int64