MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestNewCallStat

Function TestNewCallStat

internal/rpc/call_stat_test.go:10–19  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestNewCallStat(t *testing.T) {
11 var stat = rpc.NewCallStat(10)
12 stat.Add(true, 1)
13 stat.Add(true, 2)
14 stat.Add(true, 3)
15 stat.Add(false, 4)
16 stat.Add(true, 0)
17 stat.Add(true, 1)
18 t.Log(stat.Sum())
19}

Callers

nothing calls this directly

Calls 4

NewCallStatFunction · 0.92
LogMethod · 0.80
AddMethod · 0.65
SumMethod · 0.45

Tested by

no test coverage detected