JMH convention plugin - #12048
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This comment has been minimized.
This comment has been minimized.
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
There was a problem hiding this comment.
More details
The JMH configuration is now applied centrally without changing the existing testJvm semantics: Gradle's withPlugin callback handles either plugin application order, and an unset testJvm leaves the JMH JVM unset. Focused execution was blocked because this checkout requires a Java 25 Gradle daemon while the sandbox has only JDK 8, 11, 17, and 21.
🤖 Datadog Autotest · Commit 9f4b41d · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
9f4b41d to
e5d4e59
Compare
* Use `testJvm` as the default JMH launcher while keeping * Use `jmh.*` properties when provided * Without `jmh.fork` or `jmh.threads`, forks and threads come from `@Fork` and `@Threads`; otherwise JMH defaults apply. * Without `jmh.includes`, JMH runs all discovered benchmarks. * Without `jmh.profilers`, no profiler is attached unless configured elsewhere.
e5d4e59 to
42af6e1
Compare
|
This looks good to me. It covers the things that I use frequently: selecting benchmarks, running with fewer forks, running with prof gc. It could also be nice to have the option to adjust warmupIterations and measurementIterations, too, but that's just nice to have. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
Introduces a JMH convention plugin, that support passing properties via command line for jmh runs. In particular it supports the
dd-trace-java.test-jvm-constraintstestJvmproperty to select the JVM.Other properties are also supported to adjust the JMH benchmark configuration
jmh.includesjmh.profilersstack,gc)jmh.forksjmh.threadsMotivation
Provide a regular "standardized" way to adjust benchmark runs via command line.
Added as a convention plugin so it avoids repetition. Follow what's done in #11703, among others.
Additional Notes
Due to the way classloader works between
buildsrc/and regular projects, the plugin code has to use reflection.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]