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 6161 updateInterval = 1000
6262)
6363
64+ var dataRegex = regexp .MustCompile (`(?m)^\s*(\S.*?)\s+(\d+)\s+(\d+\.\d+)\s+\d+\.\d+\s+` )
65+
6466func setupUI () {
6567 appleSiliconModel := getSOCInfo ()
6668 modelText = w .NewParagraph ()
@@ -525,7 +527,6 @@ func updateProcessUI(processMetrics []ProcessMetrics) {
525527
526528func parseProcessMetrics (powermetricsOutput string , processMetrics []ProcessMetrics ) []ProcessMetrics {
527529 lines := strings .Split (powermetricsOutput , "\n " )
528- dataRegex := regexp .MustCompile (`(?m)^\s*(\S.*?)\s+(\d+)\s+(\d+\.\d+)\s+\d+\.\d+\s+` )
529530 seen := make (map [int ]bool ) // Map to track seen process IDs
530531 for _ , line := range lines {
531532 matches := dataRegex .FindStringSubmatch (line )
You can’t perform that action at this time.
0 commit comments