besu
besu copied to clipboard
Warm up state-tests
When comparing tests across clients, it can be useful to have a warmed up version of a state-test.
We can run a state-test with
./evmtool state-test my-test.json
but in order to fake a warmup, we need to do:
./evmtool state-test my-test.json my-test.json my-test.json my-test.json ....
EvmToolCommand already has
@Option(
names = {"--repeat"},
description = "Number of times to repeat for benchmarking.")
but it isn't respected by the sub-sub-commands,
We can also run benchmarks with warmup but they run specific precompile, not arbitrary state-tests:
./evmtool benchmark --warmup 10000 --iterations 1000
Preferred option would be to have the existing --repeat option respected, i.e. ability to run:
./evmtool --repeat 100 state-test my-test.json
...and produce a single warmed up result.
But other options include adding a --warmup feature to state-test or giving evmtool benchmark the ability to run state tests.
hey, would love to take this issue, can I get assigned?
@Dyslex7c It's yours! Any questions, feel free to ask on here or pop into the discord https://discord.lfdecentralizedtrust.org/ #besu-contributors channel
perfect, thanks!
@siladu I've included the option --repeat in state-test which will run the test for the specified number of times and only display the result in the last iteration. Please do take a look at the PR