besu icon indicating copy to clipboard operation
besu copied to clipboard

Warm up state-tests

Open siladu opened this issue 5 months ago • 4 comments

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.

siladu avatar Jun 25 '25 06:06 siladu

hey, would love to take this issue, can I get assigned?

Dyslex7c avatar Jun 25 '25 19:06 Dyslex7c

@Dyslex7c It's yours! Any questions, feel free to ask on here or pop into the discord https://discord.lfdecentralizedtrust.org/ #besu-contributors channel

siladu avatar Jun 25 '25 20:06 siladu

perfect, thanks!

Dyslex7c avatar Jun 25 '25 20:06 Dyslex7c

@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

Dyslex7c avatar Jun 26 '25 10:06 Dyslex7c