scribe_scaling/
adaptive.rs

1//! Adaptive configuration system that adjusts thresholds based on repository characteristics.
2
3use serde::{Deserialize, Serialize};
4
5/// Configuration for adaptive behavior
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct AdaptiveConfig {
8    /// Whether to enable adaptive thresholds
9    pub enable_adaptive_thresholds: bool,
10
11    /// Factor for repository size adjustment
12    pub repository_size_factor: f64,
13
14    /// Factor for memory pressure adjustment
15    pub memory_pressure_factor: f64,
16
17    /// Factor for CPU utilization adjustment
18    pub cpu_utilization_factor: f64,
19
20    /// Weight for performance feedback
21    pub performance_feedback_weight: f64,
22}
23
24impl Default for AdaptiveConfig {
25    fn default() -> Self {
26        Self {
27            enable_adaptive_thresholds: true,
28            repository_size_factor: 1.0,
29            memory_pressure_factor: 0.8,
30            cpu_utilization_factor: 0.9,
31            performance_feedback_weight: 0.2,
32        }
33    }
34}