Skip to content

Commit

Permalink
Merge pull request #1038 from shekhar316/additional-metric-value-units
Browse files Browse the repository at this point in the history
Added support for additional units for the metric values
  • Loading branch information
dinogun authored Nov 17, 2023
2 parents 160e656 + 122dae9 commit 67fe666
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ public static String validateMetricsValues(String metricVariableName, MetricResu
if (value instanceof String) {
stringValue = (String) value;
}
// TODO: handle the conversions for additional supported formats
if (!KruizeSupportedTypes.SUPPORTED_FORMATS.contains(stringValue)) {
LOGGER.error(AnalyzerErrorConstants.AutotuneObjectErrors.UNSUPPORTED_FORMAT);
errorMsg = errorMsg.concat(AnalyzerErrorConstants.AutotuneObjectErrors.UNSUPPORTED_FORMAT);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/autotune/utils/KruizeSupportedTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private KruizeSupportedTypes() { }
new HashSet<>(Arrays.asList("deployment", "pod", "container"));

public static final Set<String> SUPPORTED_FORMATS =
new HashSet<>(Arrays.asList("cores", "MiB"));
new HashSet<>(Arrays.asList("cores", "m", "Bytes", "bytes", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "kB", "KB", "MB", "GB", "TB", "PB", "EB", "K", "k", "M", "G", "T", "P", "E"));

public static final Set<String> QUERY_PARAMS_SUPPORTED = new HashSet<>(Arrays.asList(
"experiment_name", "results", "recommendations", "latest"
Expand Down

0 comments on commit 67fe666

Please sign in to comment.