Skip to main content

rvm_types/
config.rs

1//! Global RVM configuration constants and defaults.
2
3use crate::CoherenceScore;
4
5/// Top-level RVM configuration.
6#[derive(Debug, Clone, Copy)]
7pub struct RvmConfig {
8    /// Maximum partitions (DC-12).
9    pub max_partitions: u16,
10    /// Default coherence threshold.
11    pub coherence_threshold: CoherenceScore,
12    /// Witness ring buffer capacity in records.
13    pub witness_ring_capacity: usize,
14    /// Scheduler epoch interval in nanoseconds.
15    pub epoch_interval_ns: u64,
16}
17
18impl Default for RvmConfig {
19    fn default() -> Self {
20        Self {
21            max_partitions: 256,
22            coherence_threshold: CoherenceScore::DEFAULT_THRESHOLD,
23            witness_ring_capacity: 262_144,
24            epoch_interval_ns: 10_000_000, // 10 ms
25        }
26    }
27}