Skip to content

Commit

Permalink
merged Conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: msvinaykumar <vinakuma@redhat.com>
  • Loading branch information
msvinaykumar committed Aug 12, 2023
1 parent a4e7e40 commit baa6248
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ public boolean isValid(UpdateResultsAPIObject updateResultsAPIObject, Constraint

KruizeObject kruizeObject = ExperimentNameExistValidator.mainKruizeExperimentMAP.get(updateResultsAPIObject.getExperimentName());

Double parsedMeasurementDuration = kruizeObject.getTrial_settings().getMeasurement_durationMinutes_inDouble();
IntervalResults intervalResults = new IntervalResults(updateResultsAPIObject.getStartTimestamp(), updateResultsAPIObject.getEndTimestamp());
Double durationInSeconds = intervalResults.getDuration_in_seconds();
String measurementDurationInMins = kruizeObject.getTrial_settings().getMeasurement_durationMinutes();
Double parsedMeasurementDuration = Double.parseDouble(measurementDurationInMins.substring(0, measurementDurationInMins.length() - 3));
// Calculate the lower and upper bounds for the acceptable range i.e. +-5 seconds
double lowerRange = Math.abs((parsedMeasurementDuration * KruizeConstants.TimeConv.NO_OF_SECONDS_PER_MINUTE) - (KruizeConstants.TimeConv.MEASUREMENT_DURATION_THRESHOLD_SECONDS));
double upperRange = (parsedMeasurementDuration * KruizeConstants.TimeConv.NO_OF_SECONDS_PER_MINUTE) + (KruizeConstants.TimeConv.MEASUREMENT_DURATION_THRESHOLD_SECONDS);
Expand Down

0 comments on commit baa6248

Please sign in to comment.