Package com.dianping.cat.report.baseline

Examples of com.dianping.cat.report.baseline.BaselineConfig


    String metricDomain = metricConfig.getDomain();
    String productLine = m_productLineConfigManager.queryProductLineByDomain(metricDomain);

    for (MetricType type : MetricType.values()) {
      String key = metricId + ":" + type;
      BaselineConfig baselineConfig = m_baselineConfigManager.queryBaseLineConfig(key);
      List<Integer> days = baselineConfig.getDays();
      List<Double> weights = baselineConfig.getWeights();
      Date targetDate = new Date(reportPeriod.getTime() + baselineConfig.getTargetDate() * TimeHelper.ONE_DAY);
      List<double[]> values = new ArrayList<double[]>();

      for (Integer day : days) {
        List<MetricItem> metricItems = new ArrayList<MetricItem>();
        Date currentDate = new Date(reportPeriod.getTime() + day * TimeHelper.ONE_DAY);
 
View Full Code Here


  }

  private class MyBaselineConfigManager extends BaselineConfigManager {
    @Override
    public BaselineConfig queryBaseLineConfig(String key) {
      BaselineConfig config = new BaselineConfig();
      Integer[] days = { 0, -1, -2, -3, -4 };
      Double[] weights = { 1.0, 1.0, 1.0, 1.0, 1.0 };

      config.setDays(Arrays.asList(days));
      config.setId(1);
      config.setKey(key);
      config.setTargetDate(1);
      config.setWeights(Arrays.asList(weights));
      return config;
    }
View Full Code Here

TOP

Related Classes of com.dianping.cat.report.baseline.BaselineConfig

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.