From babd3acb7018e12c2e10a3b69eb6ac712ce1bf28 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Tue, 30 Nov 2021 15:21:48 -0500 Subject: [PATCH] e2e: generate keys for more stable load (#7344) --- 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 f31b436dd..4d1f2dea1 100644 --- a/test/e2e/runner/load.go +++ b/test/e2e/runner/load.go @@ -97,9 +97,9 @@ func loadGenerate(ctx context.Context, r *rand.Rand, chTx chan<- types.Tx, txSiz case <-timer.C: } - // We keep generating the same 100 keys over and over, with different values. - // This gives a reasonable load without putting too much data in the app. - id := rand.Int63() % 100 // nolint: gosec + // Constrain the key space to avoid using too much + // space, while reduce the size of the data in the app. + id := r.Int63n(100) bz := make([]byte, txSize) _, err := r.Read(bz)