systeminformation 5.11.24 → 5.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -112,6 +112,7 @@ si.cpu()
112
112
 
113
113
  (last 7 major and minor version releases)
114
114
 
115
+ - Version 5.12.0: `cpu()` added performance and efficiency cores
115
116
  - Version 5.11.0: `networkInterfaces()` added default property and default parameter
116
117
  - Version 5.10.0: basic `android` support
117
118
  - Version 5.9.0: `graphics()` added properties (macOS)
@@ -207,8 +208,8 @@ Full function reference with examples can be found at [https://systeminformation
207
208
  | | governor | X | | | | | e.g. 'powersave' |
208
209
  | | cores | X | X | X | X | | # cores |
209
210
  | | physicalCores | X | X | X | X | | # physical cores |
210
- | | efficiencyCores | | | X | | | # efficiancy cores (ARM only) |
211
- | | performanceCores | | | X | | | # performance cores (ARM only) |
211
+ | | efficiencyCores | X | | X | | | # efficiancy cores |
212
+ | | performanceCores | X | | X | | | # performance cores |
212
213
  | | processors | X | X | X | X | | # processors |
213
214
  | | socket | X | X | | X | | socket type e.g. "LGA1356" |
214
215
  | | vendor | X | X | X | X | | vendor ID |
package/lib/cpu.js CHANGED
@@ -606,6 +606,8 @@ function getCpu() {
606
606
  governor: '',
607
607
  cores: util.cores(),
608
608
  physicalCores: util.cores(),
609
+ performanceCores: util.cores(),
610
+ efficiencyCores: 0,
609
611
  processors: 1,
610
612
  socket: '',
611
613
  flags: '',
@@ -713,8 +715,12 @@ function getCpu() {
713
715
  // const coresPerSocketInt = parseInt(util.getValue(lines, 'cores(s) per socket') || '1', 10);
714
716
  const processors = util.getValue(lines, 'socket(s)') || '1';
715
717
  let threadsPerCoreInt = parseInt(threadsPerCore, 10);
716
- let processorsInt = parseInt(processors, 10);
717
- result.physicalCores = result.cores / threadsPerCoreInt;
718
+ let processorsInt = parseInt(processors, 10) || 1;
719
+ const cpus = (parseInt(util.getValue(lines, 'cpu(s)'), 10) || 1);
720
+ const coresPerSocket = parseInt(util.getValue(lines, 'core(s) per socket'), 10);
721
+ result.physicalCores = coresPerSocket ? coresPerSocket * processorsInt : result.cores / threadsPerCoreInt;
722
+ result.performanceCores = threadsPerCoreInt > 1 ? result.cores - result.physicalCores : result.cores;
723
+ result.efficiencyCores = threadsPerCoreInt > 1 ? result.cores - (threadsPerCoreInt * result.performanceCores) : 0;
718
724
  result.processors = processorsInt;
719
725
  result.governor = util.getValue(lines, 'governor') || '';
720
726
 
package/lib/filesystem.js CHANGED
@@ -63,7 +63,7 @@ function fsSize(callback) {
63
63
  if (stdout.toString().toLowerCase().indexOf('filesystem')) {
64
64
  let removeLines = 0;
65
65
  for (let i = 0; i < lines.length; i++) {
66
- if (line[i] && lines[i].toLowerCase().startsWith('filesystem')) {
66
+ if (lines[i] && lines[i].toLowerCase().startsWith('filesystem')) {
67
67
  removeLines = i;
68
68
  }
69
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.11.24",
3
+ "version": "5.12.0",
4
4
  "description": "Advanced, lightweight system and OS information library",
5
5
  "license": "MIT",
6
6
  "author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",