(b *testing.B, exp time.Duration)
| 1450 | } |
| 1451 | |
| 1452 | func benchmarkCacheGet(b *testing.B, exp time.Duration) { |
| 1453 | b.StopTimer() |
| 1454 | tc := New(exp, 0) |
| 1455 | tc.Set("foo", "bar", DefaultExpiration) |
| 1456 | b.StartTimer() |
| 1457 | for i := 0; i < b.N; i++ { |
| 1458 | tc.Get("foo") |
| 1459 | } |
| 1460 | } |
| 1461 | |
| 1462 | func BenchmarkRWMutexMapGet(b *testing.B) { |
| 1463 | b.StopTimer() |
no test coverage detected