boolean updateVariation(Measure measure, Object[] pastMeasure, int index) { if (pastMeasure != null && PastMeasuresLoader.hasValue(pastMeasure) && measure.getValue() != null) { double variation = (measure.getValue().doubleValue() - PastMeasuresLoader.getValue(pastMeasure)); measure.setVariation(index, variation); return true; } return false; }
private void computeVariation( Resource resource, DecoratorContext context, PastSnapshot pastSnapshot) { List<Object[]> pastMeasures = pastMeasuresLoader.getPastMeasures(resource, pastSnapshot); compareWithPastMeasures(context, pastSnapshot.getIndex(), pastMeasures); }
@DependsUpon public Collection<Metric> dependsUponMetrics() { return pastMeasuresLoader.getMetrics(); }
MeasureKey(Object[] pastFields) { metricId = PastMeasuresLoader.getMetricId(pastFields); characteristicId = PastMeasuresLoader.getCharacteristicId(pastFields); ruleId = PastMeasuresLoader.getRuleId(pastFields); }