Hi all,
I try to benchmark an access time on a database. I have a servlet running in
the back-end, which simply connects to a database, opens and retrieves data
from a database.
I run the servlet on Netscape and Microsoft IE, the execution shows
different in time between Netscape and MS IE (for few runs). MS IE takes
less time for each run compare to Netscape.
What I don�t understand is, both browsers access the some servlet, why is
one has better performance than the other does?
Does any one have any experience with this?
Is there any explanation for this kind of behavior?
Below is the way I calculate the execute time.
public class Benchmark extends HttpServlet
{
public void doGet(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException, IOException
{
long beginTime = System.currentTimeMillis();
// Set the content type of the response
resp.setContentType("text/html");
// Connect to database
// do resultset
// close database �..
long endTime = System.currentTimeMillis();
System.out.println("It took: " + (endTime - beginTime "
milliseconds to complete processing.");
}
}
Thank you very much,
Connie
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com