I use jmh to compare a simple application (from the SO question Unexpected scalability results in java fork-join ) using maven and the subsequent command line approach, as recommended in http://openjdk.java.net/projects/code-tools/jmh/ . After successfully setting up and building the test, I get the following test results using avgt mode:
C:\Users\username\my-app\test>java -jar target/benchmarks.jar -bm avgt -f 1
Iteration 1: ? 10?¹? s/op
Iteration 2: ? 10?¹? s/op
Iteration 3: ? 10?? s/op
Iteration 4: ? 10?¹? s/op
Iteration 5: ? 10?¹? s/op
Iteration 6: ? 10?? s/op
Iteration 7: ? 10?¹? s/op
Iteration 8: ? 10?? s/op
Iteration 9: ? 10?? s/op
Iteration 10: ? 10?¹? s/op
Iteration 11: ? 10?? s/op
Iteration 12: ? 10?? s/op
Iteration 13: ? 10?¹? s/op
Iteration 14: ? 10?? s/op
Iteration 15: ? 10?? s/op
Iteration 16: ? 10?¹? s/op
Iteration 17: ? 10?? s/op
Iteration 18: ? 10?¹? s/op
Iteration 19: ? 10?¹? s/op
Iteration 20: ? 10?¹? s/op
Result "testMethod":
? 10?¹? s/op
Benchmark Mode Cnt Score Error Units
MyBenchmark.testMethod avgt 20 ? 10?¹? s/op
I am not sure how to interpret this conclusion, but I am quite sure that something went wrong ...? Any idea what and how to debug this?
source
share