Skip to content

Commit

Permalink
Problem: testground validator load generator not configurable (crypto…
Browse files Browse the repository at this point in the history
…-org-chain#1576)

* Problem: testground validator load generation not configurable

* Apply suggestions from code review

Signed-off-by: yihuang <[email protected]>

---------

Signed-off-by: yihuang <[email protected]>
  • Loading branch information
yihuang authored Sep 13, 2024
1 parent 753782d commit d212111
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions testground/benchmark/benchmark/stateless.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d212111

Please sign in to comment.