tests: Update binding single key get range performance test to specify a limit of 2 and use exact mode.

This commit is contained in:
A.J. Beamon 2017-09-01 12:36:24 -07:00
parent 0994587573
commit 560e172c46
3 changed files with 5 additions and 5 deletions

View File

@ -500,8 +500,8 @@ struct RunResult getSingleKeyRange(struct ResultSet *rs, FDBTransaction *tr) {
FDBFuture *f = fdb_transaction_get_range(tr,
keys[key], keySize, 1, 0,
keys[key + 1], keySize, 1, 0,
0, 0,
FDB_STREAMING_MODE_WANT_ALL, 1, 0, 0);
2, 0,
FDB_STREAMING_MODE_EXACT, 1, 0, 0);
e = maybeLogError(fdb_future_block_until_ready(f), "waiting for single key range", rs);
if(e) {
@ -516,7 +516,7 @@ struct RunResult getSingleKeyRange(struct ResultSet *rs, FDBTransaction *tr) {
}
if(outCount != 1) {
logError(4100, "non-1 number of keys returned in single key range read", rs);
logError(4100, "more than one key returned in single key range read", rs);
fdb_future_destroy(f);
return RES(0, 4100);
}

View File

@ -352,7 +352,7 @@ public class PerformanceTester extends AbstractTester {
long start = System.nanoTime();
for (int i = 0; i < count; i++) {
int keyIndex = randomKeyIndex();
tr.getRange(key(keyIndex), key(keyIndex + 1)).asList().join();
tr.getRange(key(keyIndex), key(keyIndex + 1), 2).asList().join();
}
long end = System.nanoTime();

View File

@ -275,7 +275,7 @@ class PythonPerformance(PythonTest):
for i in range(count):
index = random.randint(0, self.key_count)
list(tr[self.key(index):self.key(index+1)])
list(tr.get_range(self.key(index), self.key(index+1), limit=2))
return count / (time.time() - s)