import com.jamonapi.Monitor; import com.jamonapi.MonitorFactory; public class ExampleClass { public void performTask() { Monitor monitor = MonitorFactory.start("ExampleClass.performTask"); try { } finally { monitor.stop(); } } } import com.jamonapi.MonitorFactory; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; public class JamonInitListener implements ServletContextListener { public void contextInitialized(ServletContextEvent event) { MonitorFactory.setEnabled(true); } public void contextDestroyed(ServletContextEvent event) { MonitorFactory.setEnabled(false); } }


上一篇:
下一篇:
切换中文