diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-23 22:18:48 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-23 22:18:48 +0200 |
| commit | 44889ef65d38b10c86f43a1298bdfb99793d2f0b (patch) | |
| tree | 1777b19e6b9af5ffc86952bb5c13d22b8d278e4b | |
| parent | c58ef78b4a79a5cbc9531a74c6e3965ea4c00bc2 (diff) | |
Use NumCPU*2 as default integration test parallelism
| -rw-r--r-- | Magefile.go | 4 | ||||
| -rw-r--r-- | integrationtests/README.md | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Magefile.go b/Magefile.go index d9ad29e..50d2bea 100644 --- a/Magefile.go +++ b/Magefile.go @@ -278,7 +278,7 @@ func IntegrationTestSerial() error { } // IntegrationTestParallel builds everything and runs integration tests in parallel. -// Set INTEGRATION_PARALLEL to tune `go test -parallel` (default: NumCPU/2, minimum 1). +// Set INTEGRATION_PARALLEL to tune `go test -parallel` (default: NumCPU*2, minimum 1). func IntegrationTestParallel() error { return runIntegrationTests(true) } @@ -323,7 +323,7 @@ func runIntegrationTests(parallel bool) error { func resolveIntegrationParallelism() (int, error) { parallel := strings.TrimSpace(os.Getenv(integrationParallel)) if parallel == "" { - n := runtime.NumCPU() / 2 + n := runtime.NumCPU() * 2 if n < 1 { n = 1 } diff --git a/integrationtests/README.md b/integrationtests/README.md index 601b782..99a3fc0 100644 --- a/integrationtests/README.md +++ b/integrationtests/README.md @@ -16,7 +16,7 @@ mage integrationTest ``` This builds everything (ior, ioworkload) and runs integration tests in parallel. -Default parallelism is half of available CPU cores (minimum `1`). +Default parallelism is `NumCPU * 2` (minimum `1`). Tests automatically skip with `t.Skip` when not running as root. |
