aboutsummaryrefslogtreecommitdiffstats
path: root/benches
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2024-10-05 14:51:14 +0200
committerJan Tuomi <jan@jantuomi.fi>2024-10-05 15:06:46 +0200
commit94b9400e89ba2e661a5046411080d1b44769a5a6 (patch)
treec33f2bc0005c844a0e18f71c586ea3ef3ac5eade /benches
parent9f59bf5c621d36fb956ea8a8602b0c37ceaadfe6 (diff)
Fix a bug in read_exact
Diffstat (limited to 'benches')
-rw-r--r--benches/benchmark.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/benches/benchmark.rs b/benches/benchmark.rs
index 0328ac5..b9ecbb3 100644
--- a/benches/benchmark.rs
+++ b/benches/benchmark.rs
@@ -34,8 +34,8 @@ pub fn upsert_benchmark(c: &mut Criterion) {
prefill_db_with_n_records(&mut db, size).expect("Failed to prefill DB");
group.bench_with_input(BenchmarkId::from_parameter(size), &size, |b, &_size| {
- let record = random_record();
b.iter(|| {
+ let record = random_record();
let _ = db.upsert(black_box(&record));
});
});
@@ -64,8 +64,8 @@ pub fn get_benchmark(c: &mut Criterion) {
prefill_db_with_n_records(&mut db, size).expect("Failed to prefill DB");
group.bench_with_input(BenchmarkId::from_parameter(size), &size, |b, &_size| {
- let id = random_int();
b.iter(|| {
+ let id = random_int();
let _ = db.get(black_box(&RecordValue::Int(id)));
});
});