(b *testing.B)
| 131 | } |
| 132 | |
| 133 | func BenchmarkGetCacheSize(b *testing.B) { |
| 134 | r := New(100 * time.Millisecond) |
| 135 | |
| 136 | // populate with some entries |
| 137 | for i := 0; i < 100; i++ { |
| 138 | r.ResolvePort(i+1, "tcp") |
| 139 | } |
| 140 | |
| 141 | b.ResetTimer() |
| 142 | for i := 0; i < b.N; i++ { |
| 143 | r.GetCacheSize() |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | func BenchmarkClearCache(b *testing.B) { |
| 148 | r := New(100 * time.Millisecond) |
nothing calls this directly
no test coverage detected