(b *testing.B)
| 114 | } |
| 115 | |
| 116 | func BenchmarkMultiInsertSame(b *testing.B) { |
| 117 | slm := NewShardLockMaps() |
| 118 | finished := make(chan struct{}, b.N) |
| 119 | _, set := GetSet(slm, finished) |
| 120 | slm.Set("key", "value") |
| 121 | b.ResetTimer() |
| 122 | for i := 0; i < b.N; i++ { |
| 123 | go set("key", "value") |
| 124 | } |
| 125 | for i := 0; i < b.N; i++ { |
| 126 | <-finished |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | func BenchmarkMultiInsertSameSyncMap(b *testing.B) { |
| 131 | var m sync.Map |
nothing calls this directly
no test coverage detected