tests: Update binding single key get range performance test to specify a limit of 2 and use exact mode.
This commit is contained in:
parent
0994587573
commit
560e172c46
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue