Locale dependency of JMH, div by 0 in ListStatistics
Erich Schubert
erich at debian.org
Mon Dec 22 12:54:21 UTC 2014
Hi,
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.
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.
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.
Regards,
Erich
More information about the jmh-dev
mailing list