(b *testing.B)
| 198 | } |
| 199 | |
| 200 | func BenchmarkReadGoMapUintMutex(b *testing.B) { |
| 201 | m := setupGoMap(b) |
| 202 | l := &sync.RWMutex{} |
| 203 | b.ResetTimer() |
| 204 | b.RunParallel(func(pb *testing.PB) { |
| 205 | for pb.Next() { |
| 206 | for i := uintptr(0); i < benchmarkItemCount; i++ { |
| 207 | l.RLock() |
| 208 | j := m[i] |
| 209 | l.RUnlock() |
| 210 | if j != i { |
| 211 | b.Fail() |
| 212 | } |
| 213 | } |
| 214 | } |
| 215 | }) |
| 216 | } |
| 217 | |
| 218 | func BenchmarkReadGoMapWithWritesUintMutex(b *testing.B) { |
| 219 | m := setupGoMap(b) |
nothing calls this directly
no test coverage detected
searching dependent graphs…