Skip to content

Commit cf8f99b

Browse files
committed
chore: change the iteration count.
1 parent c8478f7 commit cf8f99b

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/main/java/dev/suresh/BenchMain.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
import org.openjdk.jmh.annotations.State;
1515
import org.openjdk.jmh.annotations.Warmup;
1616

17-
@Warmup(iterations = 3)
18-
@Measurement(iterations = 3)
17+
@Warmup(iterations = 2)
18+
@Measurement(iterations = 2)
1919
@BenchmarkMode(Mode.SingleShotTime)
2020
@OutputTimeUnit(TimeUnit.SECONDS)
2121
@Fork(1)
@@ -25,7 +25,7 @@ public class BenchMain {
2525
@Param("2")
2626
int min;
2727

28-
@Param("1000")
28+
@Param("100")
2929
int max;
3030

3131
@Benchmark

src/main/kotlin/dev/suresh/KotlinBench.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ import java.util.concurrent.TimeUnit.NANOSECONDS
66
import java.util.concurrent.TimeUnit.SECONDS
77
import kotlin.math.*
88

9-
109
@BenchmarkMode(Mode.AverageTime)
1110
@OutputTimeUnit(NANOSECONDS)
12-
@Warmup(iterations = 5, time = 1, timeUnit = SECONDS)
13-
@Measurement(iterations = 5, time = 1, timeUnit = SECONDS)
11+
@Warmup(iterations = 3, time = 1, timeUnit = SECONDS)
12+
@Measurement(iterations = 3, time = 1, timeUnit = SECONDS)
1413
@Fork(1)
1514
@State(Scope.Benchmark)
1615
open class KotlinBench {
@@ -45,4 +44,4 @@ open class KotlinBench {
4544
val bytes = ByteArray(size)
4645
bytes[size - 1] = 10
4746
}
48-
}
47+
}

0 commit comments

Comments
 (0)