Skip to content

james-freitas/jmh-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Performance measurement with JMH – Java Microbenchmark Harness

JMH is a tool for measuring Java code performance, primarily focused on microbenchmarks.

New project

To create a new project that supports JMH run with maven:

$ mvn archetype:generate \
          -DinteractiveMode=false \
          -DarchetypeGroupId=org.openjdk.jmh \
          -DarchetypeArtifactId=jmh-java-benchmark-archetype \
          -DgroupId=com.company \
          -DartifactId=jmhTest \
          -Dversion=1.0

Build the benchmarks

Run this Maven command in the root folder of your project:

mvn clean install

Run the benchmarks

Run this Maven command in the root folder of your project:

java -jar target/benchmarks.jar

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages