Closed odidev closed 3 years ago
Please remove cp35-cp35m on line 153. This wasn't related to your change, but CI won't pass until it is removed.
Done.
One test failed. `___ PreloadTest.test_preload ___
self =
@unittest.skipIf(not sys.platform.startswith('linux'), "test only works on Linux")
def test_preload(self):
"""
Test that reading just the key doesn't prefault the value contents, but
reading the data does.
"""
import resource
self.c.put(B('a'), B('a') * (256 * 1024 * 1024))
self.txn.commit()
self.env.close()
# Just reading the data is obviously going to fault the value in. The
# point is to fault it in while the GIL is unlocked. We use the buffers
# API so that we're not actually copying the data in. This doesn't
# actually show that we're prefaulting with the GIL unlocked, but it
# does prove we prefault at all, and in 2 correct places.
self.path, self.env = testlib.temp_env(path=self.path, writemap=True)
self.txn = self.env.begin(write=True, buffers=True)
self.c = self.txn.cursor()
minflts_before = resource.getrusage(resource.RUSAGE_SELF)[6]
self.c.set_key(B('a'))
assert bytes(self.c.key()) == B('a')
minflts_after_key = resource.getrusage(resource.RUSAGE_SELF)[6]
self.c.value()
minflts_after_value = resource.getrusage(resource.RUSAGE_SELF)[6]
epsilon = 20
# Setting the position doesn't prefault the data
assert minflts_after_key - minflts_before < epsilon
E AssertionError: assert (88293 - 88273) < 20`
Bumping epsilon up to 30 should do it.
One test failed. `___ PreloadTest.test_preload ___
self =
@unittest.skipIf(not sys.platform.startswith('linux'), "test only works on Linux") def test_preload(self): """ Test that reading just the key doesn't prefault the value contents, but reading the data does. """ import resource self.c.put(B('a'), B('a') * (256 * 1024 * 1024)) self.txn.commit() self.env.close() # Just reading the data is obviously going to fault the value in. The # point is to fault it in while the GIL is unlocked. We use the buffers # API so that we're not actually copying the data in. This doesn't # actually show that we're prefaulting with the GIL unlocked, but it # does prove we prefault at all, and in 2 correct places. self.path, self.env = testlib.temp_env(path=self.path, writemap=True) self.txn = self.env.begin(write=True, buffers=True) self.c = self.txn.cursor() minflts_before = resource.getrusage(resource.RUSAGE_SELF)[6] self.c.set_key(B('a')) assert bytes(self.c.key()) == B('a') minflts_after_key = resource.getrusage(resource.RUSAGE_SELF)[6] self.c.value() minflts_after_value = resource.getrusage(resource.RUSAGE_SELF)[6] epsilon = 20 # Setting the position doesn't prefault the data
assert minflts_after_key - minflts_before < epsilon
E AssertionError: assert (88293 - 88273) < 20`
Bumping epsilon up to 30 should do it.
Done.
Sorry, I couldn't get it working. github actions is having trouble running the qemu container. See https://github.com/jnwatson/py-lmdb/runs/4588510079?check_suite_focus=true
Please disregard my last comment. Docker was down yesterday.
Added linux aarch64 wheel build support. Related to https://github.com/jnwatson/py-lmdb/issues/298. @jnwatson Could you please review this PR?