Beispiel #1
0
 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;
 }
Beispiel #2
0
 private void computeVariation(
     Resource resource, DecoratorContext context, PastSnapshot pastSnapshot) {
   List<Object[]> pastMeasures = pastMeasuresLoader.getPastMeasures(resource, pastSnapshot);
   compareWithPastMeasures(context, pastSnapshot.getIndex(), pastMeasures);
 }
Beispiel #3
0
 @DependsUpon
 public Collection<Metric> dependsUponMetrics() {
   return pastMeasuresLoader.getMetrics();
 }
Beispiel #4
0
 MeasureKey(Object[] pastFields) {
   metricId = PastMeasuresLoader.getMetricId(pastFields);
   characteristicId = PastMeasuresLoader.getCharacteristicId(pastFields);
   ruleId = PastMeasuresLoader.getRuleId(pastFields);
 }