├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── scopes │ └── scope_settings.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── artifacts │ └── jmh_profilers.xml ├── libraries │ ├── Maven__junit_junit_4_8_1.xml │ ├── Maven__org_openjdk_jmh_jmh_core_1_3_1.xml │ ├── Maven__net_sf_jopt_simple_jopt_simple_4_6.xml │ ├── Maven__org_apache_commons_commons_math3_3_2.xml │ └── Maven__org_openjdk_jmh_jmh_generator_annprocess_1_3_1.xml ├── misc.xml ├── compiler.xml └── uiDesigner.xml ├── src └── main │ ├── resources │ └── META-INF │ │ └── services │ │ └── org.openjdk.jmh.profile.Profiler │ └── java │ └── profilers │ └── FlightRecordingProfiler.java ├── .travis.yml ├── license ├── jmh-profilers.iml ├── .gitignore ├── README.md └── pom.xml /.idea/.name: -------------------------------------------------------------------------------- 1 | jmh-profilers -------------------------------------------------------------------------------- /src/main/resources/META-INF/services/org.openjdk.jmh.profile.Profiler: -------------------------------------------------------------------------------- 1 | profilers.FlightRecordingProfiler -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | 3 | jdk: 4 | - oraclejdk8 5 | 6 | install: mvn install -Dgpg.skip=true -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/artifacts/jmh_profilers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/out/artifacts/jmh_profilers 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__junit_junit_4_8_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_openjdk_jmh_jmh_core_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_sf_jopt_simple_jopt_simple_4_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_math3_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_openjdk_jmh_jmh_generator_annprocess_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) {{{year}}} {{{fullname}}} 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /jmh-profilers.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io 2 | 3 | ### Maven ### 4 | target/ 5 | pom.xml.tag 6 | pom.xml.releaseBackup 7 | pom.xml.versionsBackup 8 | pom.xml.next 9 | release.properties 10 | 11 | 12 | ### Java ### 13 | *.class 14 | 15 | # Mobile Tools for Java (J2ME) 16 | .mtj.tmp/ 17 | 18 | # Package Files # 19 | *.jar 20 | *.war 21 | *.ear 22 | 23 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 24 | hs_err_pid* 25 | 26 | 27 | ### Intellij ### 28 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 29 | 30 | *.iml 31 | 32 | ## Directory-based project format: 33 | .idea/ 34 | # if you remove the above rule, at least ignore the following: 35 | 36 | # User-specific stuff: 37 | # .idea/workspace.xml 38 | # .idea/tasks.xml 39 | # .idea/dictionaries 40 | 41 | # Sensitive or high-churn files: 42 | # .idea/dataSources.ids 43 | # .idea/dataSources.xml 44 | # .idea/sqlDataSources.xml 45 | # .idea/dynamic.xml 46 | # .idea/uiDesigner.xml 47 | 48 | # Gradle: 49 | # .idea/gradle.xml 50 | # .idea/libraries 51 | 52 | # Mongo Explorer plugin: 53 | # .idea/mongoSettings.xml 54 | 55 | ## File-based project format: 56 | *.ipr 57 | *.iws 58 | 59 | ## Plugin-specific files: 60 | 61 | # IntelliJ 62 | out/ 63 | 64 | # mpeltonen/sbt-idea plugin 65 | .idea_modules/ 66 | 67 | # JIRA plugin 68 | atlassian-ide-plugin.xml 69 | 70 | # Crashlytics plugin (for Android Studio and IntelliJ) 71 | com_crashlytics_export_strings.xml 72 | crashlytics.properties 73 | crashlytics-build.properties 74 | 75 | # Eclipse 76 | .classpath 77 | .project 78 | .settings/ 79 | 80 | # VSCode 81 | .vscode/ 82 | 83 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## JMH Pluggable Profilers 2 | [![Build Status](https://travis-ci.org/biboudis/jmh-profilers.svg?branch=master)](https://travis-ci.org/biboudis/jmh-profilers) [![Maven Central](https://img.shields.io/maven-central/v/com.github.biboudis/jmh-profilers.svg)](http://search.maven.org/#search|ga|1|a%3A%22jmh-profilers%22) 3 | 4 | Pluggable profilers for [JMH](http://openjdk.java.net/projects/code-tools/jmh/) 5 | that are discovered through SPI (for JMH >= 1.8) when the profiler is present in the classpath. 6 | 7 | ### Profilers List 8 | 1. JFR Profiler: starts automatically [Java Flight Recorder](http://docs.oracle.com/javase/8/docs/technotes/guides/jfr/) 9 | and produces a .jfr file for each benchmark. Each file can be browsed afterwards 10 | via 11 | [Java Mission Control](http://www.oracle.com/technetwork/java/javaseproducts/mission-control/java-mission-control-1998576.html). 12 | This profiler can be considered by JMH as ```supported``` only if the user wants 13 | to explicitly enable the 14 | [commercial features](http://www.oracle.com/technetwork/java/javase/terms/products/index.html). 15 | 16 | ### Installation 17 | _where in the version field you can use the latest one_ 18 | #### Maven 19 | ``` 20 | 21 | com.github.biboudis 22 | jmh-profilers 23 | 0.1.4 24 | 25 | ``` 26 | #### SBT with sbt-jmh plugin 27 | ``` 28 | libraryDependencies ++= Seq("com.github.biboudis" % "jmh-profilers" % "0.1.2") 29 | ``` 30 | 31 | ### Usage 32 | Check if your profiler is discovered through the ```-lprof``` JMH option. This 33 | would append in the list of supported or unsupported profilers an entry of the 34 | following format: 35 | ``` 36 |