Sunday 15 June 2014

java - How to get the response time of a json web service request? -


I request a post for a web service below and I need to answer every web service.

Your help has been greatly appreciated. To get time in nanoseconds, wrap around your request:

long startTime = System.nanoTime (); // ... code is being measured ... long response time = system NanoTime () - startTime;

Remember that it will capture any processing time, so the actual network response will be over time. But it would be useful to compare between different requests.


No comments:

Post a Comment