Open
Description
Without being able to specify level iteration, tests are really clunky to configure. For example say I have a class:
class Benchmark {
val stack = stack()
@Setup
fun setup() {
stack.push(1)
}
@Teardown
fun cleanup() {
stack.clear()
}
@Benchmark
fun benchmark() {
stack.pop()
}
}
This will not work because setup is only ran once. I could push a 1000 elements during setup and just hope the iterations exceed the amount of pops in the test, but this would also mean stack has an unrealistically large dataset and skew my measurement. I could put the setup code in the actual benchmark itself, but then I wouldn't be measuring exactly what I want. Level is a really important important config in JMH and without it native tests seem too awkward to be worth configuring