(b *testing.B)
| 1474 | } |
| 1475 | |
| 1476 | func BenchmarkRWMutexInterfaceMapGetStruct(b *testing.B) { |
| 1477 | b.StopTimer() |
| 1478 | s := struct{ name string }{name: "foo"} |
| 1479 | m := map[interface{}]string{ |
| 1480 | s: "bar", |
| 1481 | } |
| 1482 | mu := sync.RWMutex{} |
| 1483 | b.StartTimer() |
| 1484 | for i := 0; i < b.N; i++ { |
| 1485 | mu.RLock() |
| 1486 | _, _ = m[s] |
| 1487 | mu.RUnlock() |
| 1488 | } |
| 1489 | } |
| 1490 | |
| 1491 | func BenchmarkRWMutexInterfaceMapGetString(b *testing.B) { |
| 1492 | b.StopTimer() |
nothing calls this directly
no outgoing calls
no test coverage detected