Skip to content

Commit 865062c

Browse files
author
Abduqodiri Qurbonzoda
committed
fixup! Introduce docs/separate-benchmark-module.md
1 parent 2d8f64a commit 865062c

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

docs/separate-benchmark-module.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
This guide will walk you through the process of creating a separate module for benchmarks in your Kotlin project.
44
Creating a separate module for benchmarks is especially beneficial when you are integrating benchmarks into an existing project.
5-
Here are a few advantages of doing so:
5+
Here are a couple of advantages of doing so:
66

7-
1. **Organization**: It helps maintain a clean and organized project structure. Segregating benchmarks from the main code makes it easier to navigate and locate specific code segments.
7+
1. **Flexibility**: Creating a separate module allows you to manage your benchmarking code independently. You can compile, test, and run benchmarks without impacting your main source code.
88

9-
2. **Isolation**: Separating benchmarks ensures that the benchmarking code does not interfere with your main code or test code. This isolation guarantees accurate measurements without unintentional side effects.
10-
11-
3. **Flexibility**: Creating a separate module allows you to manage your benchmarking code independently. You can compile, test, and run benchmarks without impacting your main source code.
9+
2. **Organization**: It helps maintain a clean and organized project structure. Segregating benchmarks from the main code makes it easier to navigate and locate specific code segments.
1210

1311
## Step-by-step Setup Guide
1412

@@ -18,7 +16,7 @@ Below are the step-by-step instructions to set up a separate module for benchmar
1816

1917
Follow these steps to set up a separate compilation for benchmarks:
2018

21-
1. **Define New Compilation**:
19+
1. **Define New Compilation**
2220

2321
Start by creating a new compilation in your target of choice (e.g. jvm, js, native, wasm etc.).
2422
In this example, we're associating the new compilation `benchmark` with the `main` compilation of the `jvm` target.
@@ -37,7 +35,7 @@ Follow these steps to set up a separate compilation for benchmarks:
3735
}
3836
```
3937

40-
2. **Register Benchmark Compilation**:
38+
2. **Register Benchmark Compilation**
4139

4240
Conclude by registering your new benchmark compilation using its default source set name.
4341
In this instance, `jvmBenchmark` is the name of the default source set of the `benchmark` compilation.
@@ -59,7 +57,7 @@ and the [documentation on associating compiler tasks](https://kotlinlang.org/doc
5957

6058
Set up a separate benchmark source set by following these simple steps:
6159

62-
1. **Define Source Set**:
60+
1. **Define Source Set**
6361

6462
Begin by defining a new source set. We'll use `benchmark` as the name for the source set.
6563
@@ -70,7 +68,7 @@ Set up a separate benchmark source set by following these simple steps:
7068
}
7169
```
7270
73-
2. **Propagate Dependencies**:
71+
2. **Propagate Dependencies**
7472
7573
Next, propagate dependencies and output from the `main` source set to your `benchmark` source set.
7674
This ensures the `benchmark` source set has access to classes and resources from the `main` source set.
@@ -85,7 +83,7 @@ Set up a separate benchmark source set by following these simple steps:
8583
You can also add output and `compileClasspath` from `sourceSets.test` in the same way
8684
if you wish to reuse some of the test infrastructure.
8785
88-
3. **Register Benchmark Source Set**:
86+
3. **Register Benchmark Source Set**
8987
9088
Finally, register your benchmark source set. This informs the kotlinx-benchmark tool
9189
that benchmarks reside within this source set and need to be executed accordingly.

0 commit comments

Comments
 (0)