@Test public void testCounter() throws IOException { setProperty(Parameter.WARNING_THRESHOLD_MILLIS, "500"); setProperty(Parameter.SEVERE_THRESHOLD_MILLIS, "1500"); setProperty(Parameter.ANALYTICS_ID, "123456789"); counter.addRequest("test1", 0, 0, 0, false, 1000); counter.addRequest("test2", 1000, 500, 500, false, 1000); counter.addRequest("test3", 100000, 50000, 50000, true, 10000); servicesCounter.addRequest("testServices", 100, 50, 50, false, -1); final StringBuilder sb = new StringBuilder(); for (int i = 0; i < 5010; i++) { sb.append(i % 10); } final String longRequestName = sb.toString(); counter.addRequest(longRequestName, 0, 0, 0, false, 5000); collector.collectWithoutErrors(javaInformationsList); final HtmlReport htmlReport = new HtmlReport(collector, null, javaInformationsList, Period.TOUT, writer); htmlReport.toHtml("message 2", null); assertNotEmptyAndClear(writer); setProperty(Parameter.NO_DATABASE, Boolean.TRUE.toString()); collector.collectWithoutErrors(javaInformationsList); htmlReport.toHtml("message 2", null); assertNotEmptyAndClear(writer); setProperty(Parameter.NO_DATABASE, Boolean.FALSE.toString()); setProperty(Parameter.WARNING_THRESHOLD_MILLIS, "-1"); try { htmlReport.toHtml("message 2", null); } catch (final IllegalStateException e) { assertNotNull("ok", e); } setProperty(Parameter.WARNING_THRESHOLD_MILLIS, null); collector = new Collector("test", Arrays.asList(counter)); final HtmlReport htmlReport2 = new HtmlReport(collector, null, javaInformationsList, Period.TOUT, writer); htmlReport2.toHtml(null, null); }
@Override void toHtml() throws IOException { writeHtmlHeader(); htmlCoreReport.toHtml(); writeHtmlFooter(); }
HtmlReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeHtmlHeader(); htmlCoreReport.toHtml(); writeHtmlFooter(); } }
HtmlReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeHtmlHeader(); htmlCoreReport.toHtml(); writeHtmlFooter(); } HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Range range, Writer writer);  HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Period period, Writer writer); }
HtmlReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeHtmlHeader(); htmlCoreReport.toHtml(); writeHtmlFooter(); } HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Range range, Writer writer);  HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Period period, Writer writer); void toHtml(String message, String anchorNameForRedirect); void writeLastShutdown(); static void writeAddAndRemoveApplicationLinks(String currentApplication,
			Collection<String> applications, Writer writer); void writeAllCurrentRequestsAsPart(); void writeAllThreadsAsPart(); void writeThreadsDump(); void writeCounterSummaryPerClass(String counterName, String requestId); void writeSource(String className); void writeDependencies(); void writeSpringContext(); void writeHtmlHeader(); void writeHtmlFooter(); void writeMessageIfNotNull(String message, String partToRedirectTo); void writeRequestAndGraphDetail(String graphName); void writeRequestUsages(String graphName); void writeSessions(List<SessionInformations> sessionsInformations, String message,
			String sessionsPart); void writeSessionDetail(String sessionId, SessionInformations sessionInformations); void writeHotspots(List<SampledMethod> hotspots); void writeHeapHistogram(HeapHistogram heapHistogram, String message,
			String heapHistoPart); void writeProcesses(List<ProcessInformations> processInformationsList); void writeProcesses(Map<String, List<ProcessInformations>> processesByTitle); void writeDatabase(DatabaseInformations databaseInformations); void writeConnections(List<ConnectionInformations> connectionInformationsList,
			boolean withoutHeaders); void writeJndi(List<JndiBinding> jndiBindings, String path); void writeMBeans(List<MBeanNode> mbeans); void writeMBeans(Map<String, List<MBeanNode>> mbeansByTitle); void writeCacheWithKeys(String cacheId, CacheInformations cacheInformations,
			String message, String cacheKeyPart, boolean withoutHeaders); void writeJCacheWithKeys(String cacheId, JCacheInformations jcacheInformations,
			String message, String cacheKeyPart, boolean withoutHeaders); void writeCrashes(); void writeHashPassword(String algorithm, String password); }
HtmlReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeHtmlHeader(); htmlCoreReport.toHtml(); writeHtmlFooter(); } HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Range range, Writer writer);  HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Period period, Writer writer); void toHtml(String message, String anchorNameForRedirect); void writeLastShutdown(); static void writeAddAndRemoveApplicationLinks(String currentApplication,
			Collection<String> applications, Writer writer); void writeAllCurrentRequestsAsPart(); void writeAllThreadsAsPart(); void writeThreadsDump(); void writeCounterSummaryPerClass(String counterName, String requestId); void writeSource(String className); void writeDependencies(); void writeSpringContext(); void writeHtmlHeader(); void writeHtmlFooter(); void writeMessageIfNotNull(String message, String partToRedirectTo); void writeRequestAndGraphDetail(String graphName); void writeRequestUsages(String graphName); void writeSessions(List<SessionInformations> sessionsInformations, String message,
			String sessionsPart); void writeSessionDetail(String sessionId, SessionInformations sessionInformations); void writeHotspots(List<SampledMethod> hotspots); void writeHeapHistogram(HeapHistogram heapHistogram, String message,
			String heapHistoPart); void writeProcesses(List<ProcessInformations> processInformationsList); void writeProcesses(Map<String, List<ProcessInformations>> processesByTitle); void writeDatabase(DatabaseInformations databaseInformations); void writeConnections(List<ConnectionInformations> connectionInformationsList,
			boolean withoutHeaders); void writeJndi(List<JndiBinding> jndiBindings, String path); void writeMBeans(List<MBeanNode> mbeans); void writeMBeans(Map<String, List<MBeanNode>> mbeansByTitle); void writeCacheWithKeys(String cacheId, CacheInformations cacheInformations,
			String message, String cacheKeyPart, boolean withoutHeaders); void writeJCacheWithKeys(String cacheId, JCacheInformations jcacheInformations,
			String message, String cacheKeyPart, boolean withoutHeaders); void writeCrashes(); void writeHashPassword(String algorithm, String password);  }