json result file

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue Apr 14 20:47:42 UTC 2015


Hi Trask,

On 04/11/2015 03:52 AM, Trask Stalnaker wrote:
> The json result file is currently written using the default platform
> encoding, which is a bit troublesome when parsing since json parsers (at
> least Jackson) assume the file is always UTF8/16/32.  (in particular I ran
> into issues with the metric name prefix "\u00b7")

Indeed, we can make result files UTF8 unconditionally. I don't think
there is much sense in following default platform encoding for result
files (it's still important for console output). Fixed:
  https://bugs.openjdk.java.net/browse/CODETOOLS-7901382

> On a separate issue, the newlines inside some of the attribute names make
> programmatic parsing less convenient (even though valid json), e.g.
> 
>         "secondaryMetrics" : {
>             "·gc.churn.{
>                 PS Eden Space
>             }
>             " : {
>                 ...
>             },

Yes, we might just choose a better name for gc.churn metrics. E.g.
replacing all the spaces with underscores, and dropping the curly braces
altogether. Fixed:
  https://bugs.openjdk.java.net/browse/CODETOOLS-7901383

(While it might be done via a somewhat entangled fix in the JSON
formatter itself, I would think the new labels are just better).

Thanks,
-Aleksey.



More information about the jmh-dev mailing list