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:
Dorian
2026-03-14 03:36:44 +00:00
parent 19d2143f55
commit 176336b555
4 changed files with 40 additions and 4 deletions

View File

@@ -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 {