Browse Source

e2e: reduce load volume (#6932)

pull/6935/head
Sam Kleinman 3 years ago
committed by GitHub
parent
commit
abbe8209b5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      test/e2e/runner/load.go

+ 3
- 3
test/e2e/runner/load.go View File

@ -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)
}


Loading…
Cancel
Save