@Test public void testWriteHeapHistogram() throws IOException { final ByteArrayOutputStream output = new ByteArrayOutputStream(); final InputStream input = getClass().getResourceAsStream("/heaphisto.txt"); try { final PdfOtherReport pdfOtherReport = new PdfOtherReport(TEST_APP, output); final HeapHistogram heapHistogram = new HeapHistogram(input, false); pdfOtherReport.writeHeapHistogram(heapHistogram); pdfOtherReport.close(); } finally { input.close(); } assertNotEmptyAndClear(output); final InputStream input2 = getClass().getResourceAsStream("/heaphisto_jrockit.txt"); try { final PdfOtherReport pdfOtherReport = new PdfOtherReport(TEST_APP, output); final HeapHistogram heapHistogram = new HeapHistogram(input2, true); pdfOtherReport.writeHeapHistogram(heapHistogram); pdfOtherReport.close(); } finally { input2.close(); } assertNotEmptyAndClear(output); }
public void writeHeapHistogram(HeapHistogram heapHistogram) throws IOException { try { document.open(); addParagraph( getFormattedString("heap_histo_du", I18N.createDateAndTimeFormat().format(heapHistogram.getTime())), "memory.png"); new PdfHeapHistogramReport(heapHistogram, document).toPdf(); } catch (final DocumentException e) { throw createIOException(e); } document.close(); }
PdfOtherReport { public void writeHeapHistogram(HeapHistogram heapHistogram) throws IOException { try { document.open(); addParagraph( getFormattedString("heap_histo_du", I18N.createDateAndTimeFormat().format(heapHistogram.getTime())), "memory.png"); new PdfHeapHistogramReport(heapHistogram, document).toPdf(); } catch (final DocumentException e) { throw createIOException(e); } document.close(); } }
PdfOtherReport { public void writeHeapHistogram(HeapHistogram heapHistogram) throws IOException { try { document.open(); addParagraph( getFormattedString("heap_histo_du", I18N.createDateAndTimeFormat().format(heapHistogram.getTime())), "memory.png"); new PdfHeapHistogramReport(heapHistogram, document).toPdf(); } catch (final DocumentException e) { throw createIOException(e); } document.close(); } PdfOtherReport(String application, OutputStream output); }
PdfOtherReport { public void writeHeapHistogram(HeapHistogram heapHistogram) throws IOException { try { document.open(); addParagraph( getFormattedString("heap_histo_du", I18N.createDateAndTimeFormat().format(heapHistogram.getTime())), "memory.png"); new PdfHeapHistogramReport(heapHistogram, document).toPdf(); } catch (final DocumentException e) { throw createIOException(e); } document.close(); } PdfOtherReport(String application, OutputStream output); void close(); void writeSessionInformations(List<SessionInformations> sessionsInformations); void writeHeapHistogram(HeapHistogram heapHistogram); void writeHotspots(List<SampledMethod> hotspots); void writeProcessInformations(List<ProcessInformations> processInformations); void writeProcessInformations(
			Map<String, List<ProcessInformations>> processInformationsByTitle); void writeDatabaseInformations(DatabaseInformations databaseInformations); void writeJndi(List<JndiBinding> jndiBindings, String path); void writeMBeans(List<MBeanNode> mbeans); void writeMBeans(Map<String, List<MBeanNode>> mbeansByTitle); void writeAllCurrentRequestsAsPart(
			Map<JavaInformations, List<CounterRequestContext>> currentRequests, Collector collector,
			List<Counter> counters, long timeOfSnapshot); void writeRequestAndGraphDetail(Collector collector, CollectorServer collectorServer,
			Range range, String requestId); void writeRuntimeDependencies(Counter counter, Range range); void writeCounterSummaryPerClass(Collector collector, Counter counter, String requestId,
			Range range); void writeThreads(List<JavaInformations> javaInformationsList); }
PdfOtherReport { public void writeHeapHistogram(HeapHistogram heapHistogram) throws IOException { try { document.open(); addParagraph( getFormattedString("heap_histo_du", I18N.createDateAndTimeFormat().format(heapHistogram.getTime())), "memory.png"); new PdfHeapHistogramReport(heapHistogram, document).toPdf(); } catch (final DocumentException e) { throw createIOException(e); } document.close(); } PdfOtherReport(String application, OutputStream output); void close(); void writeSessionInformations(List<SessionInformations> sessionsInformations); void writeHeapHistogram(HeapHistogram heapHistogram); void writeHotspots(List<SampledMethod> hotspots); void writeProcessInformations(List<ProcessInformations> processInformations); void writeProcessInformations(
			Map<String, List<ProcessInformations>> processInformationsByTitle); void writeDatabaseInformations(DatabaseInformations databaseInformations); void writeJndi(List<JndiBinding> jndiBindings, String path); void writeMBeans(List<MBeanNode> mbeans); void writeMBeans(Map<String, List<MBeanNode>> mbeansByTitle); void writeAllCurrentRequestsAsPart(
			Map<JavaInformations, List<CounterRequestContext>> currentRequests, Collector collector,
			List<Counter> counters, long timeOfSnapshot); void writeRequestAndGraphDetail(Collector collector, CollectorServer collectorServer,
			Range range, String requestId); void writeRuntimeDependencies(Counter counter, Range range); void writeCounterSummaryPerClass(Collector collector, Counter counter, String requestId,
			Range range); void writeThreads(List<JavaInformations> javaInformationsList);  }