From aa06c9ef1798448da2670671b6c299b13e55064d Mon Sep 17 00:00:00 2001 From: mzack Date: Thu, 4 Apr 2024 21:21:06 +0200 Subject: [PATCH] speed up --- examples/with_speed_control/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/with_speed_control/main.go b/examples/with_speed_control/main.go index ed3592ba..8637209a 100644 --- a/examples/with_speed_control/main.go +++ b/examples/with_speed_control/main.go @@ -43,10 +43,10 @@ func main() { panic("wrong initial rate limit") } time.Sleep(10 * time.Second) - ne.Options().RateLimit = 5 + ne.Options().RateLimit = 1000 time.Sleep(10 * time.Second) finalRate := ne.GetExecuterOptions().RateLimiter.GetLimit() - if finalRate != 5 { + if finalRate != 1000 { panic("wrong final rate limit") } }() @@ -81,13 +81,13 @@ func main() { panic("wrong initial payload concurrency") } time.Sleep(10 * time.Second) - ne.Options().PayloadConcurrency = 5 + ne.Options().PayloadConcurrency = 100 time.Sleep(10 * time.Second) // the ongoing and next payload iterations will retrieve parallelism from this function // it should have the new set value, that will be cascade applied to all running adaptive wait groups finalPayloadConcurrency := ne.GetExecuterOptions().GetThreadsForNPayloadRequests(100, 0) - if finalPayloadConcurrency != 5 { + if finalPayloadConcurrency != 100 { panic("wrong initial payload concurrency") } }()