Package com.dianping.cat.report.page.cross.display

Examples of com.dianping.cat.report.page.cross.display.ProjectInfo


    }

    for (String domainName : domains) {
      if (m_configManger.validateDomain(domainName)) {
        CrossReport crossReport = m_reportService.queryCrossReport(domainName, start, end);
        ProjectInfo projectInfo = new ProjectInfo(TimeHelper.ONE_HOUR);

        projectInfo.setHostinfoService(m_hostinfoService);
        projectInfo.setClientIp(Constants.ALL);
        projectInfo.visitCrossReport(crossReport);
        Collection<TypeDetailInfo> callInfos = projectInfo.getCallProjectsInfo();

        for (TypeDetailInfo typeInfo : callInfos) {
          String project = typeInfo.getProjectName();

          if (!validataService(project)) {
View Full Code Here


  @Inject(type = ModelService.class, value = CrossAnalyzer.ID)
  private ModelService<CrossReport> m_service;

  private ProjectInfo buildCallProjectInfo(String domain, ModelPeriod period, String date, long duration) {
    CrossReport projectReport = getHourlyReport(domain, period, date, Constants.ALL);
    ProjectInfo projectInfo = new ProjectInfo(duration);

    projectInfo.setHostinfoService(m_hostinfoService);
    projectInfo.setClientIp(Constants.ALL);
    projectInfo.visitCrossReport(projectReport);

    return projectInfo;
  }
View Full Code Here

    return projectInfo;
  }

  private ProjectInfo buildHistoryCallProjectInfo(String domain, Date start, Date end) {
    CrossReport projectReport = getSummarizeReport(domain, start, end);
    ProjectInfo projectInfo = new ProjectInfo(end.getTime() - start.getTime());

    projectInfo.setHostinfoService(m_hostinfoService);
    projectInfo.setClientIp(Constants.ALL);
    projectInfo.visitCrossReport(projectReport);
    return projectInfo;
  }
View Full Code Here

    String domain = payload.getDomain();
    switch (payload.getAction()) {
    case HOURLY_PROJECT:
      CrossReport projectReport = getHourlyReport(payload);
      ProjectInfo projectInfo = new ProjectInfo(payload.getHourDuration());

      projectInfo.setHostinfoService(m_hostinfoService);
      projectInfo.setClientIp(model.getIpAddress()).setCallSortBy(model.getCallSort())
            .setServiceSortBy(model.getServiceSort());
      projectInfo.visitCrossReport(projectReport);
      model.setProjectInfo(projectInfo);
      model.setReport(projectReport);

      List<TypeDetailInfo> hourlyDetails = projectInfo.getServiceProjectsInfo();

      if (projectInfo.getCallerProjectsInfo().isEmpty()) {
        for (TypeDetailInfo info : hourlyDetails) {
          String projectName = info.getProjectName();
          if (projectName.equalsIgnoreCase(payload.getDomain()) || projectName.equalsIgnoreCase("UnknownProject")
                || projectName.equalsIgnoreCase(ProjectInfo.ALL_CLIENT)) {
            continue;
          }
          ProjectInfo temp = buildCallProjectInfo(projectName, payload.getPeriod(),
                String.valueOf(payload.getDate()), payload.getHourDuration());

          TypeDetailInfo detail = temp.getAllCallProjectInfo().get(domain);

          if (detail != null) {
            detail.setProjectName(projectName);
            projectInfo.addCallerProjectInfo(projectName, detail);
          }
        }
      }
      break;
    case HOURLY_HOST:
      CrossReport hostReport = getHourlyReport(payload);
      HostInfo hostInfo = new HostInfo(payload.getHourDuration());

      hostInfo.setHostinfoService(m_hostinfoService);
      hostInfo.setClientIp(model.getIpAddress()).setCallSortBy(model.getCallSort())
            .setServiceSortBy(model.getServiceSort());
      hostInfo.setProjectName(payload.getProjectName());
      hostInfo.visitCrossReport(hostReport);
      model.setReport(hostReport);
      model.setHostInfo(hostInfo);
      break;
    case HOURLY_METHOD:
      CrossReport methodReport = getHourlyReport(payload);
      MethodInfo methodInfo = new MethodInfo(payload.getHourDuration());

      methodInfo.setHostinfoService(m_hostinfoService);
      methodInfo.setClientIp(model.getIpAddress()).setCallSortBy(model.getCallSort())
            .setServiceSortBy(model.getServiceSort()).setRemoteProject(payload.getProjectName());
      methodInfo.setRemoteIp(payload.getRemoteIp()).setQuery(model.getQueryName());
      methodInfo.visitCrossReport(methodReport);
      model.setReport(methodReport);
      model.setMethodInfo(methodInfo);
      break;
    case HISTORY_PROJECT:
      CrossReport historyProjectReport = getSummarizeReport(payload);
      ProjectInfo historyProjectInfo = new ProjectInfo(historyTime);

      historyProjectInfo.setHostinfoService(m_hostinfoService);
      historyProjectInfo.setClientIp(model.getIpAddress()).setCallSortBy(model.getCallSort())
            .setServiceSortBy(model.getServiceSort());
      historyProjectInfo.visitCrossReport(historyProjectReport);
      model.setProjectInfo(historyProjectInfo);
      model.setReport(historyProjectReport);

      List<TypeDetailInfo> historyDetails = historyProjectInfo.getServiceProjectsInfo();

      if (historyProjectInfo.getCallerProjectsInfo().isEmpty()) {
        for (TypeDetailInfo info : historyDetails) {
          String projectName = info.getProjectName();
          if (projectName.equalsIgnoreCase(payload.getDomain()) || projectName.equalsIgnoreCase("UnknownProject")
                || projectName.equalsIgnoreCase(ProjectInfo.ALL_CLIENT)) {
            continue;
          }
          Date start = payload.getHistoryStartDate();
          Date end = payload.getHistoryEndDate();
          ProjectInfo temp = buildHistoryCallProjectInfo(projectName, start, end);

          TypeDetailInfo detail = temp.getAllCallProjectInfo().get(domain);

          if (detail != null) {
            detail.setProjectName(projectName);
            historyProjectInfo.addCallerProjectInfo(projectName, detail);
          }
View Full Code Here

    Date end = new Date(start.getTime() + TimeHelper.ONE_HOUR);
    Set<String> domains = m_reportService.queryAllDomainNames(start, end, CrossAnalyzer.ID);

    for (String domainName : domains) {
      CrossReport crossReport = m_reportService.queryCrossReport(domainName, start, end);
      ProjectInfo projectInfo = new ProjectInfo(TimeHelper.ONE_HOUR);

      projectInfo.setHostinfoService(m_hostinfoService);
      projectInfo.setClientIp(Constants.ALL);
      projectInfo.visitCrossReport(crossReport);
      Collection<TypeDetailInfo> callInfos = projectInfo.getCallProjectsInfo();

      for (TypeDetailInfo typeInfo : callInfos) {
        if (!validataService(typeInfo)) {
          merge(serviceReport.findOrCreateDomain(typeInfo.getProjectName()), typeInfo);
        }
View Full Code Here

TOP

Related Classes of com.dianping.cat.report.page.cross.display.ProjectInfo

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.