kotlinx-benchmark
kotlinx-benchmark copied to clipboard
Separate warmup time from iteration time
Currently, both warmup and measurement iterations use iterationTime and iterationTimeUnit values defined in the configuration script. @Warmup annotation only defines iterations value leaning on @Measurement time and timeUnit values. When iterationTime and iterationTimeUnit are not defined in the configuration script, JVM run of the same benchmark uses different time and timeUnit for warmups than JS and Native.
Consider aligning behavior on all targets. For example, by introducing warmupTime/warmupTimeUnit and @Warmup(val time: Int, val timeUnit: BenchmarkTimeUnit).
This issue is exacerbated by the fact that common @Warmup annotation now takes time and timeUnit parameters as well, but only iterations have effect. Other parameters are ignored. Those new parameters were added to make K2 happy: https://github.com/Kotlin/kotlinx-benchmark/pull/157