File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 61
61
updateInterval = 1000
62
62
)
63
63
64
+ var dataRegex = regexp .MustCompile (`(?m)^\s*(\S.*?)\s+(\d+)\s+(\d+\.\d+)\s+\d+\.\d+\s+` )
65
+
64
66
func setupUI () {
65
67
appleSiliconModel := getSOCInfo ()
66
68
modelText = w .NewParagraph ()
@@ -525,7 +527,6 @@ func updateProcessUI(processMetrics []ProcessMetrics) {
525
527
526
528
func parseProcessMetrics (powermetricsOutput string , processMetrics []ProcessMetrics ) []ProcessMetrics {
527
529
lines := strings .Split (powermetricsOutput , "\n " )
528
- dataRegex := regexp .MustCompile (`(?m)^\s*(\S.*?)\s+(\d+)\s+(\d+\.\d+)\s+\d+\.\d+\s+` )
529
530
seen := make (map [int ]bool ) // Map to track seen process IDs
530
531
for _ , line := range lines {
531
532
matches := dataRegex .FindStringSubmatch (line )
You can’t perform that action at this time.
0 commit comments