In your code, add optional logic that you can enable to record timing information. Measure the execution time for major tasks such as:
Component business method entry and exit
Entry and exit of JSP or servlet service invocations
Calls to other components or EJBs
Database command execution and result-set processing
Requests for cached connections
JNDI lookups that return EJB proxies or JDBC data sources
In 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. Both of these packages allow simple configuration of logging options and can be integrated with EAServer. For more information, see “Configuring log profiles” in the EAServer System Administration Guide.
Copyright © 2005. Sybase Inc. All rights reserved. |