MCPcopy Create free account
hub / github.com/apple/foundationdb / run_get_key

Method run_get_key

tests/python_tests/python_performance.py:278–287  ·  view source on GitHub ↗
(self, tr, count=2000)

Source from the content-addressed store, hash-verified

276 # Tests the performance of the 'get_key' function
277 @fdb.transactional
278 def run_get_key(self, tr, count=2000):
279 tr.options.set_retry_limit(5)
280 s = time.time()
281
282 for i in range(count):
283 tr.get_key(
284 fdb.KeySelector(self.random_key(), True, random.randint(-10, 10))
285 ).wait()
286
287 return count / (time.time() - s)
288
289 @fdb.transactional
290 def run_get_single_key_range(self, tr, count=2000):

Callers

nothing calls this directly

Calls 6

random_keyMethod · 0.95
rangeFunction · 0.85
KeySelectorMethod · 0.80
timeMethod · 0.65
waitMethod · 0.45
get_keyMethod · 0.45

Tested by

no test coverage detected