(b *testing.B)
| 236 | } |
| 237 | |
| 238 | func 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 | |
| 251 | func benchmarkMultiGetSetDifferent(b *testing.B) { |
| 252 | slm := NewShardLockMaps() |
nothing calls this directly
no test coverage detected