Package ch.hortis.sonar.core

Examples of ch.hortis.sonar.core.TendencyAnalyser


    }
    for (MeasureKey key : module.getMeasureKeys()) {
      SortedMap<Date, ProjectMeasure> measuresByDate = historyByKey.get(key);
      if (measuresByDate != null) {
        List<Double> values = getValuesWithoutGaps(measuresByDate, from, to);
        TendencyAnalyser analyser = new TendencyAnalyser(values, MAX_DAYS);
        Number[] slopeAndLevel = getSlopeAndLevel(analyser, key.getMetric());
        if (slopeAndLevel[0] != null) {
          module.createTendency(((MeasureKey) key.clone()), (Double) slopeAndLevel[0], (Integer) slopeAndLevel[1], MAX_DAYS);
        }
      }
View Full Code Here


    for (Object o : measuresByKey.entrySet()) {
      Map.Entry entry = (Map.Entry) o;
      MeasureKey key = (MeasureKey) entry.getKey();
      List<ProjectMeasure> measures = (List<ProjectMeasure>) entry.getValue();
      List<Double> values = getValues(measures);
      TendencyAnalyser analyser = new TendencyAnalyser(values, MAX_DAYS);
      Number[] slopeAndLevel = getSlopeAndLevel(analyser, key.getMetric());
      if (slopeAndLevel[0] != null && slopeAndLevel[1]!=null) {
        module.createTendency(((MeasureKey) key.clone()), (Double) slopeAndLevel[0], (Integer) slopeAndLevel[1], MAX_DAYS);
      }
    }
View Full Code Here

TOP

Related Classes of ch.hortis.sonar.core.TendencyAnalyser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.