updated docs, code cleanup
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user