barrier.await(); // wait for all threads to be ready
long timeout = warmup ? WARMUP_TIME_SECS : RUNNING_TIME_SECS;
TimeUnit unit = TimeUnit.SECONDS;
Thread.sleep(unit.toMillis(timeout)); // Wait for the duration of the test
run.set(false); // Instruct tests to stop doing work
barrier.await(2, TimeUnit.MINUTES); // wait for all threads to finish
log.infof("[%s] All threads finished, check for exceptions", title(warmup));
for (Future<String> future : futures) {