Skip to content

Commit

Permalink
Fixed type cast bug for deviationsAllowed
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrigos committed Nov 15, 2021
1 parent c5e8cf0 commit 0475d8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ public static void addPassFailBenchData(Map<String, Map<String, Map<String, Map<
Comparisons.Threshold compareThreshold = (Comparisons.Threshold) configMap.get(ConfigHandling.THRESHOLD);
String compareVersion = (String) configMap.get(ConfigHandling.COMPARE_VERSION);
Double percentChangeAllowed = (Double) configMap.get(ConfigHandling.PERCENT_CHANGE_ALLOWED);
Double deviationsAllowed = (Double) configMap.get(ConfigHandling.DEVIATIONS_ALLOWED);

Double deviationsAllowed = Double.parseDouble((String) configMap.get(ConfigHandling.DEVIATIONS_ALLOWED));
Map<String, Object> data = prepareCompareDataMap(benchmarks, benchmarkName, benchmarkVersion, benchmarkMode);
benchmarkScore = Comparisons.roundHandling(benchmarkScore);
Double compareValue = compareValues.get(Comparisons.CALCULATED_COMPARE_VALUE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public static State passAssertion(Map<String, Object> configMap, String benchmar
Comparisons.Method compareMethod = (Comparisons.Method) configMap.get(ConfigHandling.METHOD);
Comparisons.Threshold compareThreshold = (Comparisons.Threshold) configMap.get(ConfigHandling.THRESHOLD);
Double percentChangeAllowed = (Double) configMap.get(ConfigHandling.PERCENT_CHANGE_ALLOWED);
Double deviationsAllowed = (Double) configMap.get(ConfigHandling.DEVIATIONS_ALLOWED);
Double deviationsAllowed = Double.parseDouble((String) (configMap.get(ConfigHandling.DEVIATIONS_ALLOWED)));

Double compareValue = compareValues.get(CALCULATED_COMPARE_VALUE);
boolean pass = false;
Expand Down

0 comments on commit 0475d8f

Please sign in to comment.