@Test public void test() throws IOException { final SamplingProfiler samplingProfiler = new SamplingProfiler(new ArrayList<String>(), null); final List<SampledMethod> emptyHotspots = samplingProfiler.getHotspots(NB_ROWS); samplingProfiler.update(); final List<SampledMethod> hotspots = samplingProfiler.getHotspots(NB_ROWS); final StringWriter writer = new StringWriter(); new HtmlHotspotsReport(emptyHotspots, writer).toHtml(); assertNotEmptyAndClear(writer); new HtmlHotspotsReport(hotspots, writer).toHtml(); assertNotEmptyAndClear(writer); final Counter counter = new Counter("test html report", null); final Collector collector = new Collector("test", Collections.singletonList(counter)); final Period period = Period.TOUT; final HtmlReport htmlReport = new HtmlReport(collector, null, createJavaInformationsList(), period, writer); htmlReport.writeHotspots(hotspots); assertNotEmptyAndClear(writer); }
@Override void toHtml() throws IOException { writeLinks(); writeln("<br/>"); writeTitle("clock.png", getString("hotspots")); writeTable(); }
HtmlHotspotsReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeLinks(); writeln("<br/>"); writeTitle("clock.png", getString("hotspots")); writeTable(); } }
HtmlHotspotsReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeLinks(); writeln("<br/>"); writeTitle("clock.png", getString("hotspots")); writeTable(); } HtmlHotspotsReport(List<SampledMethod> hotspots, Writer writer); }
HtmlHotspotsReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeLinks(); writeln("<br/>"); writeTitle("clock.png", getString("hotspots")); writeTable(); } HtmlHotspotsReport(List<SampledMethod> hotspots, Writer writer);  }
HtmlHotspotsReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeLinks(); writeln("<br/>"); writeTitle("clock.png", getString("hotspots")); writeTable(); } HtmlHotspotsReport(List<SampledMethod> hotspots, Writer writer);   }