From d212111cdabeafd99e0794903ab444afcef279bf Mon Sep 17 00:00:00 2001 From: yihuang Date: Fri, 13 Sep 2024 14:32:34 +0800 Subject: [PATCH] Problem: testground validator load generator not configurable (#1576) * Problem: testground validator load generation not configurable * Apply suggestions from code review Signed-off-by: yihuang --------- Signed-off-by: yihuang --- testground/benchmark/benchmark/stateless.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/testground/benchmark/benchmark/stateless.py b/testground/benchmark/benchmark/stateless.py index 8afe3b7c90..bc4c612efe 100644 --- a/testground/benchmark/benchmark/stateless.py +++ b/testground/benchmark/benchmark/stateless.py @@ -95,6 +95,7 @@ def gen( "fullnodes": fullnodes, "num_accounts": num_accounts, "num_txs": num_txs, + "validator-generate-load": options.get("validator-generate-load", True), } (outdir / "config.json").write_text(json.dumps(cfg)) @@ -154,10 +155,12 @@ def run( wait_for_port(26657) wait_for_port(8545) wait_for_block(cli, 3) - wait_for_w3() - generate_load( - cli, cfg["num_accounts"], cfg["num_txs"], home=home, output="json" - ) + + if group == FULLNODE_GROUP or cfg.get("validator-generate-load", True): + wait_for_w3() + generate_load( + cli, cfg["num_accounts"], cfg["num_txs"], home=home, output="json" + ) # node quit when the chain is idle or halted for a while detect_idle_halted(20, 20)