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

Function BenchmarkMap_Add

internal/conns/map_test_test.go:55–67  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

53}
54
55func BenchmarkMap_Add(b *testing.B) {
56 runtime.GOMAXPROCS(512)
57
58 var m = conns.NewMap()
59
60 b.RunParallel(func(pb *testing.PB) {
61 for pb.Next() {
62 var conn = &testConn{}
63 m.Add(conn)
64 m.Remove(conn)
65 }
66 })
67}

Callers

nothing calls this directly

Calls 4

NewMapFunction · 0.92
NextMethod · 0.80
AddMethod · 0.65
RemoveMethod · 0.65

Tested by

no test coverage detected