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

Function TestMaxTracker

pkg/util/math/max_tracker_test.go:9–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestMaxTracker(t *testing.T) {
10 mt := MaxTracker{}
11 mt.Track(50)
12 require.Equal(t, int64(50), mt.Load())
13 mt.Tick()
14 require.Equal(t, int64(50), mt.Load())
15 mt.Tick()
16 require.Equal(t, int64(0), mt.Load())
17}

Callers

nothing calls this directly

Calls 4

TrackMethod · 0.95
LoadMethod · 0.95
TickMethod · 0.95
EqualMethod · 0.65

Tested by

no test coverage detected