Instrumented code

In your code, add optional logic that you can enable to record timing information. Measure the execution time for major tasks such as:

EAServer includes built-in support for profiling and tracing of EJB business method invocations and Web component invocations—see “Component profiling and tracing”.

In your own Java code, you can record timings by calling System.currentTimeMillis(). Logging can degrade performance, so be sure to encapsulate the timing code in logic that allows you or your administrators to selectively enable tracing for areas where you are tuning. To allow configuration of the log options, you can use Log4j or the Java Logging package.