gauge.go: mention FloatCounter in Gauge docs
Updates https://github.com/VictoriaMetrics/metrics/issues/11
This commit is contained in:
parent
d81dd5ec9c
commit
fd1ac75aa0
4
gauge.go
4
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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user