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

Examples of com.dianping.cat.consumer.problem.model.entity.ProblemReport


  private ProblemReport merge(String reportDomain, List<ProblemReport> reports, boolean isDaily) {
    ProblemReportMerger merger = null;

    if (isDaily) {
      merger = new HistoryProblemReportMerger(new ProblemReport(reportDomain));
    } else {
      merger = new ProblemReportMerger(new ProblemReport(reportDomain));
    }
    for (ProblemReport report : reports) {
      report.accept(merger);
    }
View Full Code Here


    return merger.getProblemReport();
  }

  public ProblemReport mergeForDaily(String reportDomain, List<ProblemReport> reports, Set<String> domains) {
    ProblemReport report = merge(reportDomain, reports, true);
    Date date = report.getStartTime();
    Date end = new Date(TaskHelper.tomorrowZero(date).getTime() - 1000);

    report.setStartTime(TaskHelper.todayZero(date));
    report.setEndTime(end);
    report.getDomainNames().addAll(domains);
    return report;
  }
View Full Code Here

    report.getDomainNames().addAll(domains);
    return report;
  }

  public ProblemReport mergeForGraph(String reportDomain, List<ProblemReport> reports) {
    ProblemReport report = merge(reportDomain, reports, false);

    return report;
  }
View Full Code Here

        EventReport eventReport = m_reportService.queryEventReport(domain, start, end);
        m_reportService.insertMonthlyReport(buildMonthlyReport(domain, start, EventAnalyzer.ID),
              com.dianping.cat.consumer.event.model.transform.DefaultNativeBuilder.build(eventReport));

        ProblemReport problemReport = m_reportService.queryProblemReport(domain, start, end);
        m_reportService.insertMonthlyReport(buildMonthlyReport(domain, start, ProblemAnalyzer.ID),
              com.dianping.cat.consumer.problem.model.transform.DefaultNativeBuilder.build(problemReport));

        CrossReport crossReport = m_reportService.queryCrossReport(domain, start, end);
        m_reportService.insertMonthlyReport(buildMonthlyReport(domain, start, CrossAnalyzer.ID),
View Full Code Here

        new EventReportCountFilter().visitEventReport(eventReport);
       
        m_reportService.insertWeeklyReport(buildWeeklyReport(domain, start, EventAnalyzer.ID),
              com.dianping.cat.consumer.event.model.transform.DefaultNativeBuilder.build(eventReport));

        ProblemReport problemReport = m_reportService.queryProblemReport(domain, start, end);
        m_reportService.insertWeeklyReport(buildWeeklyReport(domain, start, ProblemAnalyzer.ID),
              com.dianping.cat.consumer.problem.model.transform.DefaultNativeBuilder.build(problemReport));

        CrossReport crossReport = m_reportService.queryCrossReport(domain, start, end);
        m_reportService.insertWeeklyReport(buildWeeklyReport(domain, start, CrossAnalyzer.ID),
View Full Code Here

  private ProblemMerger m_problemMerger;

  @Override
  public boolean buildDailyTask(String name, String domain, Date period) {
    try {
      ProblemReport problemReport = queryHourlyReportsByDuration(name, domain, period,
            TaskHelper.tomorrowZero(period));
     
      buildProblemDailyGraph(problemReport);

      DailyReport report = new DailyReport();
View Full Code Here

    }
  }

  private List<Graph> buildHourlyGraphs(String name, String domain, Date period) throws DalException {
    long startTime = period.getTime();
    ProblemReport report = m_reportService.queryProblemReport(domain, new Date(startTime), new Date(startTime
          + TimeHelper.ONE_HOUR));

    return m_problemGraphCreator.splitReportToGraphs(period, domain, ProblemAnalyzer.ID, report);
  }
View Full Code Here

    return true;
  }

  @Override
  public boolean buildMonthlyTask(String name, String domain, Date period) {
    ProblemReport problemReport = queryDailyReportsByDuration(domain, period, TaskHelper.nextMonthStart(period));
 
    new ProblemReportURLFilter().visitProblemReport(problemReport);
   
    MonthlyReport report = new MonthlyReport();
View Full Code Here

    }
  }

  @Override
  public boolean buildWeeklyTask(String name, String domain, Date period) {
    ProblemReport problemReport = queryDailyReportsByDuration(domain, period, new Date(period.getTime()
          + TimeHelper.ONE_WEEK));
    WeeklyReport report = new WeeklyReport();

    report.setContent("");
    report.setCreationDate(new Date());
View Full Code Here

  }

  private ProblemReport queryDailyReportsByDuration(String domain, Date start, Date end) {
    long startTime = start.getTime();
    long endTime = end.getTime();
    ProblemReportMerger merger = new ProblemReportMerger(new ProblemReport(domain));

    for (; startTime < endTime; startTime += TimeHelper.ONE_DAY) {
      try {
        ProblemReport reportModel = m_reportService.queryProblemReport(domain, new Date(startTime), new Date(
              startTime + TimeHelper.ONE_DAY));
        reportModel.accept(merger);
      } catch (Exception e) {
        Cat.logError(e);
      }
    }
    ProblemReport problemReport = merger.getProblemReport();

    problemReport.setStartTime(start);
    problemReport.setEndTime(end);
    return problemReport;
  }
View Full Code Here

TOP

Related Classes of com.dianping.cat.consumer.problem.model.entity.ProblemReport

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.