private void testDirectory(Directory dir, String testLabel) throws InterruptedException, IOException {
SharedState state = fillDirectory(dir, TERMS_NUMBER);
ExecutorService e = Executors.newFixedThreadPool(THREADS);
for (int i = 0; i < THREADS; i++) {
e.execute(new IndependentLuceneReaderThread(dir, state, i, 1, TERMS_NUMBER));
}
e.shutdown();
state.startWaitingThreads();
Thread.sleep(DURATION_MS);
long searchesCount = state.incrementIndexSearchesCount(0);