Value returned by benchmark method.

Artem Barger artem at bargr.net
Wed Aug 10 20:32:14 UTC 2016


On Wed, Aug 10, 2016 at 10:46 PM, Aleksey Shipilev <
aleksey.shipilev at gmail.com> wrote:

> OK! My answer stands: run the workload code separately, and compute
> whatever based on the returned data coming from workload methods. JMH
> measures performance, not the arbitrary user metrics (with little
> exceptions we occasionally regret).
>

​Yeah, I agree, just though that introducing a new annotation allowing to
collect
numerical results​ from the workloads and latter showing stats on these
results
could be somewhat interesting.


>
> We wouldn't do better than recording results in a list/array and dumping
> it at the end of the run anyway. You might do that yourself by putting
> "recording" code into @Benchmark method, and dump the buffer at
> @TearDown. But I think it would be less painful to avoid dragging JMH
> into this.
>

​Yes, this can work, just afraid that adding these workaround manipulations
might bring additional performance hit. :/

Best regards,
                      Artem Barger.


More information about the jmh-dev mailing list