JETM Drop-in HTTP Console
JETM ships with a drop-in HTTP console that provides means to access aggregated performance statistics. It supports both nested and flat measurements. Click image to the right to see an example screen-shot.
Currently there are three ways to activate the HTTP console: It can either be automatically enabled using the HttpConsoleServerPlugin or HttpConsoleServlet or manually instantiated using HttpConsoleServer.
HTTP Console Servlet
See web application and Spring web application integration for further details.
HTTP Console Plugin
Applications that use static JETM configuration can rely on the plugin mechanism to startup and shutdown a HTTP console. The plugin HttpConsoleServerPlugin may be used for this. See following xml configuration example:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jetm-config PUBLIC "-// void.fm //DTD JETM Config 1.2//EN" "http://jetm.void.fm/dtd/jetm_config_1_2.dtd"> <jetm-config> ... <extension> <plugin> <plugin class="etm.contrib.console.HttpConsoleServerPlugin"/> </plugin> </extension> </jetm-config>
Once enabled it can be accessed through HTTP port 40000 (e.g. http://localhost:40000).
Standalone HTTP Console Server
Starting the HTTP Console Server is as simple as providing an instance of EtmMonitor to HttpConsoleServer. Optionally the listen port (setListenPort) and the number of worker threads (setWorkerSize) can be configured.
EtmMonitor etmMonitor = ...;
HttpConsoleServer server = new HttpConsoleServer(etmMonitor);
// override default listen port
server.setListenPort(45000);
server.start();
Please note that HttpConsoleServer can easily be used within a spring managed application. See Spring Framework integration how-to for further details.
HTTP console properties
Both the plugin and the standalone HTTPConsole support the following properties:
Property | Description | Default |
---|---|---|
listenPort | Sets the listen port for the console | 40000 |
expanded | Enables or disables expanded view | false |
workerSize | The number of threads used for request processing. Must be 2 or more. | 2 |