Package com.dianping.cat.consumer.dependency.model.entity

Examples of com.dianping.cat.consumer.dependency.model.entity.Segment


    String type = event.getType();

    if (m_exceptions.contains(type)) {
      long current = event.getTimestamp() / 1000 / 60;
      int min = (int) (current % (60));
      Segment segment = report.findOrCreateSegment(min);
      Index index = segment.findOrCreateIndex("Exception");

      index.incTotalCount();
      index.incErrorCount();
    }
  }
View Full Code Here


    String type = t.getType();

    if (m_types.contains(type) || isCache(type)) {
      long current = t.getTimestamp() / 1000 / 60;
      int min = (int) (current % (60));
      Segment segment = report.findOrCreateSegment(min);
      Index index = segment.findOrCreateIndex(type);

      if (!t.getStatus().equals(Transaction.SUCCESS)) {
        index.incErrorCount();
      }
      index.incTotalCount();
View Full Code Here

  }

  private void updateDependencyInfo(DependencyReport report, Transaction t, String target, String type) {
    long current = t.getTimestamp() / 1000 / 60;
    int min = (int) (current % (60));
    Segment segment = report.findOrCreateSegment(min);
    Dependency dependency = segment.findOrCreateDependency(type + ":" + target);

    dependency.setType(type);
    dependency.setTarget(target);

    if (!t.getStatus().equals(Transaction.SUCCESS)) {
View Full Code Here

  private ServerConfigManager m_configManager;

  public static final String TUAN_TOU = "TuanGou";
 
  private Segment buildAllSegmentsInfo(DependencyReport report) {
    Segment result = new Segment();
    Map<Integer, Segment> segments = report.getSegments();
    DependencyReportMerger merger = new DependencyReportMerger(null);

    for (Segment segment : segments.values()) {
      Map<String, Dependency> dependencies = segment.getDependencies();
      Map<String, Index> indexs = segment.getIndexs();

      for (Index index : indexs.values()) {
        Index temp = result.findOrCreateIndex(index.getName());
        merger.mergeIndex(temp, index);
      }
      for (Dependency dependency : dependencies.values()) {
        Dependency temp = result.findOrCreateDependency(dependency.getKey());

        merger.mergeDependency(temp, dependency);
      }
    }
    return result;
View Full Code Here

  private void buildDependencyLineChart(Model model, Payload payload, Date reportTime) {
    DependencyReport dependencyReport = queryDependencyReport(payload);
    buildHourlyReport(dependencyReport, model, payload);
    buildHourlyLineGraph(dependencyReport, model);

    Segment segment = dependencyReport.findSegment(model.getMinute());
    Map<String, List<String>> dependency = parseDependencies(segment);

    model.setEvents(m_externalInfoBuilder.queryDependencyEvent(dependency, model.getDomain(), reportTime));
  }
View Full Code Here

    model.setIndexGraph(buildLineChartGraph(index));
    model.setDependencyGraph(buildLineChartGraphs(dependencys));
  }

  private void buildHourlyReport(DependencyReport report, Model model, Payload payload) {
    Segment segment = report.findSegment(model.getMinute());

    model.setReport(report);
    model.setSegment(segment);

    if (payload.isAll()) {
View Full Code Here

TOP

Related Classes of com.dianping.cat.consumer.dependency.model.entity.Segment

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.