Open
Description
In the next snippet the code I want to benchmark is called only on the first benchmark iteration.
How can I make it to be called on each iteration on JVM and native targets?
object Init {
val value = doSomeInit().apply {
println("INIT")
}
private fun doSomeInit() = 1 + 1
}
@State(Scope.Benchmark)
class NetworkingBenchmark {
@Benchmark
fun runBenchmark() {
Init.value
}
}