@Test
public void testOops() throws IOException {
{
long start = System.nanoTime();
OopTable table = new OopTable(TMP);
new File(TMP, "data").deleteOnExit();
DataGenerator.generateDataFor(table, 100 * 1000 * 1000);
table.close();
long time = System.nanoTime() - start;
System.out.printf("OOPS: Took %.3f seconds to generate and save %,d entries%n", time / 1e9, table.size());
}
for (int i = 0; i < 3; i++) {
long start2 = System.nanoTime();
OopTable table2 = new OopTable(TMP);
computeMidPriceBP(table2);
System.gc();
table2.close();
long time2 = System.nanoTime() - start2;
System.out.printf("OOPS: Took %.3f seconds calculate the mid BP, plus a GC and save %,d entries%n", time2 / 1e9, table2.size());
}
}