Hello,

You can write a servlet that call your servlet. Something like :

URL urlServlet = new URL(urlServletToTest);
long startTime = System.currentTimeMillis();

BufferedReader inWriter = new BufferedReader(
                                                new InputStreamReader( urlServlet.openStream()));

long endTime = System.currentTimeMillis();


with urlServletToTest a String representing the url to the servlet you want to test with the arguments needed. And read the return stuff if needed

regards,

Marie



Riyaz Prasla <[EMAIL PROTECTED]>
Sent by: "A mailing list for discussion about Sun Microsystem's Java               Servlet API Technology." <[EMAIL PROTECTED]>

13/12/2002 15:47
Please respond to "A mailing list for discussion about Sun Microsystem's Java               Servlet API Technology."

       
        To:        [EMAIL PROTECTED]
        cc:        
        Subject:        Measure Processing time



Hi,
  I am looking for some way that I can calculate processing time a servlet takes. Something like:


public class ...
{
start timer

    .
   .
statements
   .
   .

end timer
}

Any ideas on this? Is there a Java class I can use?

Thanks for any help.

Riyaz

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html



Reply via email to