#[derive(Debug, Clone)]
pub struct IoThreadConfig {
pub direct_write_timeout: std::time::Duration,
pub hot_segment_seal_threshold: usize,
pub hot_segment_seal_bytes: usize,
pub write_queue_capacity: usize,
pub wal_group_commit_interval: std::time::Duration,
}
impl Default for IoThreadConfig {
fn default() -> Self {
Self {
direct_write_timeout: std::time::Duration::from_millis(2),
hot_segment_seal_threshold: 65_536,
hot_segment_seal_bytes: 8 * 1024 * 1024,
write_queue_capacity: 4096,
wal_group_commit_interval: std::time::Duration::from_millis(1),
}
}
}
#[derive(Debug, Clone, Default)]
pub struct IoStats {
pub queue_depth: usize,
pub direct_writes: u64,
pub staging_wal_frames: usize,
pub fast_path_seal_success: u64,
pub fast_path_seal_timeout: u64,
pub fast_path_wal_fallback: u64,
}