MCPcopy Create free account
hub / github.com/cortexproject/cortex / Track

Method Track

pkg/util/math/max_tracker.go:10–14  ·  view source on GitHub ↗
(max int64)

Source from the content-addressed store, hash-verified

8}
9
10func (m *MaxTracker) Track(max int64) {
11 if l := m.current.Load(); l < max {
12 m.current.CompareAndSwap(l, max)
13 }
14}
15
16func (m *MaxTracker) Tick() {
17 m.old.Store(m.current.Load())

Callers 6

TestIngesterMetricsFunction · 0.95
TestMaxTrackerFunction · 0.95
prepareSeriesKeysMethod · 0.45
PushMethod · 0.45

Calls 1

LoadMethod · 0.80

Tested by 2

TestIngesterMetricsFunction · 0.76
TestMaxTrackerFunction · 0.76