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

Method SendMaxOfGauges

metrics/tenant_registries.go:284–291  ·  view source on GitHub ↗
(out chan<- prometheus.Metric, desc *prometheus.Desc, gauge string)

Source from the content-addressed store, hash-verified

282}
283
284func (d MetricFamiliesPerTenant) SendMaxOfGauges(out chan<- prometheus.Metric, desc *prometheus.Desc, gauge string) {
285 d.foldGauges(out, desc, func(familyMap MetricFamilyMap) float64 { return familyMap.MaxGauges(gauge) }, func(val, res float64) float64 {
286 if val > res {
287 return val
288 }
289 return res
290 })
291}
292
293func (d MetricFamiliesPerTenant) SendMaxOfGaugesPerTenant(out chan<- prometheus.Metric, desc *prometheus.Desc, gauge string) {
294 for _, tenantEntry := range d {

Callers 1

TestSendMinMaxOfGaugesFunction · 0.80

Calls 2

foldGaugesMethod · 0.95
MaxGaugesMethod · 0.80

Tested by 1

TestSendMinMaxOfGaugesFunction · 0.64