hexo/node_modules/cpu-features
浪子 c052fb48bc 123 2023-09-30 15:31:08 +08:00
..
.github/workflows 123 2023-09-30 15:31:08 +08:00
build 123 2023-09-30 15:31:08 +08:00
deps/cpu_features 123 2023-09-30 15:31:08 +08:00
lib 123 2023-09-30 15:31:08 +08:00
src 123 2023-09-30 15:31:08 +08:00
test 123 2023-09-30 15:31:08 +08:00
.eslintrc.js 123 2023-09-30 15:31:08 +08:00
LICENSE 123 2023-09-30 15:31:08 +08:00
README.md 123 2023-09-30 15:31:08 +08:00
binding.gyp 123 2023-09-30 15:31:08 +08:00
buildcheck.gypi 123 2023-09-30 15:31:08 +08:00
buildcheck.js 123 2023-09-30 15:31:08 +08:00
package.json 123 2023-09-30 15:31:08 +08:00

README.md

Description

A simple node.js binding to cpu_features for obtaining information about installed CPU(s).

Requirements

Install

npm install cpu-features

Example

  // Generally it's a good idea to just call this once and
  // reuse the result since `cpu-features` does not cache
  // the result itself.
  const features = require('cpu-features')();

  console.log(features);
  // example output:
  // { arch: 'x86',
  //   brand: 'Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz',
  //   family: 6,
  //   model: 58,
  //   stepping: 9,
  //   uarch: 'INTEL_IVB',
  //   flags:
  //    { fpu: true,
  //      tsc: true,
  //      cx8: true,
  //      clfsh: true,
  //      mmx: true,
  //      aes: true,
  //      erms: true,
  //      f16c: true,
  //      sse: true,
  //      sse2: true,
  //      sse3: true,
  //      ssse3: true,
  //      sse4_1: true,
  //      sse4_2: true,
  //      avx: true,
  //      pclmulqdq: true,
  //      cx16: true,
  //      popcnt: true,
  //      rdrnd: true,
  //      ss: true } }