File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ plugins {
6
6
plugins.kotlin.jvm
7
7
}
8
8
9
+ description = " Ktor backend application"
10
+
9
11
application {
10
12
mainClass = " AppKt"
11
13
applicationDefaultJvmArgs + =
Original file line number Diff line number Diff line change 1
1
import common.mppTargetName
2
+ import kotlinx.benchmark.gradle.BenchmarkTarget
3
+ import kotlinx.benchmark.gradle.JvmBenchmarkTarget
2
4
3
5
plugins {
4
6
plugins.kotlin.mpp
5
7
alias(libs.plugins.kotlinx.benchmark)
6
8
alias(libs.plugins.kotlin.allopen)
7
9
}
8
10
11
+ description = " Kotlin benchmarking tests"
12
+
9
13
allOpen { annotation(" org.openjdk.jmh.annotations.State" ) }
10
14
11
15
benchmark {
12
16
targets {
13
- register(" jvm" )
14
- register(" desktop" )
17
+ register(" jvm" ) { configureJmh() }
18
+ register(" desktop" ) { configureJmh() }
15
19
// register("js")
16
20
}
17
21
@@ -33,3 +37,8 @@ dependencies {
33
37
commonMainImplementation(projects.common)
34
38
commonMainImplementation(libs.kotlinx.bench.runtime)
35
39
}
40
+
41
+ fun BenchmarkTarget.configureJmh () {
42
+ this as JvmBenchmarkTarget
43
+ jmhVersion = libs.versions.jmh.get()
44
+ }
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ application {
20
20
21
21
dependencies {
22
22
// Common multiplatform dependencies
23
- commonMainImplementation(libs.kotlinx.io.bytestring)
24
23
commonMainImplementation(libs.kotlinx.io.core)
25
24
commonMainImplementation(libs.ktor.client.core)
26
25
commonMainImplementation(libs.ktor.client.logging)
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ publish-scm-url = "https://github.com/sureshg/kotlin-mpp-playgrou
22
22
23
23
# Gradle Dependencies Versions
24
24
kotlinx-kover = " 0.7.2"
25
- kotlinx-io = " 0.2.0 "
25
+ kotlinx-io = " 0.2.1 "
26
26
kotlinx-atomicfu = " 0.21.0"
27
27
kotlinx-coroutines = " 1.7.2"
28
28
kotlinx-datetime = " 0.4.0"
@@ -54,6 +54,7 @@ ksp-powerassert = "0.13.0"
54
54
slf4j = " 2.0.7"
55
55
logback = " 1.2.6"
56
56
log4j = " 3.0.0-alpha1"
57
+ jmh = " 1.36"
57
58
ktfmt = " 0.44"
58
59
google-javaformat = " 1.17.0"
59
60
google-auto-service = " 1.1.1"
@@ -139,7 +140,6 @@ kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-seri
139
140
kotlinx-datetime = { module = " org.jetbrains.kotlinx:kotlinx-datetime" , version.ref = " kotlinx-datetime" }
140
141
kotlinx-atomicfu = { module = " org.jetbrains.kotlinx:atomicfu" , version.ref = " kotlinx-atomicfu" }
141
142
kotlinx-io-core = { module = " org.jetbrains.kotlinx:kotlinx-io-core" , version.ref = " kotlinx-io" }
142
- kotlinx-io-bytestring = { module = " org.jetbrains.kotlinx:kotlinx-io-bytestring" , version.ref = " kotlinx-io" }
143
143
kotlinx-lincheck = { module = " org.jetbrains.kotlinx:lincheck" , version.ref = " kotlinx-lincheck" }
144
144
kotlinx-reflect-lite = { module = " org.jetbrains.kotlinx:kotlinx.reflect.lite" , version.ref = " kotlinx-reflect-lite" }
145
145
kotlinx-collections-immutable = { module = " org.jetbrains.kotlinx:kotlinx-collections-immutable" , version.ref = " kotlinx-collections-immutable" }
You can’t perform that action at this time.
0 commit comments