feat(storage): 新增只读 SMART 辅助服务与寿命通电详情

This commit is contained in:
2026-10-30 16:02:46 +08:00
parent 069e2e100f
commit 7e9728899d
25 changed files with 515 additions and 15 deletions
+2
View File
@@ -4,6 +4,7 @@ import Darwin
/// Serial ownership keeps CPU baselines coherent and system calls off MainActor.
actor SystemSampler {
private var cpu = CPUMonitor()
private let diskHealth = DiskHealthMonitor()
private let batteryHealth = SystemBatteryHealthMonitor()
private var network = NetworkMonitor()
@@ -21,6 +22,7 @@ actor SystemSampler {
result.network = network.sample()
result.networkPath = networkPath.snapshot()
result.disk = DiskMonitor.sample()
result.diskHealth = await diskHealth.sample()
result.diskIO = diskIO.sample()
let now = ProcessInfo.processInfo.systemUptime
if volumeSampleTime == nil || now - (volumeSampleTime ?? 0) >= 30 {