The JMH Gradle Plugin provides integration of the Java Microbenchmark Harness (JMH) into Gradle builds, enabling developers to write and run performance benchmarks directly in their projects. JMH is the de facto standard for writing accurate and reliable Java microbenchmarks, and this plugin automates tasks like generating benchmark sources, compiling them with the required JMH support classes, and packaging runnable benchmark jars. It simplifies the workflow by handling classpath setup and wiring Gradle tasks for running benchmarks. Developers can run benchmarks via Gradle commands, produce reports, and compare performance over time. This reduces the manual effort of setting up JMH, making performance testing a natural part of the development cycle. The plugin is especially useful in projects where regression in execution speed or memory use must be carefully monitored.

Features

  • Adds Gradle tasks to compile and run JMH benchmarks
  • Creates fat JARs with all runtime dependencies merged
  • Minimal setup via simple plugin application
  • Efficient handling of large dependency graphs with zip64 support
  • Conventional layout and behavior for source and benchmark tasks
  • Recognized in the Gradle ecosystem (also published as me.champeau.jmh)

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow JMH Gradle Plugin

JMH Gradle Plugin Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of JMH Gradle Plugin!

Additional Project Details

Programming Language

Groovy

Related Categories

Groovy Software Development Software

Registered

2025-09-03