biboudis/jmh-profilers


Pluggable profilers for JMH 1.8

Download


Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}
	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.biboudis:jmh-profilers:jmh-profilers-0.1.4'
	}
	<dependency>
	    <groupId>com.github.biboudis</groupId>
	    <artifactId>jmh-profilers</artifactId>
	    <version>jmh-profilers-0.1.4</version>
	</dependency>

                            
    libraryDependencies += "com.github.biboudis" % "jmh-profilers" % "jmh-profilers-0.1.4"
        
        

                            
    :dependencies [[com.github.biboudis/jmh-profilers "jmh-profilers-0.1.4"]]
        
        

Readme


JMH Pluggable Profilers

Build Status Maven Central

Pluggable profilers for JMH that are discovered through SPI (for JMH >= 1.8) when the profiler is present in the classpath.

Profilers List

  1. JFR Profiler: starts automatically Java Flight Recorder and produces a .jfr file for each benchmark. Each file can be browsed afterwards via Java Mission Control. This profiler can be considered by JMH as supported only if the user wants to explicitly enable the commercial features.

Installation

where in the version field you can use the latest one

Maven

<dependency>
  <groupId>com.github.biboudis</groupId>
  <artifactId>jmh-profilers</artifactId>
  <version>0.1.4</version>
</dependency>

SBT with sbt-jmh plugin

libraryDependencies ++= Seq("com.github.biboudis" % "jmh-profilers" % "0.1.2")

Usage

Check if your profiler is discovered through the -lprof JMH option. This would append in the list of supported or unsupported profilers an entry of the following format:

<label>: <description>. (discovered)

Contributing

Sending PRs with improvements, additions with new profilers and opening issues is highly encouraged.