final SynchronizedDescriptiveStatistics statistics = new SynchronizedDescriptiveStatistics();
if (concurrencyLevel == 1) {
// Run test iterations, and capture the execution times
long runtimeEnd = System.currentTimeMillis() + RUNTIME;
while (System.currentTimeMillis() < runtimeEnd) {
statistics.addValue(execute());
}
} else {
List<Executor> threads = new LinkedList<Executor>();
for (int n=0; n<concurrencyLevel; n++) {