Skip to content

Update JMH #3531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ build
out
target
local.properties
benchmarks.jar
/kotlin-js-store
24 changes: 5 additions & 19 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

@file:Suppress("UnstableApiUsage")

import me.champeau.gradle.*
import me.champeau.jmh.*
import org.jetbrains.kotlin.gradle.tasks.*

plugins {
id("com.github.johnrengelman.shadow")
id("me.champeau.gradle.jmh") apply false
id("me.champeau.jmh")
}

repositories {
Expand All @@ -21,33 +21,19 @@ java {
targetCompatibility = JavaVersion.VERSION_1_8
}

apply(plugin="me.champeau.gradle.jmh")

tasks.named<KotlinCompile>("compileJmhKotlin") {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += "-Xjvm-default=enable"
}
}

// It is better to use the following to run benchmarks, otherwise you may get unexpected errors:
// ./gradlew --no-daemon cleanJmhJar jmh -Pjmh="MyBenchmark"
extensions.configure<JMHPluginExtension>("jmh") {
jmhVersion = "1.26"
duplicateClassesStrategy = DuplicatesStrategy.INCLUDE
failOnError = true
resultFormat = "CSV"
project.findProperty("jmh")?.also {
include = listOf(".*$it.*")
}
// includeTests = false
}

val jmhJarTask = tasks.named<Jar>("jmhJar") {
archiveBaseName by "benchmarks"
archiveClassifier by null
archiveVersion by null
destinationDirectory.file("$rootDir")
archiveVersion.convention(null as String?)
destinationDirectory.set(file("$rootDir"))
}

tasks {
Expand All @@ -63,7 +49,7 @@ tasks {
}

dependencies {
implementation("org.openjdk.jmh:jmh-core:1.26")
implementation("org.openjdk.jmh:jmh-core:1.35")
implementation("io.projectreactor:reactor-core:${version("reactor")}")
implementation("io.reactivex.rxjava2:rxjava:2.1.9")
implementation("com.github.akarnokd:rxjava2-extensions:0.20.8")
Expand Down
5 changes: 1 addition & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
pluginManagement {
plugins {
id "org.openjfx.javafxplugin" version javafx_plugin_version

// JMH
id "net.ltgt.apt" version "0.21"
id "me.champeau.gradle.jmh" version "0.5.3"
id "me.champeau.jmh" version "0.6.8"
}

repositories {
Expand Down