Skip to content

Commit 2338534

Browse files
committed
Use dotted property form for JMH options (jmh.includes) and testJvm property for the JMH JVM
1 parent a6af161 commit 2338534

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

dd-trace-core/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ dependencies {
114114
jmh {
115115
jmhVersion = libs.versions.jmh.get()
116116
duplicateClassesStrategy = DuplicatesStrategy.EXCLUDE
117-
if (project.hasProperty('jmhIncludes')) {
118-
includes = [project.jmhIncludes]
117+
if (project.hasProperty('jmh.includes')) {
118+
includes = [project.getProperty('jmh.includes')]
119119
}
120-
if (project.hasProperty('jmhProfilers')) {
121-
profilers = [project.jmhProfilers]
120+
if (project.hasProperty('jmh.profilers')) {
121+
profilers = [project.getProperty('jmh.profilers')]
122122
}
123-
if (project.hasProperty('jmhJvm')) {
123+
if (project.hasProperty('testJvm')) {
124124
jvm = project.javaToolchains.launcherFor {
125-
languageVersion = JavaLanguageVersion.of(project.jmhJvm as int)
125+
languageVersion = JavaLanguageVersion.of(project.testJvm as int)
126126
}.map { it.executablePath.asFile.absolutePath }
127127
}
128128
}

dd-trace-core/src/jmh/java/datadog/context/ContextManagerBenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* <p>Run with:
3535
*
3636
* <pre>
37-
* {@code ./gradlew :dd-trace-core:jmh -PjmhIncludes=ContextManagerBenchmark -PjmhJvm=25 -PjmhProfilers=gc}
37+
* {@code ./gradlew :dd-trace-core:jmh -Pjmh.includes=ContextManagerBenchmark -PtestJvm=25 -Pjmh.profilers=gc}
3838
* </pre>
3939
*/
4040
@State(Scope.Benchmark)

dd-trace-core/src/jmh/java/datadog/context/ContextManagerDepthBenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* <p>Run with:
2929
*
3030
* <pre>
31-
* {@code ./gradlew :dd-trace-core:jmh -PjmhIncludes=ContextManagerDepthBenchmark -PjmhJvm=25 -PjmhProfilers=gc}
31+
* {@code ./gradlew :dd-trace-core:jmh -Pjmh.includes=ContextManagerDepthBenchmark -PtestJvm=25 -Pjmh.profilers=gc}
3232
* </pre>
3333
*/
3434
@State(Scope.Benchmark)

0 commit comments

Comments
 (0)