fix: add missing tier field to all AppMetadata, fix build errors
- Add tier: "" to all AppMetadata match arms (was missing from 30+ arms) - Use std::thread::available_parallelism() instead of num_cpus crate - Remove unused num_cpus dependency - Fix unused variable warning in health_monitor.rs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -344,7 +344,9 @@ impl MetricsStore {
|
||||
}
|
||||
AlertRuleKind::CpuLoad => {
|
||||
// Alert if 5-min load average exceeds threshold * core count
|
||||
let cores = num_cpus::get() as f64;
|
||||
let cores = std::thread::available_parallelism()
|
||||
.map(|n| n.get() as f64)
|
||||
.unwrap_or(4.0);
|
||||
let max_load = rule.threshold * cores;
|
||||
if snapshot.system.load_avg_5 > max_load {
|
||||
new_alerts.push(FiredAlert {
|
||||
|
||||
Reference in New Issue
Block a user