props.setProperty(
JeEnvironment.FLUSH_TO_DISK_PROPERTY, String.valueOf(flush));
byte[] data = new byte[itemSize];
data[0] = 1;
store = getDataStore();
DummyTransaction txn = createTransaction(1000);
long[] ids = new long[items];
for (int i = 0; i < items; i++) {
ids[i] = store.createObject(txn);
store.setObject(txn, ids[i], data);
}
txn.commit();
for (int r = 0; r < repeat; r++) {
long start = System.currentTimeMillis();
for (int c = 0; c < count; c++) {
txn = createTransaction(1000);
for (int i = 0; i < items; i++) {
boolean update = i < modifyItems;
byte[] result = store.getObject(txn, ids[i], update);
if (update) {
result[0] ^= 1;
store.setObject(txn, ids[i], result);
}
}
txn.commit();
}
long stop = System.currentTimeMillis();
System.err.println(
"Time: " + (stop - start) / (float) count +
" ms per transaction");