}
long time = System.nanoTime()-begin;
// Check out the resulting stats
DataSetIndex dataSetIndex = dataSetOpEngine.getIndexRegistry().get(EXPENSE_REPORTS);
DataSetIndexStats stats = dataSetIndex.getStats();
DataSet dataSet = dataSetIndex.getDataSet();
System.out.println(stats.toString("\n"));
// Assert the reuse of group operations and aggregate calculations is working.
assertThat(stats.getNumberOfGroupOps()).isEqualTo(1);
assertThat(stats.getNumberOfAggFunctions()).isEqualTo(10);
// The build time should be shorter than the overall lookup time.
assertThat(stats.getBuildTime()).isLessThan(time);
// The reuse rate must reflect the number of times the lookups are being reused.
assertThat(stats.getReuseRate()).isGreaterThanOrEqualTo(lookupTimes-1);
// The index size must not be greater than the 20% of the dataset's size
assertThat(stats.getIndexSize()).isLessThan(dataSet.getEstimatedSize()/5);
}