dataInterface.flush();
long endOfWrite = System.nanoTime();
double writesPerSecond = numberOfItemsWritten.longValue() * 1e9 / (endOfWrite - startOfWrite);
//read data (we don't read more then 200M of items, since this is plenty to get an accurate estimate of reading speed)
dataInterface.optimizeForReading();
MutableLong numberOfItemsRead = new MutableLong(0);
CountDownLatch readLatch = new CountDownLatch(numberOfThreads);
long startOfRead = System.nanoTime();
for (int i = 0; i < numberOfThreads; i++) {
new BigramTestsThread(dataType, numberOfItemsRead, Math.min(200 * 1024 * 1024, numberOfItems), rdr, dataInterface, readLatch, true).start();