cpu() fix physical cores parsing
This commit is contained in:
parent
55b1ff52e0
commit
ab97867cae
@ -719,8 +719,8 @@ function getCpu() {
|
|||||||
result.physicalCores = coresPerSocket ? coresPerSocket * processorsInt : result.cores / threadsPerCoreInt;
|
result.physicalCores = coresPerSocket ? coresPerSocket * processorsInt : result.cores / threadsPerCoreInt;
|
||||||
result.processors = processorsInt;
|
result.processors = processorsInt;
|
||||||
result.governor = util.getValue(lines, 'governor') || '';
|
result.governor = util.getValue(lines, 'governor') || '';
|
||||||
result.performanceCores = threadsPerCoreInt > 1 ? result.physicalCores - result.cores : result.cores;
|
result.performanceCores = threadsPerCoreInt > 1 ? result.cores - result.physicalCores : result.cores;
|
||||||
result.efficientCores = threadsPerCoreInt > 1 ? result.physicalCores - (threadsPerCoreInt * result.performanceCores) : 0;
|
result.efficientCores = threadsPerCoreInt > 1 ? result.cores - (threadsPerCoreInt * result.performanceCores) : 0;
|
||||||
|
|
||||||
// Test Raspberry
|
// Test Raspberry
|
||||||
if (result.vendor === 'ARM') {
|
if (result.vendor === 'ARM') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user