From 55b1ff52e0b86983ed5d654e02c5cb8d55de0be4 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 12 Jul 2022 06:36:29 +0200 Subject: [PATCH] cpu() fix physical cores parsing --- CHANGELOG.md | 3 ++- docs/history.html | 5 +++++ docs/index.html | 4 ++-- lib/cpu.js | 2 ++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29922d5..43e2e50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,7 +80,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | -| 5.11.25 | 2022-07-11 | `fsSize()` fix iussue filtering (linux) | +| 5.11.26 | 2022-07-12 | `cpu()` fix iussue parsing physical cores (linux) | +| 5.11.25 | 2022-07-11 | `fsSize()` fix issue filtering (linux) | | 5.11.24 | 2022-07-10 | `fsSize()` fix parsing linux (df) | | 5.11.23 | 2022-07-09 | `fsSize()` fixes (linux), `baseboard()` fix (windows), `cpuTemperatur()` fix linux | | 5.11.22 | 2022-06-24 | `processes()` improved parsing (linux, mac OS) | diff --git a/docs/history.html b/docs/history.html index 44b51b3..5b8970c 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.11.26 + 2022-07-12 + cpu() fix issue parsing physical cores (linux) + 5.11.25 2022-07-11 diff --git a/docs/index.html b/docs/index.html index 0ef9104..20e3ee7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.11.25
+
New Version: 5.11.26
@@ -206,7 +206,7 @@
-
15,312
+
15,315
Lines of code
diff --git a/lib/cpu.js b/lib/cpu.js index 09c501a..1f817c4 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -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') {