import java.io.*;
import java.net.*;
import java.util.*;

public class LoadTest {
   private static final String _url = "http://127.0.0.1:8066/";
   public static void main(String args[]) throws Exception {
      long ok = 0, error = 0, ch;
      boolean first = true;
      String content = "";
      while(true) {
         StringBuffer buffer = new StringBuffer();
         URL url = new URL(_url);
         InputStream in = url.openStream();
         while((ch = in.read()) != -1)
            buffer.append((char)ch);

         if(first) {
            System.out.println(buffer.toString());
            content = new String(buffer.toString());
            first = false;
         }

         if(content.compareTo(buffer.toString()) == 0)
            ok++;
         else
            error++;
         System.out.println("OK=" + ok + ", ERROR=" + error);
         System.out.flush(); 
      }
   }
}