/** Sends RPCs and returns nanos elapsed. */
private static long sendRpcs(boolean withPlugin) throws IOException {
HttpServer server = createServer(withPlugin);
Transceiver t =
new HttpTransceiver(new URL("http://127.0.0.1:"+server.getPort()+"/"));
GenericRequestor requestor = new GenericRequestor(NULL_PROTOCOL, t);
long now = System.nanoTime();
for (int i = 0; i < COUNT; ++i) {
requestor.request("null", null);
}
long elapsed = System.nanoTime() - now;
t.close();
server.close();
return elapsed;
}