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

Function BenchmarkSingleInsertPresent

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

Source from the content-addressed store, hash-verified

65}
66
67func BenchmarkSingleInsertPresent(b *testing.B) {
68 slm := NewShardLockMaps()
69 slm.Set("key", "value")
70 b.ResetTimer()
71 for i := 0; i < b.N; i++ {
72 slm.Set("key", "value")
73 }
74}
75
76func BenchmarkSingleInsertPresentSyncMap(b *testing.B) {
77 var m sync.Map

Callers

nothing calls this directly

Calls 2

SetMethod · 0.95
NewShardLockMapsFunction · 0.85

Tested by

no test coverage detected