//int c = 1000000;
//int b = 1;
//int p = 16;
//int t = 4;
ThreadManager threadManager = JAThreadManager.newThreadManager(t);
try {
Driver driver = new Driver(threadManager, c, b, p);
JABufferedEventsFuture<Object> eventFuture = new JABufferedEventsFuture<Object>();
eventFuture.send(driver, eventFuture);
eventFuture.send(driver, eventFuture);
long t0 = System.currentTimeMillis();
eventFuture.send(driver, eventFuture);
long t1 = System.currentTimeMillis();
System.out.println("" + p + " parallel runs of " + (2 * c * b) + " messages each.");
System.out.println("" + (p * 2 * c * b + 2 * p) + " messages sent with " + t + " threads.");
if (t1 != t0)
System.out.println("msgs per sec = " + ((c * b * p * 2L + 2L * p) * 1000L / (t1 - t0)));
} finally {
threadManager.close();
}
//burst size of 1000
//4 parallel runs of 200000000 messages each.
//800000008 messages sent with 4 threads.