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

Function TestSetCounter

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

Source from the content-addressed store, hash-verified

33 require.Empty(t, s.Get())
34}
35
36func TestSetCounter(t *testing.T) {
37 s := NewStats()
38 s.SetCounter("test_key", 42)
39 got := s.Get()
40 require.Equal(t, int64(42), got["test_key"])
41}
42
43func TestSetCounterOverwrite(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…