fixed dangerous states to be applied
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
use serde::{Serialize, Deserialize};
|
||||
use std::collections::HashMap;
|
||||
use std::path::PathBuf;
|
||||
use tracing::warn;
|
||||
|
||||
pub mod formatters;
|
||||
|
||||
@@ -180,6 +181,18 @@ impl OptimizerEngine {
|
||||
}
|
||||
}
|
||||
|
||||
let best_pl = if max_score > f32::MIN {
|
||||
best_pl
|
||||
} else {
|
||||
profile.points.last().map(|p| p.power_w).unwrap_or(15.0)
|
||||
};
|
||||
|
||||
// Safety Floor: Never recommend a TDP below 5W, as this bricks system performance.
|
||||
if best_pl < 5.0 {
|
||||
warn!("Heuristic suggested dangerously low PL1 ({:.1}W). Falling back to 15W safety floor.", best_pl);
|
||||
return 15.0;
|
||||
}
|
||||
|
||||
best_pl
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user