Skip to content

Build: Make JMH benchmark configuration flexible for JDK 17+ - #17414

Open
arijitroy003 wants to merge 1 commit into
apache:mainfrom
arijitroy003:fix/fix-jmh-gradle
Open

Build: Make JMH benchmark configuration flexible for JDK 17+#17414
arijitroy003 wants to merge 1 commit into
apache:mainfrom
arijitroy003:fix/fix-jmh-gradle

Conversation

@arijitroy003

Copy link
Copy Markdown

Summary

Make JMH benchmark configuration more flexible by allowing heap size and failure behavior to be overridden via Gradle properties. This helps developers who cannot allocate the default 32GB heap or run on JDK 17+ which requires module opens.

Changes

  • Make maxHeapSize configurable via -PjmhHeapSize= (default: 32g)
  • Make failOnError configurable via -PjmhFailOnError= (default: true)
  • Add JDK 17+ module opens for java.nio access

Testing

Verified builds with ./gradlew jmh -PjmhHeapSize=4g locally.

Allow heap size and failOnError to be overridden via Gradle
properties for environments that cannot allocate 32GB.

Signed-off-by: arijitroy003 <arijitroy003@gmail.com>
@github-actions github-actions Bot added the build label Jul 29, 2026

@uros-b uros-b left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arijitroy003 please note that this was already in progress: #17331

@arijitroy003 arijitroy003 changed the title Make JMH benchmark configuration flexible for JDK 17+ Build: Make JMH benchmark configuration flexible for JDK 17+ Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants