feat(monitors): 为无内置电池的 Mac 采样整机即时功率
加入整机功率采样、XPC 读取和历史记录,并覆盖无电池设备的采样分支。
This commit is contained in:
@@ -24,6 +24,8 @@ import Darwin
|
||||
print("FAIL: hardened sandbox to packaged XPC sensor RPC"); exit(1)
|
||||
}
|
||||
print("PASS: hardened sandbox host authenticates packaged XPC; footprint, CPU energy and sensor RPCs")
|
||||
let power = await CPUTemperatureServiceClient.readSystemPower()
|
||||
print("System-total sensor (W):", power.map(String.init(describing:)) ?? "unavailable")
|
||||
print("Sensor coverage: CPU=\(sensors.cpu != nil), GPU=\(sensors.gpu != nil), fans=\(sensors.fans?.count ?? 0)")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user