docs: state both worker defaults with their lower clamp (#2336)
Copilot review round 2: both expressions omitted Vitest's `max(…, 1)`, so as written they described zero workers on a one-core runner. Now `max(availableParallelism() - 1, 1)` for the forks pool and `max(min(12, availableParallelism() - 1), 1)` for the browser pool, and the browser pool's single-worker condition names all three of its terms (headless, file parallelism, provider support). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PsmUAZ6aLUAFqenjJKSSRp Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
1c243377be
commit
99d6b193d9
1 changed files with 9 additions and 8 deletions
|
|
@ -83,12 +83,13 @@ export const INTEGRATION_TIMEOUTS = Object.freeze({
|
|||
*
|
||||
* The five forks-pool projects — web `unit` and `integration`, `cli`, `tui`,
|
||||
* `launcher` — therefore inherit Vitest's non-watch default,
|
||||
* `availableParallelism() - 1`: 7 on the eight-logical-core M3 this team
|
||||
* works on. Web's `storybook` project is the exception: it runs the browser
|
||||
* pool, whose default is a different expression,
|
||||
* `min(12, availableParallelism() - 1)` — also 7 here, but capped on larger
|
||||
* machines because the main thread chokes past ~12 browser workers
|
||||
* (vitest#7871) — and 1 unless the run is headless with file parallelism. A
|
||||
* `max(availableParallelism() - 1, 1)`: 7 on the eight-logical-core M3 this
|
||||
* team works on. Web's `storybook` project is the exception: it runs the
|
||||
* browser pool, whose default is a different expression,
|
||||
* `max(min(12, availableParallelism() - 1), 1)` — also 7 here, but capped on
|
||||
* larger machines because the main thread chokes past ~12 browser workers
|
||||
* (vitest#7871) — and a single worker unless the run is headless, file
|
||||
* parallelism is on, and the provider supports it. A
|
||||
* `maxWorkers` set on that project *would* apply to it (`getThreadsCount`
|
||||
* reads it before falling back), so it is not exempt from this decision;
|
||||
* but nothing below measured it. The numbers are the forks pool's, and a cap
|
||||
|
|
|
|||
Loading…
Reference in a new issue