Locale dependency of JMH, div by 0 in ListStatistics
Aleksey Shipilev
aleksey.shipilev at oracle.com
Mon Dec 22 14:17:54 UTC 2014
Hi Erich,
On 12/22/2014 03:54 PM, Erich Schubert wrote:
> I couldn't find a way to report bugs in JIRA (I find navigating the
> openJDK web pages horrible, too), so I'm posting to the list.
Yes, thanks. JIRA is open for submissions for OpenJDK authors only,
sorry about that. I submitted the bug reports on your behalf. I agree
both are bugs. Let me attend to them.
> 1. Running JMH in a different locale prevents it from reporting its
> version number.
> I'm using the maven version (1.4) which apparently was built with C
> locale. But SimpleDateFormat defaults to using the system locale, and
> thus fails to parse the locale-depedant timestamp format that was
> used.
>
> IMHO the cleanest way is to use a non-locale timestamp, such as RFC 3339.
https://bugs.openjdk.java.net/browse/CODETOOLS-7901226
> 2. org.openjdk.jmh.util.ListStatistics#getVariance
>
> This will yield a division by 0 if getN() == 1. In order to compute
> variance, you need n > 1.
> The code is also inconsistent in the sense that it uses getN() in one
> place, and count in the other.
https://bugs.openjdk.java.net/browse/CODETOOLS-7901227
-Aleksey.
More information about the jmh-dev
mailing list