MCPcopy
hub / github.com/aceld/zinx / benchmarkMultiInsertDifferent

Function benchmarkMultiInsertDifferent

zutils/shard_lock_map_bench_test.go:238–249  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

236}
237
238func benchmarkMultiInsertDifferent(b *testing.B) {
239 slm := NewShardLockMaps()
240 finished := make(chan struct{}, b.N)
241 _, set := GetSet(slm, finished)
242 b.ResetTimer()
243 for i := 0; i < b.N; i++ {
244 go set(strconv.Itoa(i), "value")
245 }
246 for i := 0; i < b.N; i++ {
247 <-finished
248 }
249}
250
251func benchmarkMultiGetSetDifferent(b *testing.B) {
252 slm := NewShardLockMaps()

Callers

nothing calls this directly

Calls 2

NewShardLockMapsFunction · 0.85
GetSetFunction · 0.85

Tested by

no test coverage detected