Skip to content

Commit

Permalink
Updated handling if passedBenchmarks is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrigos committed Nov 12, 2021
1 parent e35fb3b commit 9b40870
Showing 1 changed file with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,20 +426,33 @@ private static void changeDateTime() {
}

private static void changeVersion() {
List<String> passedNames = new ArrayList<>();
List<String> names = new ArrayList<>();
if (!CompareBenchmarks.passedBenchmarks.isEmpty()) {
for (Entry<String, Map<String, Map<String, Map<String, Object>>>> benchmark : CompareBenchmarks.passedBenchmarks
.entrySet()) {
String tempName = benchmark.getKey();
passedNames.add(tempName);
names.add(tempName);

}
for (String pName : passedNames) {
for (String pName : names) {
String tempFingerprint = Requests.namesToFingerprints.get(pName);
version = Requests.getCurrentVersion(tempFingerprint);
}
}else {
log.error("* Error while attempting to grab current version from Passed Benchmarks map");
} else if (!CompareBenchmarks.failedBenchmarks.isEmpty()) {
for (Entry<String, Map<String, Map<String, Map<String, Object>>>> benchmark : CompareBenchmarks.failedBenchmarks
.entrySet()) {
String tempName = benchmark.getKey();
names.add(tempName);
}
for (String fName : names) {
String tempFPrint = Requests.namesToFingerprints.get(fName);
version = Requests.getCurrentVersion(tempFPrint);
}

}

else {
log.error("* Error while attempting to grab current version from Passed/Failed Benchmarks map");
}
}

Expand Down

0 comments on commit 9b40870

Please sign in to comment.