controlling the exact number of times a method is called

Aleksey Shipilev aleksey.shipilev at oracle.com
Mon Jun 30 10:16:16 UTC 2014


On 06/27/2014 01:40 AM, Aleksey Shipilev wrote:
>> 1) How did that happen?
> 
> What did happen? Trying to decipher: you wanted the number of samples to
> be equal to batch size? Batch size is the number of @B method calls per
> batch, not per iteration; batching makes sense only when you measure the
> individual operations, e.g. in SingleShot mode.
> 
> In other modes, batching is not working. It might be a good idea to
> extend batching to SampleTime, so that we can time the entire batch, hm...

Okay, with this change, batching is available in all benchmark modes:
 http://hg.openjdk.java.net/code-tools/jmh/rev/3c8d4f23d112

(Although, AverageTime and Throughput modes fake the results with batch
sizes > 1, because it is meaningless to get yet another loop in the
generated loop method).

Thanks,
-Aleksey.





More information about the jmh-dev mailing list