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

Method run_clear

tests/python_tests/python_performance.py:181–188  ·  view source on GitHub ↗
(self, db, count=100000)

Source from the content-addressed store, hash-verified

179
180 # Tests the performance of the 'clear' function
181 def run_clear(self, db, count=100000):
182 tr = db.create_transaction()
183 s = time.time()
184
185 for i in range(count):
186 del tr[self.random_key()]
187
188 return count / (time.time() - s)
189
190 # Tests the performance of the 'clear_range' function
191 def run_clear_range(self, db, count=100000):

Callers

nothing calls this directly

Calls 4

random_keyMethod · 0.95
rangeFunction · 0.85
timeMethod · 0.65
create_transactionMethod · 0.45

Tested by

no test coverage detected