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

Function TestJSONStatsCounters

cmd/ntripper/stats/json_test.go:29–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27)
28
29func TestJSONStatsCounters(t *testing.T) {
30 st := NewJSONStats()
31
32 st.IncFramesReceived()
33 st.IncFramesReceived()
34 st.SetConnected(1)
35
36 require.Equal(t, int64(2), st.framesReceived.Load())
37 require.Equal(t, int64(1), st.connected.Load())
38}
39
40func TestJSONStatsHTTPEndpoint(t *testing.T) {
41 st := NewJSONStats()

Callers

nothing calls this directly

Calls 3

IncFramesReceivedMethod · 0.95
SetConnectedMethod · 0.95
NewJSONStatsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…