We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faf8383 commit 8c41258Copy full SHA for 8c41258
cache_test.go
@@ -1457,6 +1457,21 @@ func BenchmarkRWMutexMapGet(b *testing.B) {
1457
}
1458
1459
1460
+func BenchmarkRWMutexInterfaceMapGet(b *testing.B) {
1461
+ b.StopTimer()
1462
+ s := struct{name string}{name: "foo"}
1463
+ m := map[interface{}]string{
1464
+ s: "bar",
1465
+ }
1466
+ mu := sync.RWMutex{}
1467
+ b.StartTimer()
1468
+ for i := 0; i < b.N; i++ {
1469
+ mu.RLock()
1470
+ _, _ = m[s]
1471
+ mu.RUnlock()
1472
1473
+}
1474
+
1475
func BenchmarkCacheGetConcurrentExpiring(b *testing.B) {
1476
benchmarkCacheGetConcurrent(b, 5*time.Minute)
1477
0 commit comments