From fd1ac75aa05ee8090d43c977e7e5ab3033bb8c27 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 5 Jul 2020 17:49:49 +0300 Subject: [PATCH] gauge.go: mention FloatCounter in Gauge docs Updates https://github.com/VictoriaMetrics/metrics/issues/11 --- gauge.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gauge.go b/gauge.go index adc1f21..05bf147 100644 --- a/gauge.go +++ b/gauge.go @@ -18,6 +18,8 @@ import ( // f must be safe for concurrent calls. // // The returned gauge is safe to use from concurrent goroutines. +// +// See also FloatCounter for working with floating-point values. func NewGauge(name string, f func() float64) *Gauge { return defaultSet.NewGauge(name, f) } @@ -58,6 +60,8 @@ func (g *Gauge) marshalTo(prefix string, w io.Writer) { // The returned gauge is safe to use from concurrent goroutines. // // Performance tip: prefer NewGauge instead of GetOrCreateGauge. +// +// See also FloatCounter for working with floating-point values. func GetOrCreateGauge(name string, f func() float64) *Gauge { return defaultSet.GetOrCreateGauge(name, f) }