Package com.dianping.cat.report.page.system.graph

Examples of com.dianping.cat.report.page.system.graph.SystemReportConvertor


      if (!Constants.ALL.equalsIgnoreCase(ipAddrsStr)) {
        String[] ipAddrsArray = ipAddrsStr.split("_");
        ipAddrs = new HashSet<String>(Arrays.asList(ipAddrsArray));
      }
      SystemReportConvertor convert = new SystemReportConvertor(type, ipAddrs);

      convert.visitMetricReport(report);
      return convert.getReport();
    }
  }
View Full Code Here


          "utf-8");
    String systemReportIpFilterXml = Files.forIO().readFrom(
          getClass().getResourceAsStream("systemReportIpFilter.xml"), "utf-8");

    MetricReport metricReport = DefaultSaxParser.parse(metricReportXml);
    SystemReportConvertor convert = new SystemReportConvertor("system", null);
    convert.visitMetricReport(metricReport);
    MetricReport systemReportAllIp = convert.getReport();

    Assert.assertEquals("Check all ip convert result!", systemReportAllIpXml.replace("\r", ""), systemReportAllIp
          .toString().replace("\r", ""));

    Set<String> ipAddrs = new HashSet<String>(Arrays.asList("10.254.251.60"));
    SystemReportConvertor convertIpFilter = new SystemReportConvertor("system", ipAddrs);
    convertIpFilter.visitMetricReport(metricReport);
    MetricReport systemReportIpFilter = convertIpFilter.getReport();

    Assert.assertEquals("Check all ip convert result!", systemReportIpFilterXml.replace("\r", ""),
          systemReportIpFilter.toString().replace("\r", ""));

  }
View Full Code Here

          if (!Constants.ALL.equalsIgnoreCase(ipAddrsStr)) {
            String[] ipAddrsArray = ipAddrsStr.split("_");
            ipAddrs = new HashSet<String>(Arrays.asList(ipAddrsArray));
          }

          SystemReportConvertor convert = new SystemReportConvertor(type, ipAddrs);
          MetricReport metricReport = (MetricReport) response.getModel();

          convert.visitMetricReport(metricReport);
          ((ModelResponse<MetricReport>) response).setModel(convert.getReport());
        } else if (Constants.METRIC_CDN.equals(metricType)) {
          String cdn = payload.getCdn();
          String province = payload.getProvince();
          String city = payload.getCity();
          MetricReport metricReport = (MetricReport) response.getModel();
View Full Code Here

TOP

Related Classes of com.dianping.cat.report.page.system.graph.SystemReportConvertor

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.