database.getDatabaseManager().createDatabase(dbname, 5);
}
public void startTest() throws Exception {
final Database db = database.getDatabaseManager().getDatabase(dbname);
long dbSize = 0;
boolean[] contents = new boolean[10000];
for (;;) {
final int numInGroup = (int) Math.round(Math.random() * 9) + 1;
final DatabaseInsertGroup ig = db.createInsertGroup();
for (int i = 0; i < numInGroup; i++) {
final byte[] key = generateData(30);
final byte[] value = generateData(10000);
ig.addInsert((int) (Math.random() * 5), key, value);
dbSize += key.length + value.length;
}
db.insert(ig, null).get();
int block = (int) (dbSize / (1024 * 1204 * 50));
if (block > 0 && !contents[block]) {
contents[block] = true;
System.out.println(dbSize / (1024 * 1204) + " MB");