Skip to content

Commit 96f0034

Browse files
authored
Fix: align default benchmark configurations (#120)
Issue #75
1 parent 269b098 commit 96f0034

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

runtime/commonMain/src/kotlinx/benchmark/SuiteDescriptor.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package kotlinx.benchmark
22

33
object DefaultDescriptorParameters {
4-
val iterations = 3
5-
val warmups = 3
6-
val iterationTime = IterationTime(1, BenchmarkTimeUnit.SECONDS)
4+
val iterations = 5
5+
val warmups = 5
6+
val iterationTime = IterationTime(10, BenchmarkTimeUnit.SECONDS)
7+
val outputTimeUnit = BenchmarkTimeUnit.SECONDS
8+
val mode = Mode.Throughput
79
}
810

911
open class SuiteDescriptor<T>(
@@ -20,8 +22,8 @@ open class SuiteDescriptor<T>(
2022
val warmups: Int = DefaultDescriptorParameters.warmups,
2123

2224
val iterationTime: IterationTime = DefaultDescriptorParameters.iterationTime,
23-
val outputTimeUnit: BenchmarkTimeUnit = BenchmarkTimeUnit.MILLISECONDS,
24-
val mode: Mode = Mode.Throughput
25+
val outputTimeUnit: BenchmarkTimeUnit = DefaultDescriptorParameters.outputTimeUnit,
26+
val mode: Mode = DefaultDescriptorParameters.mode
2527
) {
2628
private val _benchmarks = mutableListOf<BenchmarkDescriptor<T>>()
2729

0 commit comments

Comments
 (0)