formualizer_eval/engine/
tuning.rs1#[derive(Clone, Debug)]
5pub struct WarmupConfig {
6 pub warmup_enabled: bool,
8 pub warmup_time_budget_ms: u64,
9 pub warmup_parallelism_cap: usize,
10
11 pub warmup_topk_refs: usize,
13 pub warmup_topk_criteria_sets: usize,
14
15 pub min_flat_cells: usize,
17 pub min_mask_cells: usize,
18 pub min_index_rows: usize,
19
20 pub flat_reuse_threshold: usize,
22 pub mask_reuse_threshold: usize,
23 pub index_reuse_threshold: usize,
24
25 pub flat_cache_mb_cap: usize,
27 pub mask_cache_entries_cap: usize,
28 pub index_memory_budget_mb: usize,
29}
30
31impl Default for WarmupConfig {
32 fn default() -> Self {
33 Self {
34 warmup_enabled: false,
36 warmup_time_budget_ms: 250,
37 warmup_parallelism_cap: 4,
38
39 warmup_topk_refs: 10,
41 warmup_topk_criteria_sets: 10,
42
43 min_flat_cells: 1000,
45 min_mask_cells: 1000,
46 min_index_rows: 10000,
47
48 flat_reuse_threshold: 3,
50 mask_reuse_threshold: 3,
51 index_reuse_threshold: 5,
52
53 flat_cache_mb_cap: 100,
55 mask_cache_entries_cap: 1000,
56 index_memory_budget_mb: 50,
57 }
58 }
59}
60
61impl WarmupConfig {
62 pub fn should_warmup_flats(&self) -> bool {
64 self.warmup_enabled
65 }
66
67 pub fn should_warmup_masks(&self) -> bool {
69 self.warmup_enabled
70 }
71
72 pub fn should_warmup_indexes(&self) -> bool {
74 self.warmup_enabled
75 }
76}