test-parallelism

command
v0.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command test-parallelism prints the -p `make preflight` gives its test and race stages, so one run cannot saturate a machine other sessions share (iss-2610102020442624): twice the online cores less the one-minute load, never more than the cores divided among the preflights the first gate admits at once (load.preflights in ~/.abcd.noindex/config.json, or ABCD_LOAD_PREFLIGHTS; one by default) and never fewer than a quarter of them (implement.PreflightParallelism, machineload.GoTestParallelism). Each stage runs it as it starts, so the number reflects the load at that moment. On a CI runner, or where the machine cannot be read, it prints go's own default, GOMAXPROCS.

Given -timeout and a stage's base package budget, it prints that budget instead, or twice it when the one-minute load passes one runnable per online core, so a package slowed by the load is not killed with no test hung (iss-2610241911052191, implement.PreflightTimeout, machineload.GoTestTimeout). On a CI runner, or where the machine cannot be read, it prints the base.

Usage: go test -p "$(go run ./cmd/test-parallelism)" ./...

go test -timeout "$(go run ./cmd/test-parallelism -timeout 40m)" ./...

It is developer tooling, never part of a release: it prints one value and a newline, reads the machine once, writes nothing and exits 0. A slot setting it cannot use is named on stderr and read as one; the load gate before the stage refuses that setting first. A machine config.json it cannot read is read as one without a word: the load gate before the stage names it. An argument it does not know, or a base that is not a positive duration, is a recipe mistake: it prints nothing on standard output and exits 2, so the stage fails there.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL