Registry / testing / jmh-core

jmh-core

JSON →
library1.25.2javamavenunverified

Java harness for building, running, and analysing nano/micro/macro benchmarks on the JVM.

<dependency> <groupId>org.openjdk.jmh</groupId> <artifactId>jmh-core</artifactId> <version>1.25.2</version> </dependency>
INSTALL
IMPORT
SIG · JMH-CORE
J
jmh-core
testingjavav1.25.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Benchmark
org.openjdk.jmh.annotations.Benchmark

Simple JMH benchmark with runner.

import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; public class MyBenchmark { @Benchmark public void testMethod() { // benchmark code } public static void main(String[] args) throws Exception { Options opt = new OptionsBuilder() .include(MyBenchmark.class.getSimpleName()) .forks(1) .build(); new Runner(opt).run(); } }
Debug
Known issues
gotchaJMH benchmarks must be run with the provided harness; do not run as plain JUnit tests.
fix
Use the JMH runner or Maven plugin to execute benchmarks.
affects: *
Upgrade
Version history
1.25.2latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
jmh-core — mvn dependency:get jmh-core · libregistry