Skip to content

Commit dd8e010

Browse files
author
Alex Boten
authored
[chore] set GOMAXPROCS for collector subprocess (#27449)
This will result in more consistent benchmarks across different environments. Fixes #27429 Signed-off-by: Alex Boten <[email protected]>
1 parent f3851d8 commit dd8e010

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

testbed/testbed/child_process_collector.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ func (cp *childProcessCollector) Start(params StartParams) error {
204204
}
205205
// #nosec
206206
cp.cmd = exec.Command(exePath, args...)
207+
cp.cmd.Env = append(os.Environ(),
208+
"GOMAXPROCS=2",
209+
)
207210

208211
// Capture standard output and standard error.
209212
cp.cmd.Stdout = logFile

0 commit comments

Comments
 (0)