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

Function benchmarkMultiInsertDifferentWithMap

zutils/shard_lock_map_bench_test.go:313–322  ·  view source on GitHub ↗
(slm ShardLockMaps, b *testing.B)

Source from the content-addressed store, hash-verified

311}
312
313func benchmarkMultiInsertDifferentWithMap(slm ShardLockMaps, b *testing.B) {
314 finished := make(chan struct{}, b.N)
315 _, set := GetSet(slm, finished)
316 for i := 0; i < b.N; i++ {
317 set(strconv.Itoa(i), strconv.Itoa(i))
318 }
319 for i := 0; i < b.N; i++ {
320 <-finished
321 }
322}
323
324func benchmarkMultiGetSetDifferentWithMap(slm ShardLockMaps, b *testing.B) {
325 finished := make(chan struct{}, 2*b.N)

Calls 1

GetSetFunction · 0.85

Tested by

no test coverage detected