Skip to content

Commit

Permalink
chore(gatsby-core-utils): Update README with correct cpuCoreCount args (
Browse files Browse the repository at this point in the history
  • Loading branch information
brysongilbert committed Oct 18, 2022
1 parent 7dd02a9 commit ab51cd4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/gatsby-core-utils/README.md
Expand Up @@ -30,11 +30,11 @@ Calculate the number of CPU cores on the current machine

This function can be controlled by an env variable `GATSBY_CPU_COUNT` setting the first argument to true.

| value | description |
| ------------- | ------------------------------------------------------ |
| | Counts amount of real cores by running a shell command |
| logical-cores | `require("os").cpus()` to count all virtual cores |
| any number | Sets cpu count to that specific number |
| value | description |
| --------------- | ------------------------------------------------------ |
| | Counts amount of real cores by running a shell command |
| `logical_cores` | `require("os").cpus()` to count all virtual cores |
| any number | Sets cpu count to that specific number |

```js
const { cpuCoreCount } = require("gatsby-core-utils")
Expand All @@ -45,7 +45,7 @@ const coreCount = cpuCoreCount(false)

```js
const { cpuCoreCount } = require("gatsby-core-utils")
process.env.GATSBY_CPU_COUNT = "logical-cores"
process.env.GATSBY_CPU_COUNT = "logical_cores"

const coreCount = cpuCoreCount()
// ...
Expand Down

0 comments on commit ab51cd4

Please sign in to comment.