Skip to content

Commit 05d8089

Browse files
wldehqurbonzoda
authored andcommitted
docs(README.md): add hyperlinks and enhance wording
1 parent 4c59e60 commit 05d8089

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ For different platforms, there may be distinct requirements and settings that ne
115115

116116
#### Kotlin/JVM
117117

118-
When benchmarking Kotlin/JVM code with Java Microbenchmark Harness (JMH), you should use the [allopen plugin](https://kotlinlang.org/docs/all-open-plugin.html). This plugin ensures your benchmark classes and methods are `open`, meeting JMH's requirements.
118+
When benchmarking Kotlin/JVM code with Java Microbenchmark Harness (JMH), you should use the [allopen plugin](https://kotlinlang.org/docs/all-open-plugin.html). This plugin ensures your benchmark classes and methods are `open`, meeting JMH's requirements. Make sure to apply the jvm plugin.
119119

120120
```kotlin
121121
plugins {
@@ -161,7 +161,19 @@ This configuration ensures that your `MyBenchmark` class and its `benchmarkMetho
161161

162162
</details>
163163

164-
You can alternatively mark your benchmark classes and methods `open` manually, but using the `allopen` plugin enhances code maintainability.
164+
You can alternatively mark your benchmark classes and methods `open` manually, but using the `allopen` plugin enhances code maintainability. For a practical example, please refer to [examples](examples/kotlin-kts).
165+
166+
#### Java
167+
168+
In order to conduct benchmarking in Java, you need to apply the Java plugin.
169+
170+
```kotlin
171+
plugins {
172+
id("java")
173+
}
174+
```
175+
176+
For a practical example, please refer to [examples](examples/java).
165177

166178
#### Kotlin/JS
167179

@@ -180,9 +192,13 @@ For Kotlin/JS, only IR backend is supported. For more information on the IR comp
180192

181193
#### Multiplatform
182194

183-
For multiplatform projects, add the `kotlinx-benchmark-runtime` dependency to the `commonMain` source set:
195+
For multiplatform projects, add the `kotlinx-benchmark-runtime` dependency to the `commonMain` source set, and be sure to apply the multiplatform plugin, as shown below:
184196

185197
```kotlin
198+
plugins {
199+
id("multiplatform")
200+
}
201+
186202
kotlin {
187203
sourceSets {
188204
commonMain {
@@ -194,7 +210,7 @@ kotlin {
194210
}
195211
```
196212

197-
The platform-specific artifacts will be resolved automatically.
213+
This setup enables running benchmarks in the main compilation of any registered targets. Another option is to register the compilation you want to run benchmarks from. The platform-specific artifacts will be resolved automatically. For a practical example, please refer to [examples](examples/multiplatform).
198214

199215
### Benchmark Configuration
200216

@@ -290,9 +306,11 @@ benchmark {
290306
}
291307
```
292308
309+
For comprehensive guidance on configuring your benchmark setup, please refer to our detailed documentation on [Configuring kotlinx-benchmark](docs/configuration-options.md).
310+
293311
# Examples
294312
295-
The project contains [examples](https://github.com/Kotlin/kotlinx-benchmark/tree/master/examples) subproject that demonstrates using the library.
313+
To help you better understand how to use the kotlinx-benchmark library, we've provided an [examples](examples) subproject. These examples showcase various use cases and offer practical insights into the library's functionality.
296314
297315
## Contributing
298316

0 commit comments

Comments
 (0)