MCPcopy Create free account
hub / github.com/facebook/time / TestSetCounterOverwrite

Function TestSetCounterOverwrite

fbclock/stats/stats_test.go:42–48  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40 require.Equal(t, int64(42), got["test_key"])
41}
42
43func TestSetCounterOverwrite(t *testing.T) {
44 s := NewStats()
45 s.SetCounter("key", 10)
46 s.SetCounter("key", 20)
47 got := s.Get()
48 require.Equal(t, int64(20), got["key"])
49}
50
51func TestUpdateCounterBy(t *testing.T) {

Callers

nothing calls this directly

Calls 3

SetCounterMethod · 0.95
GetMethod · 0.95
NewStatsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…