From 587b814660f741ce08707ba6fb8ca02abe49fcf3 Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Tue, 28 Apr 2026 19:22:35 +0100 Subject: [PATCH] Apply suggested fix to benches/workloads.rs from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- benches/workloads.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/benches/workloads.rs b/benches/workloads.rs index 1b2f99f..faae7da 100644 --- a/benches/workloads.rs +++ b/benches/workloads.rs @@ -46,6 +46,8 @@ const CAPACITY: usize = 4096; const UNIVERSE: u64 = 16_384; const OPS: usize = 200_000; const SEED: u64 = 42; +/// Read-through probability used by the operation model (1.0 = always read-through). +const READ_THROUGH_RATIO: f64 = 1.0; fn make_generator(workload: Workload) -> WorkloadGenerator { WorkloadSpec { @@ -90,7 +92,7 @@ fn bench_hit_rates(c: &mut Criterion) { for _ in 0..iters { let mut cache = make_cache(CAPACITY); let mut generator = make_generator(wl); - let mut op_model = ReadThrough::new(1.0, SEED); + let mut op_model = ReadThrough::new(READ_THROUGH_RATIO, SEED); let start = Instant::now(); let _ = run_operations( &mut cache,