MCPcopy
hub / github.com/grafana/dskit / MaxGauges

Method MaxGauges

metrics/tenant_registries.go:106–113  ·  view source on GitHub ↗

MaxGauges returns max of gauges or NaN, if no gauge was found.

(name string)

Source from the content-addressed store, hash-verified

104
105// MaxGauges returns max of gauges or NaN, if no gauge was found.
106func (mfm MetricFamilyMap) MaxGauges(name string) float64 {
107 return fold(mfm[name], gaugeValueOrNaN, func(val, res float64) float64 {
108 if val > res {
109 return val
110 }
111 return res
112 })
113}
114
115// MinGauges returns minimum of gauges or NaN if no gauge was found.
116func (mfm MetricFamilyMap) MinGauges(name string) float64 {

Callers 3

TestMaxGaugesFunction · 0.80
SendMaxOfGaugesMethod · 0.80

Calls 1

foldFunction · 0.85

Tested by 1

TestMaxGaugesFunction · 0.64