Skip to content

Wire -Pjmh.includes and -PtestJvm into internal-api JMH config#11703

Open
dougqh wants to merge 2 commits into
masterfrom
dougqh/jmh-gradle-improvements
Open

Wire -Pjmh.includes and -PtestJvm into internal-api JMH config#11703
dougqh wants to merge 2 commits into
masterfrom
dougqh/jmh-gradle-improvements

Conversation

@dougqh

@dougqh dougqh commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What This Does

Wires two previously-ignored Gradle properties into the internal-api JMH configuration:

  • -Pjmh.includes=<pattern> — filters which benchmarks run. Previously silently ignored by the me.champeau.jmh plugin, requiring a full fat-jar build to run a single benchmark.
  • -PtestJvm=<version> — selects the JVM used for benchmark execution. Previously ignored, defaulting to whatever JVM the Gradle daemon happened to use.

Usage:

./gradlew :internal-api:jmh -Pjmh.includes=AtomicsBenchmark -PtestJvm=17

Motivation

Running a single benchmark without this fix required building the full fat-jar and invoking it manually. The JVM defaulted to the daemon JVM rather than the requested version, making results non-reproducible across machines.

Additional Notes

The same pattern applies to other modules that use me.champeau.jmh (there are ~10 others). This PR fixes internal-api where current benchmark development is happening; other modules can adopt the pattern as needed.

tag: no release note

🤖 Generated with Claude Code

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>
@dougqh dougqh requested a review from a team as a code owner June 22, 2026 23:58
@dougqh dougqh requested a review from mhlidd June 22, 2026 23:58
@dd-octo-sts dd-octo-sts Bot added the tag: ai generated Largely based on code generated by an AI or LLM label Jun 22, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@datadog-prod-us1-4

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.91 s 13.93 s [-0.8%; +0.6%] (no difference)
startup:insecure-bank:tracing:Agent 12.83 s 12.98 s [-1.8%; -0.5%] (maybe better)
startup:petclinic:appsec:Agent 16.94 s 16.69 s [+0.7%; +2.4%] (maybe worse)
startup:petclinic:iast:Agent 16.84 s 17.01 s [-1.9%; -0.1%] (maybe better)
startup:petclinic:profiling:Agent 16.91 s 16.80 s [-0.4%; +1.7%] (no difference)
startup:petclinic:sca:Agent 16.94 s 16.67 s [+0.6%; +2.6%] (maybe worse)
startup:petclinic:tracing:Agent 16.05 s 16.26 s [-2.4%; -0.1%] (maybe better)

Commit: 2845c650 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@dougqh dougqh added type: enhancement Enhancements and improvements comp: core Tracer core labels Jun 23, 2026
@dougqh dougqh mentioned this pull request Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core tag: ai generated Largely based on code generated by an AI or LLM type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants