diff --git a/testground/README.md b/testground/README.md index 9d284a31f3..71d94f16fa 100644 --- a/testground/README.md +++ b/testground/README.md @@ -40,6 +40,7 @@ nix run .#stateless-testcase -- gen /tmp/data/out \ --fullnodes 0 \ --num-accounts 800 \ --num-txs 20 \ + --num-idle 20 \ --app-patch '{"mempool": {"max-txs": -1}}' \ --config-patch '{"mempool": {"size": 100000}}' \ --tx-type erc20-transfer \ diff --git a/testground/benchmark/benchmark/stateless.py b/testground/benchmark/benchmark/stateless.py index f94658f326..1aac7554a7 100644 --- a/testground/benchmark/benchmark/stateless.py +++ b/testground/benchmark/benchmark/stateless.py @@ -56,6 +56,7 @@ def validate_json(ctx, param, value): @click.option("--fullnodes", default=7) @click.option("--num-accounts", default=10) @click.option("--num-txs", default=1000) +@click.option("--num-idle", default=20) @click.option("--tx-type", default="simple-transfer") @click.option("--config-patch", default="{}", callback=validate_json) @click.option("--app-patch", default="{}", callback=validate_json) @@ -78,6 +79,7 @@ def _gen( fullnodes: int = 7, num_accounts: int = 10, num_txs: int = 1000, + num_idle: int = 20, tx_type: str = "simple-transfer", validator_generate_load: bool = True, config_patch: dict = None, @@ -140,6 +142,7 @@ def _gen( "fullnodes": fullnodes, "num_accounts": num_accounts, "num_txs": num_txs, + "num_idle": num_idle, "tx_type": tx_type, "validator-generate-load": validator_generate_load, } @@ -277,7 +280,7 @@ def do_run( print("sent", len(txs), "txs") # node quit when the chain is idle or halted for a while - detect_idle_halted(20, 20) + detect_idle_halted(cfg["num_idle"], 20) with (home / "block_stats.log").open("w") as logfile: dump_block_stats(logfile)