Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion benches/workloads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down
Loading