gauge.go: mention FloatCounter in Gauge docs

Updates https://github.com/VictoriaMetrics/metrics/issues/11
This commit is contained in:
Aliaksandr Valialkin 2020-07-05 17:49:49 +03:00
parent d81dd5ec9c
commit fd1ac75aa0

View File

@ -18,6 +18,8 @@ import (
// f must be safe for concurrent calls. // f must be safe for concurrent calls.
// //
// The returned gauge is safe to use from concurrent goroutines. // 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 { func NewGauge(name string, f func() float64) *Gauge {
return defaultSet.NewGauge(name, f) 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. // The returned gauge is safe to use from concurrent goroutines.
// //
// Performance tip: prefer NewGauge instead of GetOrCreateGauge. // Performance tip: prefer NewGauge instead of GetOrCreateGauge.
//
// See also FloatCounter for working with floating-point values.
func GetOrCreateGauge(name string, f func() float64) *Gauge { func GetOrCreateGauge(name string, f func() float64) *Gauge {
return defaultSet.GetOrCreateGauge(name, f) return defaultSet.GetOrCreateGauge(name, f)
} }