chore: run jest in three worker processes (closes #426)
The test and test:verbose scripts ran jest with one worker per CPU core, about 47 processes and 7-8 GiB per run on the shared 48-core build host. They now pass --maxWorkers=3. On that host the suite takes 23-29s, inside the unchanged 30-second cap in script/test but not by much: one test file, tests/persistedFieldContract.test.js, takes most of it. One or two workers went past the cap, so this departs from the issue's two-process limit. make check, the pre-commit hook and script/cibuild all reach jest through these scripts; the timings in the script/test and Dockerfile comments are updated to match. Model: opus-5-5
This commit is contained in:
+10
-7
@@ -1,13 +1,16 @@
|
||||
#!/bin/sh
|
||||
# script/test: run the test suite.
|
||||
#
|
||||
# The timeout bounds a hung suite; it is not a performance budget. On a
|
||||
# developer host the suite finishes in about 8s and REPO_POLICIES' 30s cap is
|
||||
# the bound. Inside the image the same suite also pays a cold jest cache and
|
||||
# shares the runner with the rest of the build, which is not what that budget
|
||||
# describes, so the Dockerfile raises the bound through
|
||||
# AUTISTMASK_TEST_TIMEOUT. A cap a healthy suite can trip on a cold cache
|
||||
# produces a red that means nothing, and teaches "just run it again".
|
||||
# jest runs three worker processes (package.json), not one per CPU core: on a
|
||||
# many-core shared host one per core took gigabytes of RAM per run.
|
||||
#
|
||||
# The timeout bounds a hung suite; it is not a performance budget. On the busy
|
||||
# shared build host the suite takes 23-29s with three workers, so
|
||||
# REPO_POLICIES' 30s cap is tight there, not comfortable. Inside the image the
|
||||
# same suite also pays a cold jest cache and shares the runner with the rest of
|
||||
# the build, which is not what that budget describes, so the Dockerfile raises
|
||||
# the bound through AUTISTMASK_TEST_TIMEOUT. A cap a healthy suite can trip on a
|
||||
# cold cache produces a red that means nothing, and teaches "just run it again".
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
Reference in New Issue
Block a user