Skip to content

Commit

Permalink
updated docs, code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhildebrandt committed Jan 20, 2024
1 parent 7a76687 commit 9ffc74a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/index.html
Expand Up @@ -189,9 +189,9 @@
<div class="subtitle">Node.js system information package. Lightweight collection of 50+ functions to retrieve detailed hardware, system and OS information. For Linux, macOS, partial Windows, FreeBSD, OpenBSD, NetBSD, SunOS and Android support. Dependency free.</div>
<div class="subtitle bold">#1 NPM ranking for backend packages</div>
<div class="npmicons">
<a href="https://npmjs.org/package/systeminformation" rel="nofollow"><img src="https://camo.githubusercontent.com/df25636cbefadf18ca1532e3bdcd0d2794235e19/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f73797374656d696e666f726d6174696f6e2e7376673f7374796c653d666c61742d737175617265" alt="NPM Version" data-canonical-src="https://img.shields.io/npm/v/systeminformation.svg?style=flat-square" style="max-width:100%;"></a>
<a href="https://npmjs.org/package/systeminformation" rel="nofollow"><img src="https://img.shields.io/npm/v/systeminformation.svg?style=flat-square" alt="NPM Version" data-canonical-src="https://img.shields.io/npm/v/systeminformation.svg?style=flat-square" style="max-width:100%;"></a>
<a href="https://systeminformation.io" rel="nofollow"><img src="assets/no-dependencies.svg" alt="no dependencies"></a>
<a href="https://github.com/sebhildebrandt/systeminformation/blob/master/LICENSE"><img src="https://camo.githubusercontent.com/4b5966a2a252ee0f241a1e03b13417178eb4964f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265" alt="MIT license" data-canonical-src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" style="max-width:100%;"></a>
<a href="https://github.com/sebhildebrandt/systeminformation/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT license" data-canonical-src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" style="max-width:100%;"></a>
</div>
<div class="text larger"><span class="warning">Security issues:</span> Please have a look at our <a href="../security.html">security advisories</a>.</div>

Expand All @@ -212,7 +212,7 @@
<div class="title">Downloads last month</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">668</div>
<div class="numbers">676</div>
<div class="title">Dependents</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/v4/index.html
Expand Up @@ -187,9 +187,9 @@
<div class="title">Overview</div>
<div class="subtitle">Lightweight collection of 40+ functions to retrieve detailed hardware, system and OS information. For Linux, macOS, partial Windows, FreeBSD, OpenBSD, NetBSD, SunOS and Android support</div>
<div class="npmicons">
<a href="https://npmjs.org/package/systeminformation" rel="nofollow"><img src="https://camo.githubusercontent.com/df25636cbefadf18ca1532e3bdcd0d2794235e19/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f73797374656d696e666f726d6174696f6e2e7376673f7374796c653d666c61742d737175617265" alt="NPM Version" data-canonical-src="https://img.shields.io/npm/v/systeminformation.svg?style=flat-square" style="max-width:100%;"></a>
<a href="https://npmjs.org/package/systeminformation" rel="nofollow"><img src="https://img.shields.io/badge/npm-4.34.23-36a.svg?style=flat-square" alt="NPM Version" data-canonical-src="https://img.shields.io/npm/v/systeminformation.svg?style=flat-square" style="max-width:100%;"></a>
<a href="https://systeminformation.io" rel="nofollow"><img src="../assets/no-dependencies.svg" alt="no dependencies"></a>
<a href="https://github.com/sebhildebrandt/systeminformation/blob/master/LICENSE"><img src="https://camo.githubusercontent.com/4b5966a2a252ee0f241a1e03b13417178eb4964f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265" alt="MIT license" data-canonical-src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" style="max-width:100%;"></a>
<a href="https://github.com/sebhildebrandt/systeminformation/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT license" data-canonical-src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" style="max-width:100%;"></a>
</div>
<div class="text"><span class="bold">Version 4 maintenance</span>: We are still maintaining version 4 and providing especially fixes to security issues and other important fixes. New functionality is only added to the new version 5, so please consider upgrading to version 5 soon. <span class="bold">Version 5 is NOT fully backward compatible to version 4!</span> Be aware, there are some breaking changes. Please refer to the <a href="../changes.html">Version 5 - Changes</a> page to see a full documentation of all changes you should have a look on.</div>
<div class="text larger"><span class="bold">Version 5 documentation</span> can be found <a href="../index.html">here</a>.</div>
Expand Down
4 changes: 2 additions & 2 deletions lib/cpu.js
Expand Up @@ -766,8 +766,8 @@ function getCpu() {

const threadsPerCore = util.getValue(lines, 'thread(s) per core') || '1';
const processors = util.getValue(lines, 'socket(s)') || '1';
let threadsPerCoreInt = parseInt(threadsPerCore, 10); // threads per code (normally only for performance cores)
let processorsInt = parseInt(processors, 10) || 1; // number of sockets / processor units in machine (normally 1)
const threadsPerCoreInt = parseInt(threadsPerCore, 10); // threads per code (normally only for performance cores)
const processorsInt = parseInt(processors, 10) || 1; // number of sockets / processor units in machine (normally 1)
const coresPerSocket = parseInt(util.getValue(lines, 'core(s) per socket'), 10); // number of cores (e.g. 16 on i12900)
result.physicalCores = coresPerSocket ? coresPerSocket * processorsInt : result.cores / threadsPerCoreInt;
result.performanceCores = threadsPerCoreInt > 1 ? result.cores - result.physicalCores : result.cores;
Expand Down

0 comments on commit 9ffc74a

Please sign in to comment.