willow-autoscaler/src/main/java/com/nitorcreations/willow/autoscaler/metrics/AutoScalingGroupStatus.java
public List<AutoScalingPolicy> getTriggeredPolicies() {
    List<AutoScalingPolicy> triggeredPolicies = new ArrayList<>();
    for (AutoScalingPolicy policy : group.getScalingPolicies()) {
      List<TimePoint<Double>> metricValues = getMetricValues(policy.getMetricName());
      int triggerCount = 0;
      int triggerThreshold = 3;
      int inspectCount = 0;
      if (metricValues != null && metricValues.size() > 2) {
        List<TimePoint<Double>> reverse = new ArrayList<>(metricValues);
        Collections.reverse(reverse);
        for (TimePoint<Double> p : reverse) {
          ComparisonOperation op = ComparisonOperation.fromSymbol(policy.getMetricComparison());
          if (op.compare(p.getValue(), Double.valueOf(policy.getMetricThreshold()))) {
            triggerCount++;
          }
          inspectCount++;
          if (inspectCount >= 3) {
            break;
          }
        }
        if (triggerCount >= triggerThreshold) {
          triggeredPolicies.add(policy);
        }
      }
    }
    return triggeredPolicies;
  }
public List<AutoScalingPolicy> getTriggeredPolicies() {
    List<AutoScalingPolicy> triggeredPolicies = new ArrayList<>();
    for (AutoScalingPolicy policy : group.getScalingPolicies()) {
      List<TimePoint<Double>> metricValues = getMetricValues(policy.getMetricName());
      int triggerCount = 0;
      int triggerThreshold = 3;
      int inspectCount = 0;
      if (metricValues != null && metricValues.size() > 2) {
        List<TimePoint<Double>> reverse = new ArrayList<>(metricValues);
        Collections.reverse(reverse);
        for (TimePoint<Double> p : reverse) {
          ComparisonOperation op = ComparisonOperation.fromSymbol(policy.getMetricComparison());
          if (op.compare(p.getValue(), Double.valueOf(policy.getMetricThreshold()))) {
            triggerCount++;
          }
          inspectCount++;
          if (inspectCount >= 3) {
            break;
          }
        }
        if (triggerCount >= triggerThreshold) {
          triggeredPolicies.add(policy);
        }
      }
    }
    return triggeredPolicies;
  }
Returns a list of auto scaling policies that have triggered, e.g. value is past threshold.

Considers a policy triggered if there a few data points consistently past the threshold.

@return