Documentation
¶
Overview ¶
Package metricstest is a go-utils metric factory for Dispatch's tests. It keys series by name and labels, as Forge's registry does. go-utils' own collector keys them by name alone, which folds every labelled series into the first one created.
Index ¶
- func Key(name string, labels map[string]string) string
- type Factory
- func (f *Factory) Counter(name string, opts ...gu.MetricOption) gu.Counter
- func (f *Factory) CounterValue(name string, labels ...string) (float64, bool)
- func (f *Factory) Gauge(name string, opts ...gu.MetricOption) gu.Gauge
- func (f *Factory) GaugeValue(name string, labels ...string) (float64, bool)
- func (f *Factory) Histogram(name string, opts ...gu.MetricOption) gu.Histogram
- func (f *Factory) HistogramCount(name string, labels ...string) (uint64, bool)
- func (f *Factory) Names() []string
- func (f *Factory) Series(name string) []map[string]string
- func (f *Factory) Summary(name string, opts ...gu.MetricOption) gu.Summary
- func (f *Factory) Timer(name string, opts ...gu.MetricOption) gu.Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory records every series created through it.
func (*Factory) CounterValue ¶
CounterValue returns the value of the counter series name{labels}, and whether it exists. Pass labels as key, value pairs.
func (*Factory) GaugeValue ¶
GaugeValue returns the value of the gauge series name{labels}, and whether it exists.
func (*Factory) HistogramCount ¶
HistogramCount returns the observation count of the histogram series name{labels}, and whether it exists.
Click to show internal directories.
Click to hide internal directories.