I'm new to micro bench-marking in general. When I execute the JMH task in my project I get "ERROR: Unable to find the resource: /META-INF/BenchmarkList", I believe is created by jmh-generator-annprocess. I am using Gradle and I am trying to figure out if jmh-generator-annprocess is even working? Will it work properly for Gradle or do I need to use the Maven plugin or something?
https://github.com/coderrick/JMH-Studies.git
in case you want to git clone
my project and run it yourself.
There was a couple of issues
JMHSample_02_BenchmarkModes
class was in incorrectly named java class apply plugin: "me.champeau.gradle.jmh"
declaration jmhJar
section Main-Class
manifest entry was overridden (which is unnecessary) I've made a PR with above fixes. After applying it you can run performance tests using
java -jar build/libs/JMH-Studies-jmh.jar
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.