Skip to content

sureshg/jmh-bench-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

854 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JMH Benchmark Sample

WorksWithOpenJDK

GitHub Workflow Status JMH Kotlin release OpenJDK Version Style guide

A sample repo for building Java and Kotlin benchmarks with JMH and publish the artifacts to GitHub Package Registry.

  • 🏗️ Build & Run

$ ./mvnw clean verify
$ java --enable-preview -jar target/benchmarks.jar

# Get a list of supported formats
$ java --enable-preview -jar target/benchmarks.jar -lrf

# For JSON output
$ java --enable-preview -jar target/benchmarks.jar -rf json
  • 🏃 Run with Async-Profiler

$ java --enable-preview -jar target/benchmarks.jar \
       -prof "async:libPath=/path/to/async-profiler-3.0/lib/libasyncProfiler.dylib;output=jfr;rawCommand=features=vtable"
  • 🏃 Run with profiling (requires hsdis)

$ java --enable-preview -jar target/benchmarks.jar -prof perfasm
🎨 JMH Visualization

JMH Benchmarks Viz

🔖 Resources
🛠️ Misc
# Maven and dependencies updates.
$ ./mvnw wrapper:wrapper -Dmaven=3.9.2
$ ./mvnw --version
$ ./mvnw clean versions:display-dependency-updates versions:display-plugin-updates versions:display-property-updates
$ ./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout
$ ./mvnw pilot:pilot
©️ Credits

Packages

 
 
 

Contributors