Enhancement: Report number of threads in summary report
Aleksey Shipilev
aleksey.shipilev at oracle.com
Thu Jan 14 15:09:22 UTC 2016
On 01/14/2016 05:59 PM, Nitsan Wakart wrote:
> JMH allows us to set the number of benchmark threads, and to set up
> thread groups. The number of threads has a potentially large impact
> on the results but is not reported in the summary. I would like to
> have the number of threads reported e.g(ignore the values):
We actually had that long before, but removed it. While it is true that
a number of threads indeed affects the result, many other run options do
that too (e.g. OpsPerInvocation, batch sizes, etc) -- where do you stop?
Last time we decided that only the performance data itself would be
printed out in the report.
> Benchmark Ts Mode Cnt Score Error Units
> Contentention.getAndAdd 1 avgt 5 27.300 ± 0.406 ns/op
> Contentention.getAndAdd 2 avgt 5 270.300 ± 0.406 ns/op
> Contentention.getAndAdd 20 avgt 5 2700.300 ± 0.406 ns/op
This suggests that a number of threads is changing within a single
trial, how exactly that is accomplished? Before, we had the sequencing
-t, where you could list the number of threads, but we don't anymore.
> The report will be look like this for groups:
> Benchmark Ts Mode Cnt Score Error Units
> Contentention.g 22 avgt 5 2270.300 ± 0.406 ns/op
> Contentention.g:get 2 avgt 5 270.300 ± 0.406 ns/op
> Contentention.g:getAndAdd 20 avgt 5 2700.300 ± 0.406 ns/op
This report is subtly misleading. Is that (2x get, 20x getAndAdd), or
2x(1x get, 10x getAndAdd)? This confused users before, and was the
trigger for removing threads column as well.
Thanks,
-Aleksey
More information about the jmh-dev
mailing list