Skip to content

Commit

Permalink
Upgrade JMH gradle dependency to 0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
alancai98 committed May 14, 2024
1 parent 5d49b21 commit 1aac0c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
9 changes: 2 additions & 7 deletions buildSrc/src/main/kotlin/partiql.versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object Versions {
const val jansi = "2.4.0"
const val jgenhtml = "1.6"
const val jline = "3.21.0"
const val jmhGradlePlugin = "0.5.3"
const val jmhGradlePlugin = "0.7.2"
const val jmhCore = "1.37"
const val jmhGeneratorAnnprocess = "1.37"
const val jmhGeneratorBytecode = "1.37"
Expand Down Expand Up @@ -108,11 +108,6 @@ object Deps {
const val mockk = "io.mockk:mockk:${Versions.mockk}"
const val kotlinxCoroutinesTest = "org.jetbrains.kotlinx:kotlinx-coroutines-test:${Versions.kotlinxCoroutinesTest}"
const val ktlintTest = "com.pinterest.ktlint:ktlint-test:${Versions.ktlint}"

// JMH Benchmarking
const val jmhCore = "org.openjdk.jmh:jmh-core:${Versions.jmhCore}"
const val jmhGeneratorAnnprocess = "org.openjdk.jmh:jmh-core:${Versions.jmhGeneratorAnnprocess}"
const val jmhGeneratorBytecode = "org.openjdk.jmh:jmh-core:${Versions.jmhGeneratorBytecode}"
}

object Plugins {
Expand All @@ -126,7 +121,7 @@ object Plugins {
const val application = "org.gradle.application"
const val detekt = "io.gitlab.arturbosch.detekt"
const val dokka = "org.jetbrains.dokka"
const val jmh = "me.champeau.gradle.jmh"
const val jmh = "me.champeau.jmh"
const val library = "org.gradle.java-library"
const val testFixtures = "org.gradle.java-test-fixtures"
}
14 changes: 1 addition & 13 deletions partiql-lang/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ dependencies {
testImplementation(Deps.junitVintage) // Enables JUnit4
testImplementation(Deps.mockk)
testImplementation(Deps.kotlinxCoroutinesTest)

// The JMH gradle plugin that we currently use is 0.5.3, which uses JMH version 1.25. The JMH gradle plugin has a
// newer version (see https://github.com/melix/jmh-gradle-plugin/releases) which upgrades the JMH version. We can't
// use that newer plugin version until we upgrade our gradle version to 8.0+. JMH version 1.25 does not support
// creating CPU flamegraphs using the JMH benchmarks, hence why the newer version dependency is specified here.
//
// When we upgrade gradle to 8.0+, we can upgrade the gradle plugin to the latest and remove this dependency block
dependencies {
jmh(Deps.jmhCore)
jmh(Deps.jmhGeneratorAnnprocess)
jmh(Deps.jmhGeneratorBytecode)
}
}

val relocations = mapOf(
Expand Down Expand Up @@ -91,7 +79,7 @@ publish {
jmh {
resultFormat = properties["resultFormat"] as String? ?: "json"
resultsFile = project.file(properties["resultsFile"] as String? ?: "$buildDir/reports/jmh/results.json")
include = listOfNotNull(properties["include"] as String?)
includes = listOfNotNull(properties["include"] as String?)
properties["warmupIterations"]?.let { it -> warmupIterations = Integer.parseInt(it as String) }
properties["iterations"]?.let { it -> iterations = Integer.parseInt(it as String) }
properties["fork"]?.let { it -> fork = Integer.parseInt(it as String) }
Expand Down

0 comments on commit 1aac0c5

Please sign in to comment.