Overview
This service uses JAMon to capture statistical performance data. This performance data can be exported as HTML report into the file system or viewed using a browser when your application runs in a servlet container.
Have a look at an a HTML example report available from the JAMon homepage.
The implementation uses reflection to invoke the JAMon library to avoid compile-time coupling. If the interceptor is enabled while the JAMON library is not found in the classpath the implementation silently ignores all intercepted calls.
The service is by default disabled since the JAMon library are currently not hosted on IBIBLIO
Configuration
Component Configuration
Item | Datatype | Cardinality | Description |
---|---|---|---|
isEnabled | Boolean | [0|1] | Turn the interceptor. If no value is supplied then "false" is used thereby disabling all interceptor invocations. |
performanceMonitorClassName | String | [0|1] | The implementation class doing the JAMon API calls. If no value is supplied then "org.apache.fulcrum.yaafi.interceptor.jamon.Jamon1PerformanceMonitorImpl" providing out of the box JAMon 1.x and 2.x integration |
reportTimeout | Long | [0|1] | The report timeout to generate a HTML report. If the value "0" is used than no periodic reports are generated. If no value is supplied then "0" is used. |
reportFile | String | [0|1] | The report file being used. If a relative file name is used it will be resolved relative to application directory. |
reportOnExit | Boolean | [0|1] | Dump a HTML report when disposing the service, e.g. during shutdown of your application. |
services | Tree | [0|1] | Contains a list of services to be monitored. |
services/service@name | String | [1..n] | The name of an individual service to be monitored. |
Role Configuration
<role name="org.apache.fulcrum.yaafi.interceptor.jamon.JamonInterceptorService" shorthand="JamonInterceptorService" default-class="org.apache.fulcrum.yaafi.interceptor.jamon.JamonInterceptorServiceImpl" />
Usage
The JamonInterceptorService is enabled and monitors all services. The service writes every minute a HTML report and in addition when disposing the service
<JamonInterceptorService> <isEnabled>true</isEnabled> <reportTimeout>60000</reportTimeout> <reportFile>./temp/jamon.html</reportFile> <reportOnExit>true</reportOnExit> <services> <service name="*"/> </services> </JamonInterceptorService>