for (int i = 0; i < 2; i++) {
tp.execute(buildArray(LockingModel.NOLOCK));
}
tp.execute(buildArray(LockingModel.NOLOCK));
tp.printThroughput("No lock: ", true);
}
static SelectiveLockRunnable[] buildArray(LockingModel model) {
SelectiveLockRunnable[] array = new SelectiveLockRunnable[THREAD_COUNT];
for (int i = 0; i < THREAD_COUNT; i++) {