Skip to content

Commit

Permalink
Changing method of rounding down
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Farley <[email protected]>
  • Loading branch information
adamfarley committed Nov 4, 2024
1 parent 109b6c4 commit 7e33cad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/nightly_build_and_test_stats.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ def getReproducibilityPercentage(String jdkVersion, String trssId, String trssUR
if (overallAverage != 0) {
overallAverage = overallAverage / (results[jdkVersion][1].size() - naCount)
}
overallAverage = (overallAverage * 100).toBigInteger() / 100
results[jdkVersion][0] = overallAverage+" %"
// This reduces the output to 2 decimal places.
results[jdkVersion][0] = ((overallAverage.stripTrailingZeros().toString() + "00") =~ /[0-9]+\.?[0-9]?[0-9]?/)[0]+" %"
}
}

Expand Down

0 comments on commit 7e33cad

Please sign in to comment.