@@ -0,0 +1,1108 @@
+package jocket.bench;%0A%0Aimport java.io.DataInputStream;%0Aimport java.io.DataOutputStream;%0Aimport java.io.IOException;%0A%0Aimport jocket.net.JocketSocket;%0A%0A/**%0A * Infinite benchmark, meant for profiling.%0A *%0A * @author pcdv%0A */%0Apublic final class BenchClient2 implements Settings %7B%0A%0A  private final byte%5B%5D buf;%0A%0A  private final DataInputStream in;%0A%0A  private final DataOutputStream out;%0A%0A  public BenchClient2() throws IOException %7B%0A    this.buf = new byte%5BREPLY_SIZE%5D;%0A    JocketSocket s = new JocketSocket(PORT);%0A    in = new DataInputStream(s.getInputStream());%0A    out = new DataOutputStream(s.getOutputStream());%0A  %7D%0A%0A  /**%0A   * Benchmark's main loop.%0A   */%0A  public void bench() throws IOException %7B%0A%0A    out.writeInt(REPS * BATCH + WARMUP);%0A    out.writeInt(REPLY_SIZE);%0A%0A    while (true) %7B%0A      iter(BATCH);%0A    %7D%0A  %7D%0A%0A  public void iter(int batch) throws IOException %7B%0A    for (int i = 0; i %3C batch; i++) %7B%0A      out.write(buf, 0, 4);%0A      out.flush();%0A      in.readFully(buf, 0, REPLY_SIZE);%0A    %7D%0A  %7D%0A%0A  public static void main(String%5B%5D args) throws IOException %7B%0A    new BenchClient2().bench();%0A  %7D%0A%7D%0A

Add infinite client benchmark for profiling.