implemented i8kmon formatter
This commit is contained in:
@@ -182,7 +182,7 @@ impl BenchmarkOrchestrator {
|
||||
|
||||
// Phase 5: Finalizing
|
||||
self.phase = BenchmarkPhase::Finalizing;
|
||||
self.log("Benchmark sequence complete. Generating configuration...")?;
|
||||
self.log("Benchmark sequence complete. Generating configurations...")?;
|
||||
|
||||
let config = crate::engine::formatters::throttled::ThrottledConfig {
|
||||
pl1_limit: res.silicon_knee_watts,
|
||||
@@ -190,9 +190,25 @@ impl BenchmarkOrchestrator {
|
||||
trip_temp: res.max_temp_c.max(95.0),
|
||||
};
|
||||
|
||||
let conf_content = crate::engine::formatters::throttled::ThrottledTranslator::generate_conf(&config);
|
||||
std::fs::write("throttled.conf", conf_content)?;
|
||||
self.log("✓ Saved 'throttled.conf'.")?;
|
||||
// 1. Throttled (Merged if exists)
|
||||
let throttled_path = "throttled.conf";
|
||||
let existing_throttled = std::fs::read_to_string(throttled_path).unwrap_or_default();
|
||||
let throttled_content = if existing_throttled.is_empty() {
|
||||
crate::engine::formatters::throttled::ThrottledTranslator::generate_conf(&config)
|
||||
} else {
|
||||
crate::engine::formatters::throttled::ThrottledTranslator::merge_conf(&existing_throttled, &config)
|
||||
};
|
||||
std::fs::write(throttled_path, throttled_content)?;
|
||||
self.log("✓ Saved 'throttled.conf' (merged).")?;
|
||||
|
||||
// 2. i8kmon
|
||||
let i8k_config = crate::engine::formatters::i8kmon::I8kmonConfig {
|
||||
t_ambient: self.profile.ambient_temp,
|
||||
t_max_fan: res.max_temp_c - 5.0, // Aim to hit max fan before max temp
|
||||
};
|
||||
let i8k_content = crate::engine::formatters::i8kmon::I8kmonTranslator::generate_conf(&i8k_config);
|
||||
std::fs::write("i8kmon.conf", i8k_content)?;
|
||||
self.log("✓ Saved 'i8kmon.conf'.")?;
|
||||
|
||||
self.guard.restore()?;
|
||||
self.log("✓ Environment restored.")?;
|
||||
|
||||
Reference in New Issue
Block a user