Why is SampleTime has a limit of 20000 measurements and the rest are thrown away?
Aleksey Shipilev
aleksey.shipilev at oracle.com
Tue Dec 9 12:13:58 UTC 2014
On 12/06/2014 11:27 PM, Konstantin Dmitriev wrote:
> int targetSamples = (int)
> (control.getDuration(TimeUnit.MILLISECONDS) * 20); // at max, 20
> timestamps per millisecond
This is why [1]:
"Looking at this graph, calling nanoTime quicker than 32 us across all
threads will hit the scalability bottleneck on this particular machine.
The entire white spot under the "scalability front" is a forbidden zone.
You can’t measure anything there.
NOTE: This is why JMH-ish SampleTime mode will backoff aggressively
instead of measuring every single call."
Thanks,
-Aleksey.
[1] http://shipilev.net/blog/2014/nanotrusting-nanotime/
More information about the jmh-dev
mailing list