Function
run
(wg *sync.WaitGroup, store RateLimiterStore, addrs []string, max int, b *testing.B)
Source from the content-addressed store, hash-verified
| 468 | } |
| 469 | |
| 470 | func run(wg *sync.WaitGroup, store RateLimiterStore, addrs []string, max int, b *testing.B) { |
| 471 | for i := 0; i < b.N; i++ { |
| 472 | store.Allow(addrs[rand.Intn(max)]) |
| 473 | } |
| 474 | wg.Done() |
| 475 | } |
| 476 | |
| 477 | func benchmarkStore(store RateLimiterStore, parallel int, max int, b *testing.B) { |
| 478 | addrs := generateAddressList(max) |
Tested by
no test coverage detected