validator/src/main/java/com/amazon/aoc/validators/PrometheusMetricValidator.java [88:110]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private void compareMetricLists(List<PrometheusMetric> toBeCheckedMetricList,
                                  List<PrometheusMetric> baseMetricList)
          throws BaseException {
    // load metrics into a tree set
    Comparator<PrometheusMetric> comparator = PrometheusMetric::comparePrometheusMetricLabels;

    if (validationConfig.getShouldValidateMetricValue()) {
      comparator = PrometheusMetric::staticPrometheusMetricCompare;
    }

    Set<PrometheusMetric> metricSet = new TreeSet<>(comparator);
    metricSet.addAll(baseMetricList);

    for (PrometheusMetric metric : toBeCheckedMetricList) {
      if (!metricSet.contains(metric)) {
        throw new BaseException(
                ExceptionCode.EXPECTED_METRIC_NOT_FOUND,
                String.format(
                        "metric in toBeCheckedMetricList %s not found in baseMetricList: %s",
                        metric, metricSet));
      }
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



validator/src/main/java/com/amazon/aoc/validators/PrometheusStaticMetricValidator.java [88:110]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private void compareMetricLists(List<PrometheusMetric> toBeCheckedMetricList,
                                  List<PrometheusMetric> baseMetricList)
          throws BaseException {
    // load metrics into a tree set
    Comparator<PrometheusMetric> comparator = PrometheusMetric::comparePrometheusMetricLabels;

    if (validationConfig.getShouldValidateMetricValue()) {
      comparator = PrometheusMetric::staticPrometheusMetricCompare;
    }

    Set<PrometheusMetric> metricSet = new TreeSet<>(comparator);
    metricSet.addAll(baseMetricList);

    for (PrometheusMetric metric : toBeCheckedMetricList) {
      if (!metricSet.contains(metric)) {
        throw new BaseException(
                ExceptionCode.EXPECTED_METRIC_NOT_FOUND,
                String.format(
                        "metric in toBeCheckedMetricList %s not found in baseMetricList: %s",
                        metric, metricSet));
      }
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



