feat(memory): 重设计内存卡片并统一二进制容量单位
This commit is contained in:
@@ -14,6 +14,9 @@ nonisolated struct MemoryMetrics: Sendable {
|
||||
let compressed: UInt64
|
||||
let swapUsed: UInt64?
|
||||
let pressure: Int?
|
||||
var cached: UInt64? = nil
|
||||
var available: UInt64 { total - min(total, used) }
|
||||
var app: UInt64 { used - min(used, wired + compressed) }
|
||||
var usage: Double { total == 0 ? 0 : Double(used) / Double(total) }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user