Skip to content

Commit 8b58375

Browse files
committed
Merge remote-tracking branch 'origin/master' into fzhinkin/kc-dev-rebase-jun-18
2 parents 89fde29 + e6a518c commit 8b58375

File tree

26 files changed

+340
-32
lines changed

26 files changed

+340
-32
lines changed

.teamcity/utils.kt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,12 @@ const val releaseVersionParameter = "releaseVersion"
1212
const val libraryStagingRepoDescription = "kotlinx-benchmark"
1313

1414
val platforms = Platform.values()
15-
const val jdk = "JDK_18_x64"
15+
const val jdk = "JDK_17_0"
1616

1717
enum class Platform {
1818
Windows, Linux, MacOS;
1919
}
2020

21-
fun Platform.nativeTaskPrefix(): String = when(this) {
22-
Platform.Windows -> "mingwX64"
23-
Platform.Linux -> "linuxX64"
24-
Platform.MacOS -> "macosX64"
25-
}
2621
fun Platform.buildTypeName(): String = when (this) {
2722
Platform.Windows, Platform.Linux -> name
2823
Platform.MacOS -> "Mac OS X"
@@ -117,4 +112,4 @@ fun BuildType.dependsOnSnapshot(build: IdOwner, onFailure: FailureAction = Failu
117112
onDependencyCancel = FailureAction.CANCEL
118113
}
119114
}
120-
}
115+
}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## 0.4.14
4+
5+
- Fixed various issues specific to Kotlin/JS projects [#292](https://github.com/Kotlin/kotlinx-benchmark/pull/292)
6+
- Added benchmark name validation for JVM [#304](https://github.com/Kotlin/kotlinx-benchmark/pull/304)
7+
- Various build infrastructure updates
8+
39
## 0.4.13
410

511
- Support Kotlin 2.0.0 and newer [#255](https://github.com/Kotlin/kotlinx-benchmark/pull/255)

CONTRIBUTING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributing Guidelines
2+
3+
One can contribute to the project by reporting issues or submitting changes via pull request.
4+
5+
## Reporting issues
6+
7+
Please use [GitHub issues](https://github.com/Kotlin/kotlinx-benchmark/issues) for filing feature requests and bug reports.
8+
9+
Questions about usage and general inquiries are better suited for StackOverflow or the #benchmarks channel in KotlinLang Slack.
10+
11+
## Submitting changes
12+
13+
Submit pull requests [here](https://github.com/Kotlin/kotlinx-benchmark/pulls).
14+
However, please keep in mind that maintainers will have to support the resulting code of the project,
15+
so do familiarize yourself with the following guidelines.
16+
17+
* All development (both new features and bug fixes) is performed in the `master` branch.
18+
* Base your PRs against the `master` branch.
19+
* If you make any code changes:
20+
* Follow the [Kotlin Coding Conventions](https://kotlinlang.org/docs/reference/coding-conventions.html).
21+
* Use 4 spaces for indentation.
22+
* Use imports with '*'.
23+
* [Build the project](#building) to make sure it all works and passes the tests.
24+
* If you fix a bug:
25+
* Write the test that reproduces the bug.
26+
* Depending on a particular bug, it may require either a unit or an integration test. For the latter, please check [integration module](integration/src/test) for examples.
27+
* Fixes without tests are accepted only in exceptional circumstances if it can be shown that writing the
28+
corresponding test is too hard or otherwise impractical.
29+
* Follow the style of writing tests that is used in this project:
30+
name test functions as `testXxx`. Don't use backticks in test names.
31+
* Comment on the existing issue if you want to work on it. Ensure that the issue not only describes a problem, but also describes a solution that has received positive feedback. Propose a solution if none has been suggested.
32+
33+
## Building
34+
35+
This project is built with Gradle.
36+
37+
* Run `./gradlew build` to build. It also runs all the tests.
38+
39+
You can import this project into IDEA, but you have to delegate build actions
40+
to Gradle (in Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle -> Build and run).
41+
42+
### Updating the public API dump
43+
44+
* Use the [Binary Compatibility Validator](https://github.com/Kotlin/binary-compatibility-validator/blob/master/README.md) for updates to public API:
45+
* Run `./gradlew apiDump` to update API index files.
46+
* Commit the updated API indexes together with other changes.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ dedicated to setting up benchmarking in those specific project types.
5959
```kotlin
6060
// build.gradle.kts
6161
plugins {
62-
id("org.jetbrains.kotlinx.benchmark") version "0.4.13"
62+
id("org.jetbrains.kotlinx.benchmark") version "0.4.14"
6363
}
6464
```
6565

@@ -82,7 +82,7 @@ dedicated to setting up benchmarking in those specific project types.
8282
sourceSets {
8383
commonMain {
8484
dependencies {
85-
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.13")
85+
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.14")
8686
}
8787
}
8888
}
@@ -107,7 +107,7 @@ dedicated to setting up benchmarking in those specific project types.
107107
```groovy
108108
// build.gradle
109109
plugins {
110-
id 'org.jetbrains.kotlinx.benchmark' version '0.4.13'
110+
id 'org.jetbrains.kotlinx.benchmark' version '0.4.14'
111111
}
112112
```
113113

@@ -130,7 +130,7 @@ dedicated to setting up benchmarking in those specific project types.
130130
sourceSets {
131131
commonMain {
132132
dependencies {
133-
implementation 'org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.13'
133+
implementation 'org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.14'
134134
}
135135
}
136136
}

docs/configuration-options.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,29 @@ benchmark {
8484
- **"definedByJmh"** – Let JMH determine the amount, using the value in the [`@Fork` annotation](https://javadoc.io/doc/org.openjdk.jmh/jmh-core/latest/org/openjdk/jmh/annotations/Fork.html) for the benchmark function or its enclosing class. If not specified by `@Fork`, it defaults to [Defaults.MEASUREMENT_FORKS (`5`)](https://javadoc.io/doc/org.openjdk.jmh/jmh-core/latest/org/openjdk/jmh/runner/Defaults.html#MEASUREMENT_FORKS).
8585

8686
The library offers the flexibility to specify the version of the Java Microbenchmark Harness (JMH) to use when running benchmarks on the JVM.
87-
The default version is set to `1.21`, but you can customize it while registering a JVM target for benchmarking:
87+
The default version is set to `1.37`, but you can customize it while registering a JVM target for benchmarking:
8888

8989
```kotlin
9090
benchmark {
9191
targets {
9292
register("jvmBenchmarks") {
9393
this as JvmBenchmarkTarget
94-
jmhVersion = "1.36"
94+
jmhVersion = "1.38"
9595
}
9696
}
9797
}
9898
```
9999

100100
Alternatively, you can utilize the project property `benchmarks_jmh_version` to achieve the same effect.
101101

102+
> [!WARNING]
103+
> While it is possible to register multiple JVM benchmark targets with different JMH versions,
104+
> such configurations are not supported. Using such configurations may result in runtime errors.
105+
106+
> [!NOTE]
107+
> It is recommended to change JMH version only when a new JMH version was released,
108+
> but `kotlinx-benchmark` plugin applied to a project is still using an older version.
109+
102110
### Kotlin/JS & Kotlin/Wasm
103111
| Option | Description | Possible Values | Default Value |
104112
|-----------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------|---------------|

examples/java/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ benchmark {
2525
targets {
2626
register("main") {
2727
this as JvmBenchmarkTarget
28-
jmhVersion = "1.21"
28+
jmhVersion = "1.37"
2929
}
3030
}
3131
}

examples/kotlin-jvm-separate-benchmark-source-set/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ benchmark {
4343
targets {
4444
register("benchmarks") {
4545
if (this is JvmBenchmarkTarget) {
46-
jmhVersion = "1.21"
46+
jmhVersion = "1.37"
4747
}
4848
}
4949
}

examples/kotlin-jvm/build.gradle.kts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ benchmark {
3636
}
3737
}
3838
targets {
39-
register("main") {
40-
this as JvmBenchmarkTarget
41-
jmhVersion = "1.21"
42-
}
39+
register("main")
4340
}
44-
}
41+
}

examples/kotlin-multiplatform/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ benchmark {
103103
// This one matches target name, e.g. 'jvm', 'js',
104104
// and registers its 'main' compilation, so 'jvm' registers 'jvmMain'
105105
register("jvm") {
106-
jmhVersion = "1.21"
106+
jmhVersion = "1.37"
107107
}
108108
// This one matches source set name, e.g. 'jvmMain', 'jvmTest', etc
109109
// and register the corresponding compilation (here the 'benchmark' compilation declared in the 'jvm' target)
110110
register("jvmBenchmark") {
111-
jmhVersion = "1.21"
111+
jmhVersion = "1.37"
112112
}
113113
register("jsDefaultExecutor")
114114
register("jsBuiltInExecutor") {

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ kotlin-for-gradle-plugin = "2.0.20" # Kotlin 2.1 removes support for the used la
66
kotlinx-binaryCompatibilityValidator = "0.16.2"
77
kotlinx-teamInfra = "0.4.0-dev-85"
88
squareup-kotlinpoet = "1.3.0"
9-
jmh = "1.21"
9+
jmh = "1.37"
1010
gradle-pluginPublish = "0.21.0"
1111

1212
# Note: This version can be overridden by passing `-Pmin_supported_gradle_version=<version>`

0 commit comments

Comments
 (0)