Commit 413af363 authored by Andrew Imm's avatar Andrew Imm

Log available core count on next server init

parent 5a44f652
import { loadEnvConfig } from '@next/env' import { loadEnvConfig } from '@next/env'
import * as inspector from 'inspector' import * as inspector from 'inspector'
import os from 'os'
import * as Log from '../../build/output/log' import * as Log from '../../build/output/log'
import { bold, purple, strikethrough } from '../../lib/picocolors' import { bold, purple, strikethrough } from '../../lib/picocolors'
import { import {
...@@ -98,6 +99,11 @@ export function logStartInfo({ ...@@ -98,6 +99,11 @@ export function logStartInfo({
} }
} }
// Report available cores to put execution times in perspective
// `availableCores` is preferred over `cpus().length` because it reflects any restrictions applied to containers
const availableCores = os.availableParallelism()
Log.bootstrap(`- Available Cores: ${availableCores}`)
// New line after the bootstrap info // New line after the bootstrap info
Log.info('') Log.info('')
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment