Skip to content

Commit

Permalink
cosmetic changes
Browse files Browse the repository at this point in the history
Signed-off-by: saakhan <[email protected]>
  • Loading branch information
khansaad committed Nov 2, 2023
1 parent 0b90408 commit 148c118
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ public static String validateMetricsValues(String metricVariableName, MetricResu
break;
}
} else if (key.equals("format")) {
String stringValue = (String) value;
String stringValue = null;
if (value instanceof String) {
stringValue = (String) value;
}
if (!KruizeSupportedTypes.SUPPORTED_FORMATS.contains(stringValue)) {
LOGGER.error(AnalyzerErrorConstants.AutotuneObjectErrors.UNSUPPORTED_FORMAT);
errorMsg = errorMsg.concat(AnalyzerErrorConstants.AutotuneObjectErrors.UNSUPPORTED_FORMAT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,14 @@ public static final class AutotuneObjectErrors {
public static final String UNSUPPORTED_BULK_KUBERNETES = "Bulk Kubernetes objects are currently unsupported!";
public static final String DUPLICATE_EXPERIMENT = "Experiment name already exists: ";
public static final String WRONG_TIMESTAMP = "The Start time should precede the End time!";

public static final String MEASUREMENT_DURATION_ERROR = "Interval duration cannot be less than or greater than measurement_duration by more than " + KruizeConstants.TimeConv.MEASUREMENT_DURATION_THRESHOLD_SECONDS + " seconds";
public static final String MISSING_METRICS = "Metric data is not present for container : %s for experiment: %s. ";
public static final String BLANK_AGGREGATION_INFO_VALUE = " cannot be negative or blank for the metric variable: ";
public static final String UNSUPPORTED_FORMAT = " Format value should be among these values: ".concat(KruizeSupportedTypes.SUPPORTED_FORMATS.toString());
public static final String UNSUPPORTED_METRIC = "Metric variable name should be among these values: ".concat(Arrays.toString(AnalyzerConstants.MetricName.values()));
public static final String BLANK_AGGREGATION_INFO_VALUE = " cannot be negative or blank for the metric variable: ";
public static final String UNSUPPORTED_FORMAT = " Format value should be among these values: ".concat(KruizeSupportedTypes.SUPPORTED_FORMATS.toString());
public static final String UNSUPPORTED_METRIC = "Metric variable name should be among these values: ".concat(Arrays.toString(AnalyzerConstants.MetricName.values()));


private AutotuneObjectErrors() {
private AutotuneObjectErrors() {
}

}
Expand Down

0 comments on commit 148c118

Please sign in to comment.