Skip to content

Commit 3cc22d1

Browse files
dumanskaiamglukhikh
authored andcommitted
Remove NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS suppression for Warmup annotation
Related to KT-59559, KT-59561
1 parent b2438c3 commit 3cc22d1

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

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)