updated docs, code cleanup

This commit is contained in:
Sebastian Hildebrandt
2024-01-20 15:59:08 +01:00
parent 7a76687cc1
commit 9ffc74a0b2
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -766,8 +766,8 @@ function getCpu() {
const threadsPerCore = util.getValue(lines, 'thread(s) per core') || '1';
const processors = util.getValue(lines, 'socket(s)') || '1';
let threadsPerCoreInt = parseInt(threadsPerCore, 10); // threads per code (normally only for performance cores)
let processorsInt = parseInt(processors, 10) || 1; // number of sockets / processor units in machine (normally 1)
const threadsPerCoreInt = parseInt(threadsPerCore, 10); // threads per code (normally only for performance cores)
const processorsInt = parseInt(processors, 10) || 1; // number of sockets / processor units in machine (normally 1)
const coresPerSocket = parseInt(util.getValue(lines, 'core(s) per socket'), 10); // number of cores (e.g. 16 on i12900)
result.physicalCores = coresPerSocket ? coresPerSocket * processorsInt : result.cores / threadsPerCoreInt;
result.performanceCores = threadsPerCoreInt > 1 ? result.cores - result.physicalCores : result.cores;