From 583d43794087cdaa81f08e55de07dc73020054cf Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 5 Jan 2020 00:19:34 +0100 Subject: [PATCH] cpu().speed AMD base frequency and fix (0.00) --- CHANGELOG.md | 1 + docs/history.html | 5 +++ docs/index.html | 2 +- lib/cpu.js | 110 +++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 116 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 562b2c0..0af3650 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 4.17.2 | 2020-01-05 | `cpu().speed` AMD base frequency and fix (0.00) | | 4.17.1 | 2020-01-04 | `fsSize()` alpine linux support | | 4.17.0 | 2020-01-04 | `networkInterfaces()` added dhcp, dnsSuffix, ieee8021xAuth, ieee8021xState | | 4.16.1 | 2020-01-02 | `networkInterfaces()` bug fix (osx) | diff --git a/docs/history.html b/docs/history.html index 6df3615..cd2621b 100644 --- a/docs/history.html +++ b/docs/history.html @@ -83,6 +83,11 @@ + + 4.17.2 + 2020-01-05 + cpu().speed AMD base frequency and fix (0.00) + 4.17.1 2020-01-04 diff --git a/docs/index.html b/docs/index.html index a135aa2..ece2dd4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -168,7 +168,7 @@
systeminformation
-
Current Version: 4.17.1
+
Current Version: 4.17.2
diff --git a/lib/cpu.js b/lib/cpu.js index 7ada024..6a02400 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -55,6 +55,114 @@ let _cpus = []; let _corecount = 0; const AMDBaseFrequencies = { + '8346': '1.8', + '8347': '1.9', + '8350': '2.0', + '8354': '2.2', + '8356|SE': '2.4', + '8356': '2.3', + '8360': '2.5', + '2372': '2.1', + '2373': '2.1', + '2374': '2.2', + '2376': '2.3', + '2376': '2.3', + '2377': '2.3', + '2378': '2.4', + '2379': '2.4', + '2380': '2.5', + '2381': '2.5', + '2382': '2.6', + '2384': '2.7', + '2386': '2.8', + '2387': '2.8', + '2389': '2.9', + '2393': '3.1', + '8374': '2.2', + '8376': '2.3', + '8378': '2.4', + '8379': '2.4', + '8380': '2.5', + '8381': '2.5', + '8382': '2.6', + '8384': '2.7', + '8386': '2.8', + '8387': '2.8', + '8389': '2.9', + '8393': '3.1', + '2419EE': '1.8', + '2423HE': '2.0', + '2425HE': '2.1', + '2427': '2.2', + '2431': '2.4', + '2435': '2.6', + '2439SE': '2.8', + '8425HE': '2.1', + '8431': '2.4', + '8435': '2.6', + '8439SE': '2.8', + '4122': '2.2', + '4130': '2.6', + '4162EE': '1.7', + '4164EE': '1.8', + '4170HE': '2.1', + '4174HE': '2.3', + '4176HE': '2.4', + '4180': '2.6', + '4184': '2.8', + '6124HE': '1.8', + '6128HE': '2.0', + '6132HE': '2.2', + '6128': '2.0', + '6134': '2.3', + '6136': '2.4', + '6140': '2.6', + '6164HE': '1.7', + '6166HE': '1.8', + '6168': '1.9', + '6172': '2.1', + '6174': '2.2', + '6176': '2.3', + '6176SE': '2.3', + '6180SE': '2.5', + '3250': '2.5', + '3260': '2.7', + '3280': '2.4', + '4226': '2.7', + '4228': '2.8', + '4230': '2.9', + '4234': '3.1', + '4238': '3.3', + '4240': '3.4', + '4256': '1.6', + '4274': '2.5', + '4276': '2.6', + '4280': '2.8', + '4284': '3.0', + '6204': '3.3', + '6212': '2.6', + '6220': '3.0', + '6234': '2.4', + '6238': '2.6', + '6262HE': '1.6', + '6272': '2.1', + '6274': '2.2', + '6276': '2.3', + '6278': '2.4', + '6282SE': '2.6', + '6284SE': '2.7', + '6308': '3.5', + '6320': '2.8', + '6328': '3.2', + '6338P': '2.3', + '6344': '2.6', + '6348': '2.8', + '6366': '1.8', + '6370P': '2.0', + '6376': '2.3', + '6378': '2.4', + '6380': '2.5', + '6386': '2.8', 'FX|4100': '3.6', 'FX|4120': '3.9', 'FX|4130': '3.8', @@ -496,7 +604,7 @@ function getCpu() { if (!result.speed && result.brand.indexOf('AMD') > -1) { result.speed = getAMDSpeed(result.brand); } - if (!result.speed) { + if (result.speed === '0.00') { result.speed = result.speedmax; }