Skip to content

Commit 7dd42e2

Browse files
Apply suggested fix to benches/workloads.rs from Copilot Autofix (#124)
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent c37861b commit 7dd42e2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

benches/workloads.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ const CAPACITY: usize = 4096;
4646
const UNIVERSE: u64 = 16_384;
4747
const OPS: usize = 200_000;
4848
const SEED: u64 = 42;
49+
/// Read-through probability used by the operation model (1.0 = always read-through).
50+
const READ_THROUGH_RATIO: f64 = 1.0;
4951

5052
fn make_generator(workload: Workload) -> WorkloadGenerator {
5153
WorkloadSpec {
@@ -90,7 +92,7 @@ fn bench_hit_rates(c: &mut Criterion) {
9092
for _ in 0..iters {
9193
let mut cache = make_cache(CAPACITY);
9294
let mut generator = make_generator(wl);
93-
let mut op_model = ReadThrough::new(1.0, SEED);
95+
let mut op_model = ReadThrough::new(READ_THROUGH_RATIO, SEED);
9496
let start = Instant::now();
9597
let _ = run_operations(
9698
&mut cache,

0 commit comments

Comments
 (0)