Package com.dianping.cat.report.page

Examples of com.dianping.cat.report.page.LineChart


  @Inject
  private DailyGraphDao m_dailyGraphDao;

  private LineChart buildFail(List<Map<String, double[]>> datas, Date start, long step, int size, String queryType) {
    LineChart item = new LineChart();

    item.setStart(start);
    item.setSize(size);
    item.setStep(step);

    for (Map<String, double[]> data : datas) {
      item.addValue(data.get(ERROR));
    }
    item.setSubTitles(buildSubTitle(start, size, step, queryType));
    return item;
  }
View Full Code Here


        allDatas = datas;
      } else {
        mergerList(allDatas, datas);
      }
    }
    LineChart item = buildFail(allDatas, start, step, size, queryType);
    model.setErrorsTrend(item.getJsonString());
  }
View Full Code Here

      size = (int) ((end.getTime() - start.getTime()) / TimeHelper.ONE_DAY);
      step = TimeHelper.ONE_DAY;
    }

    List<Map<String, double[]>> allDatas = buildLineChartData(start, end, domain, type, name, ip, queryType);
    LineChart item = buildFail(allDatas, start, step, size, queryType);
    model.setErrorsTrend(item.getJsonString());
  }
View Full Code Here

    }
  }

  private LineChart buildFail(List<Map<String, double[]>> datas, Date start, int size, long step, String name,
        String queryType) {
    LineChart item = new LineChart();

    item.setStart(start);
    item.setSize(size);
    item.setStep(step);
    item.setTitle(name + " Error (count)");

    for (Map<String, double[]> data : datas) {
      item.addValue(data.get("failure_count"));
    }
    item.setSubTitles(buildSubTitle(start, size, step, queryType));
    return item;
  }
View Full Code Here

        allDatas = datas;
      } else {
        mergerList(allDatas, datas);
      }
    }
    LineChart item = buildTotal(allDatas, start, size, step, display, queryType);
    model.setHitTrend(item.getJsonString());

    item = buildFail(allDatas, start, size, step, display, queryType);
    model.setFailureTrend(item.getJsonString());
  }
View Full Code Here

    return allDatas;
  }

  private LineChart buildTotal(List<Map<String, double[]>> datas, Date start, int size, long step, String name,
        String queryType) {
    LineChart item = new LineChart();

    item.setStart(start);
    item.setSize(size);
    item.setStep(step);
    item.setTitle(name + " Hits (count)");

    for (Map<String, double[]> data : datas) {
      double[] totalCount = data.get("total_count");
      item.addValue(totalCount);
    }
    item.setSubTitles(buildSubTitle(start, size, step, queryType));
    return item;
  }
View Full Code Here

      step = TimeHelper.ONE_DAY;
    }

    List<Map<String, double[]>> allDatas = buildLineChartData(start, end, domain, type, name, ip, queryType);

    LineChart item = buildTotal(allDatas, start, size, step, display, queryType);

    model.setHitTrend(item.getJsonString());
    item = buildFail(allDatas, start, size, step, display, queryType);
    model.setFailureTrend(item.getJsonString());
  }
View Full Code Here

    List<AlertMetric> alertKeys = m_alertInfo.queryLastestAlarmKey(5);
    int step = m_dataExtractor.getStep();

    for (Entry<String, List<String>> keyMapEntry : aggregationKeys.entrySet()) {
      String chartTitle = keyMapEntry.getKey();
      LineChart lineChart = new LineChart();
      lineChart.setTitle(chartTitle);
      lineChart.setHtmlTitle(chartTitle);
      lineChart.setId(chartTitle);
      lineChart.setStart(startDate);
      lineChart.setStep(step * TimeHelper.ONE_MINUTE);
      lineChart.setUnit(buildUnit(chartTitle));

      for (String key : keyMapEntry.getValue()) {
        if (dataWithOutFutures.containsKey(key)) {
          Map<Long, Double> all = convertToMap(datas.get(key), startDate, 1);
          Map<Long, Double> current = convertToMap(dataWithOutFutures.get(key), startDate, step);

          buildLineChartTitle(productLine, lineChart, key, alertKeys);
          addLastMinuteData(current, all, m_lastMinute, endDate);
          convertFlowMetric(lineChart, current, buildLineTitle(key));
        } else {
          lineChart.add(chartTitle, buildNoneData(startDate, endDate, 1));
        }
      }
      charts.put(chartTitle, lineChart);
    }
    return charts;
View Full Code Here

TOP

Related Classes of com.dianping.cat.report.page.LineChart

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.