JMH numeric precision of auxiliary counters only 8 digits
Aleksey Shipilev
shade at redhat.com
Wed Sep 26 14:17:06 UTC 2018
Hi,
On 09/26/2018 04:08 PM, Erich Schubert wrote:
> The Aux Counters - even when long counters - are only written to the JSON with float precision,
> with 8 digits of precision. For large values, this loses some precision. Given that the aux
> counter API only allows integer and long, printing the raw values as float does not make sense.
Not sure I understand without trying the examples. Are you saying that large long values are getting
cut? Can you show the sample value that is erroneously printed in JSON?
> We are currently doing some memory measurements using aux counters in @TearDown, and these need more
> than 8 digits...
Any particular reason why JMH profilers are not usable for memory measurements like these? We are
not paying much attention to AuxCounters (as mentioned in its Javadoc, it is experimental API),
thinking that most data should be acquirable by other means.
> I also provided a patch in July to not print useless quantiles:
> http://mail.openjdk.java.net/pipermail/jmh-dev/2018-July/002755.html
>
> but I never got an answer...
I'll reply later.
> Furthermore, I send an email to report that Aux counters should be enabled for single-shot
> benchmarks, it wasn't even moderated yet?
>
> Is there any actual issue tracker (github?) for JMH?
There is codetools/jmh at bugs.openjdk.java.net, but it is unfortunately only writable by OpenJDK
people, starting from Authors.
-Aleksey
More information about the jmh-dev
mailing list