Skip to content

Commit 75dedc0

Browse files
authored
Merge pull request #157 from Kotlin/rr/mg/migration-20-master
Changes for 2.0 migration [master branch]
2 parents f371d6f + 3cc22d1 commit 75dedc0

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

runtime/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ kotlin {
6666
}
6767
}
6868
jvmMain {
69+
dependsOn(commonMain)
6970
dependencies {
7071
compileOnly "org.openjdk.jmh:jmh-core:$jmhVersion"
7172
}
@@ -76,6 +77,7 @@ kotlin {
7677
}
7778
}
7879
jsMain {
80+
dependsOn(commonMain)
7981
jsIrMain.dependsOn(it)
8082
}
8183
nativeMain {

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ fun BenchmarkTimeUnit.toSecondsMultiplier() = when (this) {
7777

7878
@Target(AnnotationTarget.CLASS)
7979
expect annotation class Warmup(
80-
val iterations: Int = -1
80+
val iterations: Int = -1,
81+
val time: Int = -1,
82+
val timeUnit: BenchmarkTimeUnit = BenchmarkTimeUnit.SECONDS,
83+
val batchSize: Int = -1
8184
)
8285

8386
@Target(AnnotationTarget.CLASS)

runtime/jsMain/src/kotlinx/benchmark/JsBenchmarkAnnotations.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ actual enum class BenchmarkTimeUnit {
2626

2727
@Target(AnnotationTarget.CLASS)
2828
actual annotation class Warmup(
29-
actual val iterations: Int
29+
actual val iterations: Int,
30+
actual val time: Int,
31+
actual val timeUnit: BenchmarkTimeUnit,
32+
actual val batchSize: Int
3033
)
3134

3235
@Target(AnnotationTarget.CLASS)

runtime/jvmMain/src/kotlinx/benchmark/JvmBenchmarkAnnotations.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ actual typealias OutputTimeUnit = org.openjdk.jmh.annotations.OutputTimeUnit
2020
@Suppress("ACTUAL_WITHOUT_EXPECT")
2121
actual typealias BenchmarkTimeUnit = java.util.concurrent.TimeUnit
2222

23-
@Suppress("ACTUAL_ANNOTATION_CONFLICTING_DEFAULT_ARGUMENT_VALUE", "NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS")
2423
actual typealias Warmup = org.openjdk.jmh.annotations.Warmup
2524

2625
@Suppress("ACTUAL_ANNOTATION_CONFLICTING_DEFAULT_ARGUMENT_VALUE")

runtime/nativeMain/src/kotlinx/benchmark/NativeBenchmarkAnnotations.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ actual enum class BenchmarkTimeUnit {
3030

3131
@Target(AnnotationTarget.CLASS)
3232
actual annotation class Warmup(
33-
actual val iterations: Int
33+
actual val iterations: Int,
34+
actual val time: Int,
35+
actual val timeUnit: BenchmarkTimeUnit,
36+
actual val batchSize: Int
3437
)
3538

3639
@Target(AnnotationTarget.CLASS)

runtime/wasmJsMain/src/kotlinx/benchmark/WasmBenchmarkAnnotations.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ actual enum class BenchmarkTimeUnit {
2626

2727
@Target(AnnotationTarget.CLASS)
2828
actual annotation class Warmup(
29-
actual val iterations: Int
29+
actual val iterations: Int,
30+
actual val time: Int,
31+
actual val timeUnit: BenchmarkTimeUnit,
32+
actual val batchSize: Int
3033
)
3134

3235
@Target(AnnotationTarget.CLASS)

0 commit comments

Comments
 (0)