(b *testing.B)
| 288 | } |
| 289 | |
| 290 | func BenchmarkReadGoMapStringUnsafe(b *testing.B) { |
| 291 | m, keys := setupGoMapString(b) |
| 292 | b.ResetTimer() |
| 293 | b.RunParallel(func(pb *testing.PB) { |
| 294 | for pb.Next() { |
| 295 | for i := 0; i < benchmarkItemCount; i++ { |
| 296 | s := keys[i] |
| 297 | sVal := m[s] |
| 298 | if s != sVal { |
| 299 | b.Fail() |
| 300 | } |
| 301 | } |
| 302 | } |
| 303 | }) |
| 304 | } |
| 305 | |
| 306 | func BenchmarkReadGoMapStringMutex(b *testing.B) { |
| 307 | m, keys := setupGoMapString(b) |
nothing calls this directly
no test coverage detected
searching dependent graphs…