Could jmh respect system format settings on Windows or use "C" (simplest one) for machine-related output (CSV)?
shade at redhat.com
Tue Sep 20 13:48:37 UTC 2016
On 09/20/2016 12:44 PM, Lev Serebryakov wrote:
> JMH 1.13 outputs numbers into CSV with comma! It is complete madness!
> No software (Excel, OpenOffice Calc, Google Docs Sheet, gnuplot) can
> import/use such CSV on my system! I need to change it with regexps every
> time I want to import it!
Please note that JMH uses the system locale for formatting numbers. The
RFC 4180 does not mandate the locale. It also escapes the values that
have commas in the with quotes, as standard mandates.
> Could JMH use not "regional" but "neutral" locale for machine-readable
> output? IMHO, using regional settings for machine-readable formats is
> pure evil (and thanks god, that JMH doesn't generate PostScript with
> same approach, for example).
If your applications use inconsistent locales, then neutral locale does
not help: the locales for input app and output app would still be
inconsistent. If your applications use consistent locales (e.g. agree on
a neutral), then the problem is moot.
It seems you have the former case:
> I use Windows with Russian regional settings with CUSTOM decimal
> delimiter (set to ".", dot, of course). (...skip...) JMH 1.13 outputs numbers
> into CSV with comma! It is complete madness!
I think the solution it to fix that configuration inconsistency.
More information about the jmh-dev