(b *testing.B)
| 142 | } |
| 143 | |
| 144 | func BenchmarkMultiGetSame(b *testing.B) { |
| 145 | slm := NewShardLockMaps() |
| 146 | finished := make(chan struct{}, b.N) |
| 147 | get, _ := GetSet(slm, finished) |
| 148 | slm.Set("key", "value") |
| 149 | b.ResetTimer() |
| 150 | for i := 0; i < b.N; i++ { |
| 151 | go get("key", "value") |
| 152 | } |
| 153 | for i := 0; i < b.N; i++ { |
| 154 | <-finished |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | func BenchmarkMultiGetSameSyncMap(b *testing.B) { |
| 159 | var m sync.Map |
nothing calls this directly
no test coverage detected