reqCnt = thr * perthr;
long t0 = System.currentTimeMillis();
tr = new ThreadRunner(thr, perthr) {
public void makeRequest(int i) throws Exception {
HttpRequest cstate = clientCon.request("localhost",
ssl ? 8443 : 8802);
synchronized (active) {
active.put(cstate, cstate);
}
if (spdy) {
// Magic way to force spdy - will be replaced with
// a negotiation.
cstate.setProtocol("SPDY/1.0");
}
if (ssl) {
cstate.setSecure(true);
}
cstate.requestURI().set("/hello");
cstate.setCompletedCallback(reqCallback);
// no body
cstate.getBody().close();
cstate.send();
while (active.size() >= thr) {
synchronized(thrlock) {
thrlock.wait();
}