I am trying to create a basic test tool, that hopefully will develop into a bigger project, basically I want to create a simple threaded httpclient that will send multiple requests to a server, record the avg response time, response time etc. I want to know what would be the best way to modify this using threads and is their anything I have to look out for. How can I record the response times etc, as I want to create a graph from the results?? Has anyone tried this before? ANy good links etc?? I have read a lot, I know im capable of doing it, I just want to be put on the right track.
Some sample code would be great.
public class WebTest
public static void main (String args)
// initialize random seed
Random randomGen = new Random(new Date().getTime());
// sleep for a random interval
// print the user supplied URL to the console window
// open URL connection
URLConnection urlConn = new URL(args).openConnection();
// read and print the content to the console window
InputStream in = urlConn.getInputStream();
byte buf = new byte;
int nSize = in.read(buf);
nSize = in.read(buf);
// print error message