MCPcopy Create free account
hub / github.com/buraksezer/consistent / BenchmarkAddRemove

Function BenchmarkAddRemove

consistent_test.go:186–195  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

184}
185
186func BenchmarkAddRemove(b *testing.B) {
187 cfg := newConfig()
188 c := New(nil, cfg)
189 b.ResetTimer()
190 for i := 0; i < b.N; i++ {
191 member := testMember("node" + strconv.Itoa(i))
192 c.Add(member)
193 c.Remove(member.String())
194 }
195}
196
197func BenchmarkLocateKey(b *testing.B) {
198 cfg := newConfig()

Callers

nothing calls this directly

Calls 6

newConfigFunction · 0.85
NewFunction · 0.85
testMemberTypeAlias · 0.85
AddMethod · 0.80
RemoveMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…