mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(storage): use mdbx_txn_reset to time out transactions (#6850)
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
This commit is contained in:
@ -46,7 +46,7 @@ fn bench_get_rand_raw(c: &mut Criterion) {
|
||||
|
||||
c.bench_function("bench_get_rand_raw", |b| {
|
||||
b.iter(|| unsafe {
|
||||
txn.with_raw_tx_ptr(|txn| {
|
||||
txn.txn_execute(|txn| {
|
||||
let mut i: size_t = 0;
|
||||
for key in &keys {
|
||||
key_val.iov_len = key.len() as size_t;
|
||||
@ -57,7 +57,8 @@ fn bench_get_rand_raw(c: &mut Criterion) {
|
||||
i += key_val.iov_len;
|
||||
}
|
||||
black_box(i);
|
||||
});
|
||||
})
|
||||
.unwrap();
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user