From abbe8209b5fdc897ea2038b387707496ed7496ae Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Mon, 13 Sep 2021 13:45:01 -0400 Subject: [PATCH] e2e: reduce load volume (#6932) --- test/e2e/runner/load.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/runner/load.go b/test/e2e/runner/load.go index ede8e9daa..614cc6877 100644 --- a/test/e2e/runner/load.go +++ b/test/e2e/runner/load.go @@ -78,8 +78,8 @@ func Load(ctx context.Context, testnet *e2e.Testnet) error { // // The chTx has multiple consumers, thus the rate limiting of the load // generation is primarily the result of backpressure from the -// broadcast transaction, though at most one transaction will be -// produced every 10ms. +// broadcast transaction, though there is still some timer-based +// limiting. func loadGenerate(ctx context.Context, chTx chan<- types.Tx, size int64) { timer := time.NewTimer(0) defer timer.Stop() @@ -109,7 +109,7 @@ func loadGenerate(ctx context.Context, chTx chan<- types.Tx, size int64) { case chTx <- tx: // sleep for a bit before sending the // next transaction. - waitTime := (10 * time.Millisecond) + time.Duration(rand.Int63n(int64(500*time.Millisecond))) // nolint: gosec + waitTime := (25 * time.Millisecond) + time.Duration(rand.Int63n(int64(750*time.Millisecond))) // nolint: gosec timer.Reset(waitTime) }