Package com.dianping.cat.report.page

Examples of com.dianping.cat.report.page.LineChart.addValue()


    item.setSize(size);
    item.setTitle(title);
    item.addSubTitle(title);
    item.setStep(TimeHelper.ONE_MINUTE);
    double[] activeThread = graphData.get(key);
    item.addValue(activeThread);
    return item;
  }

  public Map<String, double[]> getHeartBeatData(Model model, Payload payload) {
    Date start = new Date(payload.getDate());
View Full Code Here


      for (Entry<String, Item> entry : items.entrySet()) {
        String subTitle = entry.getKey();
        Item item = entry.getValue();

        result.addSubTitle(subTitle);
        result.addValue(item.getValue());
      }
    }
    return result;
  }
View Full Code Here

    int day = (int) ((end.getTime() - start.getTime()) / TimeHelper.ONE_HOUR);
    LineChart item = new LineChart();

    item.setStart(start).setSize(day).setTitle(key).setStep(TimeHelper.ONE_HOUR);
    item.addSubTitle(key);
    item.addValue(getDataFromHourlySummary(reports, start.getTime(), day, key, ip));
    return item;
  }

  private double[] getDataFromHourlyDetail(StateReport report, long start, int size, String key, String ip) {
    double[] result = new double[size];
View Full Code Here

  private LineChart getHourlyGraph(StateReport report, String domain, Date start, Date end, String key, String ip) {
    LineChart item = new LineChart();

    item.setStart(start).setSize(60).setTitle(key).setStep(TimeHelper.ONE_MINUTE);
    item.addSubTitle(key);
    item.addValue(getDataFromHourlyDetail(report, start.getTime(), 60, key, ip));
    return item;
  }

  private StateReport getHourlyReport(long date, String domain, String ip) {
    return m_reportService.queryStateReport(domain, new Date(date), new Date(date + TimeHelper.ONE_HOUR));
View Full Code Here

      for (int i = 0; i < sum.length; i++) {
        if (totalCount[i] > 0) {
          avg[i] = sum[i] / totalCount[i];
        }
      }
      item.addValue(avg);
    }

    item.setSubTitles(buildSubTitle(start, size, step, queryType));
    return item;
  }
View Full Code Here

    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

    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

    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

    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

    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

TOP
Copyright © 2018 www.massapi.com. 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.