feat(menubar): 拆分紧凑双页面板并按页采样
This commit is contained in:
@@ -27,7 +27,7 @@ nonisolated enum ProcessTableProjection {
|
||||
|
||||
/// Missing metrics stay last in either direction. Every newly selected column starts descending.
|
||||
nonisolated struct ProcessSort: SortComparator, Equatable {
|
||||
enum Key { case pid, name, path, cpu, memory, threads }
|
||||
enum Key { case pid, name, path, cpu, memory, threads, power }
|
||||
let key: Key
|
||||
var order: SortOrder = .reverse
|
||||
|
||||
@@ -46,6 +46,7 @@ nonisolated struct ProcessSort: SortComparator, Equatable {
|
||||
case .path: return directed((lhs.path ?? "").localizedStandardCompare(rhs.path ?? ""))
|
||||
case .cpu: return metric(lhs.cpu, rhs.cpu)
|
||||
case .memory: return metric(lhs.footprintBytes.map { Double($0) }, rhs.footprintBytes.map { Double($0) })
|
||||
case .power: return metric(lhs.cpuPower, rhs.cpuPower)
|
||||
case .threads: return metric(lhs.threads.map { Double($0) }, rhs.threads.map { Double($0) })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user