sysstat: show cpu-cores at false by default

This commit is contained in:
Lemmy
2026-03-03 19:26:34 -05:00
parent 3bc4b0fc48
commit 259aa1b93d
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -156,7 +156,7 @@
"useMonospaceFont": true,
"usePadding": false,
"showCpuUsage": true,
"showCpuCores": true,
"showCpuCores": false,
"showCpuFreq": false,
"showCpuTemp": true,
"showGpuTemp": false,
+3 -1
View File
@@ -1161,15 +1161,17 @@ Singleton {
root.coresUsage = new Array(nbCores).fill(0);
let coresStats = [];
let newCoresUsage = root.coresUsage.slice();
for (let i = 0; i < nbCores; i++) {
const coreCpuLine = lines[i + 1];
const currCoreStats = calculateLineUsage(coreCpuLine);
const coreUsage = computeUsage(root.prevCpuCoresStats?.[i], currCoreStats);
if (coreUsage >= 0) {
root.coresUsage[i] = coreUsage;
newCoresUsage[i] = coreUsage;
}
coresStats.push(currCoreStats);
}
root.coresUsage = newCoresUsage;
root.prevCpuCoresStats = coresStats;
}