Example #1
0
 public void run() {
   t.reset();
   while (true) {
     t.count();
     try {
       a.put(mapper.writeValueAsString(payload));
     } catch (Exception e) {
       throw new RuntimeException(e);
     }
   }
 }
Example #2
0
 public void run() {
   int batch = 100000;
   Utils.Timer timer = new Utils.Timer(getClass());
   timer.reset();
   long count = 1;
   while (true) {
     try {
       q.take();
     } catch (InterruptedException e) {
       throw new RuntimeException(e);
     }
     timer.count();
   }
 }