1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Shared benchmark helpers for `kv_ops` (quick) and `kv_ops_full` (full).
//!
//! Compiled independently into each bench binary, so helpers used by only one
//! target are "dead" in the other — hence the crate-level allow below.
use Rapira;
/// Small typed record used by `TypedTree` / `TypedMap` benchmarks.
// ---- shared dataset constants -------------------------------------------
/// Quick target: preload size for read-oriented profiles.
pub const QUICK_NUM_ENTRIES: u64 = 50_000;
/// Quick target: puts per measured write iteration.
pub const QUICK_WRITE_BATCH: u64 = 10_000;
/// Full target: preload size for the regular full matrix.
pub const FULL_NUM_ENTRIES: u64 = 250_000;
/// Full target: puts per measured write iteration.
pub const FULL_WRITE_BATCH: u64 = 20_000;
/// Reads per measured read iteration (both targets).
pub const READ_BATCH: u64 = 1_000;
/// Hot working-set size (keys `0..HOT_RANGE`). Sized so Var values fit in the
/// bounded block cache: HOT_RANGE * VAR_VALUE_LEN < FULL_CACHE_BYTES.
pub const HOT_RANGE: u64 = 8_000;
/// scan: number of key groups and entries per group.
pub const NUM_GROUPS: u32 = 500;
pub const SCAN_TAKE: usize = 100;