MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / benchCaller

Function benchCaller

rpc/pool_test.go:33–43  ·  view source on GitHub ↗
(b *testing.B, caller *Caller, remote proto.NodeID)

Source from the content-addressed store, hash-verified

31)
32
33func benchCaller(b *testing.B, caller *Caller, remote proto.NodeID) {
34 b.ResetTimer()
35 b.RunParallel(func(pb *testing.PB) {
36 for pb.Next() {
37 err := caller.CallNode(remote, "Count.Add", &AddReq{Delta: 1}, &AddResp{})
38 if err != nil {
39 b.Error("call node failed: ", err)
40 }
41 }
42 })
43}
44
45func benchPCaller(b *testing.B, caller *PersistentCaller) {
46 b.ResetTimer()

Callers 1

BenchmarkRPCComponentsFunction · 0.85

Calls 3

CallNodeMethod · 0.80
ErrorMethod · 0.80
NextMethod · 0.45

Tested by

no test coverage detected