if (!(database instanceof AbstractBlockingDatabase)) {
System.out.println("ERR: Only blocking databases are supported.");
System.exit(2);
}
AbstractBlockingDatabase db = (AbstractBlockingDatabase) database;
for (KeyFunction func : db.getKeyFunctions()) {
System.out.println("\n===== " + func);
// count sizes
Map<Integer, Counter> sizes = new HashMap();
Map blocks = db.getBlocks(func);
for (Object block : blocks.values()) {
int size;
if (block instanceof String[])
size = ((String[]) block).length;
else if (block instanceof MapDBBlockingDatabase.Block)