MCPcopy
hub / github.com/grafana/tempo / updateRate

Method updateRate

pkg/usagestats/stats.go:345–348  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

343}
344
345func (c *Counter) updateRate() {
346 total := c.total.Load()
347 c.rate.Store(float64(total) / time.Since(c.resetTime).Seconds())
348}
349
350func (c *Counter) reset() {
351 c.total.Store(0)

Callers 2

TestCounterFunction · 0.95
buildMetricsFunction · 0.80

Implementers 6

countermodules/generator/registry/counter.go
testCountermodules/generator/registry/test.go
testGaugemodules/generator/registry/test.go
gaugemodules/generator/registry/gauge.go
bucketmodules/distributor/usage/tracker.go
Counterpkg/usagestats/stats.go

Calls 1

StoreMethod · 0.65

Tested by 1

TestCounterFunction · 0.76