MCPcopy
hub / github.com/labstack/echo / run

Function run

middleware/rate_limiter_test.go:470–475  ·  view source on GitHub ↗
(wg *sync.WaitGroup, store RateLimiterStore, addrs []string, max int, b *testing.B)

Source from the content-addressed store, hash-verified

468}
469
470func 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
477func benchmarkStore(store RateLimiterStore, parallel int, max int, b *testing.B) {
478 addrs := generateAddressList(max)

Callers 1

benchmarkStoreFunction · 0.85

Calls 1

AllowMethod · 0.65

Tested by

no test coverage detected