I need to know how long the server/servlet has taken to process a particular request. Could anybody help me in finding the servlet's processing time.
Thanks in Advance Madhu Gadde
Joined: Jun 23, 2005
Have a filter intercept the Request. Note the time before and after invoking the doFilter method. The difference will give you the processing time for the request. But this won't include the network delay.
Joined: Jan 30, 2003
put this in doGet():
long appStartTime = System.currentTimeInMillis();
Now any time you want a time marker you subtract appStartTime from System.currentTimeInMillis();
I get one buffer at start of doGet(), put log messages in along the way with an elapsed time and print once at the end. This way I can filter the log file for specific log points and get the elapsed time.
"No one appreciates the very special genius of your conversation as the dog does."