Skip to content

Commit

Permalink
Change PREVIOUS to actual previous version in table
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrigos committed Nov 15, 2021
1 parent 3729468 commit f90dd58
Showing 1 changed file with 3 additions and 6 deletions.
Expand Up @@ -99,7 +99,6 @@ public static void generatePage() throws IOException, URISyntaxException {
for (Field field : clazz.getDeclaredFields()) {
try {
if (!skippedFields.contains(field.getName())) {
log.info("======ATTEMPTING TO REPLACE {} WITH {}", field.getName(), field.get(gen).toString());
htmlTemp = htmlTemp.replace("$" + field.getName(), field.get(gen).toString());
FileUtils.writeStringToFile(newHtml, htmlTemp, utf8);
}
Expand Down Expand Up @@ -174,6 +173,7 @@ private static void createPassedTable(File file) throws IOException {
.entrySet()) {
String benchmarkName = benchmark.getKey();
String fingerprint = Requests.namesToFingerprints.get(benchmarkName);
String compareVersion = Requests.getPreviousVersion(fingerprint);
Map<String, Map<String, Map<String, Object>>> benchVersions = benchmark.getValue();
for (Map.Entry<String, Map<String, Map<String, Object>>> versionEntry : benchVersions.entrySet()) {
String benchVersion = versionEntry.getKey();
Expand All @@ -191,7 +191,6 @@ private static void createPassedTable(File file) throws IOException {
roundPercentChange = BigDecimal.valueOf(percentChange);
}
Double sdFromMean = (Double) benchmarkData.get(Comparisons.CALCULATED_SD_FROM_MEAN);
String compareVersion = (String) benchmarkData.get(ConfigHandling.COMPARE_VERSION);
FileUtils.writeStringToFile(file, "<th>" + fingerprint //
+ "</th><th style='text-align:left'>" + benchmarkName //
+ "</th><th>" + benchVersion //
Expand Down Expand Up @@ -241,7 +240,7 @@ private static void createFailedTable(File file) throws IOException {
.entrySet()) {
String benchmarkName = benchmark.getKey();
String fingerprint = Requests.namesToFingerprints.get(benchmarkName);

String compareVersion = Requests.getPreviousVersion(fingerprint);
Map<String, Map<String, Map<String, Object>>> benchVersions = benchmark.getValue();
for (Map.Entry<String, Map<String, Map<String, Object>>> versionEntry : benchVersions.entrySet()) {
String benchVersion = versionEntry.getKey();
Expand All @@ -259,7 +258,6 @@ private static void createFailedTable(File file) throws IOException {
roundPercentChange = BigDecimal.valueOf(percentChange);
}
Double sdFromMean = (Double) benchmarkData.get(Comparisons.CALCULATED_SD_FROM_MEAN);
String compareVersion = (String) benchmarkData.get(ConfigHandling.COMPARE_VERSION);
FileUtils.writeStringToFile(file, "<tr><th>" + fingerprint //
+ "</th><th style='text-align:left'>" + benchmarkName //
+ "</th><th>" + benchVersion //
Expand Down Expand Up @@ -305,15 +303,14 @@ private static void createSkippedTable(File file) throws IOException {
.entrySet()) {
String benchmarkName = benchmark.getKey();
String fingerprint = Requests.namesToFingerprints.get(benchmarkName);

String compareVersion = Requests.getPreviousVersion(fingerprint);
Map<String, Map<String, Map<String, Object>>> benchVersions = benchmark.getValue();
for (Map.Entry<String, Map<String, Map<String, Object>>> versionEntry : benchVersions.entrySet()) {
String benchVersion = versionEntry.getKey();
Map<String, Map<String, Object>> benchData = versionEntry.getValue();
for (Map.Entry<String, Map<String, Object>> dataEntry : benchData.entrySet()) {
String benchMode = dataEntry.getKey();
Map<String, Object> benchmarkData = dataEntry.getValue();
String compareVersion = (String) benchmarkData.get(ConfigHandling.COMPARE_VERSION);
FileUtils.writeStringToFile(file, "<tr><th>" + fingerprint //
+ "</th><th style='text-align:left'>" + benchmarkName //
+ "</th><th>" + benchVersion //
Expand Down

0 comments on commit f90dd58

Please sign in to comment.