markusw
markusw

Reputation: 2055

JMH: What does the score value mean?

I don't understand the score attribute from the JMH results? I don't find anything on the web about it, too.

Can anyone tell me, what it is about? As far as I understand is a higher score better than a lower, but what does it exactly mean and how is it calculated?

Upvotes: 37

Views: 8679

Answers (1)

Artur Mkrtchyan
Artur Mkrtchyan

Reputation: 981

JMH supports the following Benchmark modes:

  • Throughput: operations per unit of time
  • AverageTime: average time per operation
  • SampleTime: samples the time for each operation
  • SingleShotTime: measures the time for a single operation

Now you can analyse if higher score is better or not.

The default benchmark mode is (Throughput) 1 and in this case higher value is better.

If you are interested how exactly each benchmark result is calculated check here.

Upvotes: 29

Related Questions