Prefix character at secondary results?
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed Apr 27 09:33:02 UTC 2016
On 04/18/2016 07:22 PM, Jens Wilke wrote:
> all secondary results have a prefix character defined in Defaults:
>
> public static final String PREFIX = "\u00b7";
>
> This character was giving me quite a hard time, when trying to construct queries on the
> JSON output.
>
> What is the reason for that?
So, the underlying reason is this:
https://bugs.openjdk.java.net/browse/CODETOOLS-7901367
In text report, all results are sorted by label lexicographically.
Profiler results should come after the "benchmark" secondary results,
which forces us to use some symbol that comes after any 7-bit ASCII
symbol. This brings us to extended ASCII table, and there, 0xB7 (dot) is
an obvious choice, given that we are using non-ASCII characters in the
output anyway.
> It would make live easier, if the JSON field names just contain ASCII.
Well, nothing really prevents us to take a step back to basic ASCII
table, and use Defaults.PREFIX = "~". I wonder what others are thinking
about this.
Cheers,
-Aleksey
More information about the jmh-dev
mailing list