cpu() fix physical cores parsing

This commit is contained in:
Sebastian Hildebrandt
2022-07-12 06:36:29 +02:00
parent 5605b84b77
commit 55b1ff52e0
4 changed files with 11 additions and 3 deletions
+2
View File
@@ -719,6 +719,8 @@ function getCpu() {
result.physicalCores = coresPerSocket ? coresPerSocket * processorsInt : result.cores / threadsPerCoreInt;
result.processors = processorsInt;
result.governor = util.getValue(lines, 'governor') || '';
result.performanceCores = threadsPerCoreInt > 1 ? result.physicalCores - result.cores : result.cores;
result.efficientCores = threadsPerCoreInt > 1 ? result.physicalCores - (threadsPerCoreInt * result.performanceCores) : 0;
// Test Raspberry
if (result.vendor === 'ARM') {