RFR: 8361213: J2DAnalyzer should emit the score as a decimal
Eric Caspole
ecaspole at openjdk.org
Wed Jul 2 14:49:40 UTC 2025
On Tue, 1 Jul 2025 20:52:50 GMT, Jonas Norlinder <duke at openjdk.org> wrote:
>> As mentioned in the bug, I think it would be better to always emit the score as decimal instead of sometimes decimal, sometimes scientific notation.
>
> src/demo/share/java2d/J2DBench/src/j2dbench/report/J2DAnalyzer.java line 273:
>
>> 271: double overallscore = totalscore[i]/numtests[i];
>> 272: System.out.println(" Number of tests: "+numtests[i]);
>> 273: System.out.printf(" Overall average: %10.4f%n", overallscore);
>
> double overallscore = 2.4322;
> System.out.println(" Overall average: "+overallscore); // before
> System.out.printf(" Overall average: %20.4f%n", overallscore); // after
>
>
> leads to
>
> Overall average: 2.4322 // before
> Overall average: 2.4322 // after
>
>
> should it be a fixed 10 width here?
I am not sure what you mean, but with the 10, the scores line up with the rest of the minor stats when it is monospace font like this example -
Summary:
vimg_text_noaa:
Number of tests: 2
Overall average: 20002.7449
Best spread: 1.3% variance
Worst spread: 3.62% variance
(Basis for results comparison)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26076#discussion_r2180257723
More information about the client-libs-dev
mailing list