Examples of splitReportToGraphs()


Examples of com.dianping.cat.report.task.heartbeat.HeartbeatGraphCreator.splitReportToGraphs()

  @Test
  public void test1() throws Exception {
    String xml = Files.forIO().readFrom(getClass().getResourceAsStream("heartbeat.xml"), "utf-8");
    HeartbeatReport report = DefaultSaxParser.parse(xml);
    HeartbeatGraphCreator creator = new HeartbeatGraphCreator();
    List<Graph> graphs = creator.splitReportToGraphs(report.getStartTime(), report.getDomain(), "heartbeat", report);
    String result = Files.forIO().readFrom(getClass().getResourceAsStream("result"), "utf-8");
   
    Assert.assertEquals(result, graphs.get(0).getDetailContent());
  }
}
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.