mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-15 00:34:08 +09:00
fix: fixed top processes usage in the RAM when top returns additional + (#499)
This commit is contained in:
@@ -148,7 +148,7 @@ public class ProcessReader: Reader<[TopProcess]> {
|
||||
if line.matches("^\\d+ +.* +\\d+[A-Z]*\\+?\\-? *$") {
|
||||
var str = line.trimmingCharacters(in: .whitespaces)
|
||||
let pidString = str.findAndCrop(pattern: "^\\d+")
|
||||
let usageString = str.suffix(5)
|
||||
let usageString = str.suffix(6)
|
||||
var command = str.replacingOccurrences(of: pidString, with: "")
|
||||
command = command.replacingOccurrences(of: usageString, with: "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user