Skip to content

Commit

Permalink
feat: ✨ set default concurrency to number of cpus
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 14, 2020
1 parent 439f8cf commit a63c3d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/options.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import chalk from "chalk"
import os from "os"

export const HASH_FILE = ".ultra.cache.json"

Expand All @@ -16,7 +17,7 @@ export const defaults = {
info: false,
topology: false,
build: false,
concurrency: 10,
concurrency: Math.min(Math.max(0, os.cpus().length), 10),
debug: false,
root: false,
help: false,
Expand Down Expand Up @@ -58,7 +59,7 @@ export const RunnerOptionDefs: Record<keyof RunnerOptions, RunnerOptionDef> = {
},
concurrency: {
type: "number",
description: "Set the maximum number of concurrency",
description: `Set the maximum number of concurrency (defaults to number of cores ${defaults.concurrency})`,
},
serial: {
type: "boolean",
Expand Down

0 comments on commit a63c3d5

Please sign in to comment.