kotlinx-benchmark icon indicating copy to clipboard operation
kotlinx-benchmark copied to clipboard

Separate warmup time from iteration time

Open qurbonzoda opened this issue 3 years ago • 1 comments
trafficstars

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).

qurbonzoda avatar Jan 12 '22 17:01 qurbonzoda

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

qurbonzoda avatar May 06 '24 16:05 qurbonzoda