Parametrized the code for benchmark Producers

This commit is contained in:
selva.andre
2012-09-04 13:58:33 +02:00
parent e56662fbef
commit a52845a4c2
@@ -24,9 +24,10 @@ public class Main {
//force wait to let the consumer be registered before the producer
Thread.sleep(1000);
int len = Producer.PUB_LOOP / NUM_CONCURRENT_PRODS;
producerPool.submit(new Producer("Prod1", 0, len));
producerPool.submit(new Producer("Prod2", len, len));
for (int i = 0; i < NUM_CONCURRENT_PRODS; i++) {
producerPool.submit(new Producer("Prod " + i, i * len, len));
}
consumerPool.shutdown();
producerPool.shutdown();
}