Skip to content

Commit e500e6a

Browse files
dougqhdevflow.devflow-routing-intake
andauthored
Wire -Pjmh.includes and -PtestJvm into internal-api JMH config (#11703)
Wire -Pjmh.includes and -PtestJvm into internal-api JMH config Without this, -Pjmh.includes is silently ignored by the me.champeau.jmh plugin, requiring a full fat-jar build to run a single benchmark. -PtestJvm was also ignored for JMH execution, defaulting to the Gradle daemon JVM regardless of the requested version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Merge branch 'master' into dougqh/jmh-gradle-improvements Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>
1 parent 8ae094c commit e500e6a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

internal-api/build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import datadog.gradle.plugin.testJvmConstraints.TestJvmSpec
12
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
23
import groovy.lang.Closure
34

@@ -274,4 +275,13 @@ dependencies {
274275
jmh {
275276
jmhVersion = libs.versions.jmh.get()
276277
duplicateClassesStrategy = DuplicatesStrategy.EXCLUDE
278+
279+
if (project.hasProperty("jmh.includes")) {
280+
includes.add(project.property("jmh.includes") as String)
281+
}
282+
283+
if (project.hasProperty("testJvm")) {
284+
val testJvmSpec = TestJvmSpec(project)
285+
jvm.set(testJvmSpec.javaTestLauncher.map { it.executablePath.asFile.absolutePath })
286+
}
277287
}

0 commit comments

Comments
 (0)