-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathJsBenchmarkAnnotations.kt
44 lines (33 loc) · 1.04 KB
/
JsBenchmarkAnnotations.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package kotlinx.benchmark
actual enum class Scope {
Benchmark
}
actual enum class Level {
Trial, Iteration, Invocation
}
actual annotation class State(actual val value: Scope)
actual annotation class Setup(actual val value: Level)
actual annotation class TearDown(actual val value: Level)
actual annotation class Benchmark
@Target(AnnotationTarget.CLASS)
actual annotation class BenchmarkMode(actual vararg val value: Mode)
actual enum class Mode {
Throughput, AverageTime
}
@Target(AnnotationTarget.CLASS)
actual annotation class OutputTimeUnit(actual val value: BenchmarkTimeUnit)
actual enum class BenchmarkTimeUnit {
NANOSECONDS, MICROSECONDS, MILLISECONDS, SECONDS, MINUTES
}
@Target(AnnotationTarget.CLASS)
actual annotation class Warmup(
actual val iterations: Int
)
@Target(AnnotationTarget.CLASS)
actual annotation class Measurement(
actual val iterations: Int,
actual val time: Int,
actual val timeUnit: BenchmarkTimeUnit,
actual val batchSize: Int
)
actual annotation class Param(actual vararg val value: String)