Add MAKEFLAGS=-j$(nproc) to test and build-layer jobs#2274
Add MAKEFLAGS=-j$(nproc) to test and build-layer jobs#2274yoshi-taka wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
Parallelizes make targets across Go modules in collector, reducing CI wall time by up to 2-3x on multi-core runners.
wpessers
left a comment
There was a problem hiding this comment.
Thanks for taking the time to open a PR. Although I'm not sure we're solving an actual problem here? The test job even takes twice as long on your PR versus the average case (5m29s vs ~2m50s). And from what I read the MAKEFLAGS: -j$(nproc) would mostly be useful when your Make invocation runs multiple independent targets. That's not the case here since for-all-target (used for gotidy and gotest targets in our makefile) will recursively invoke make for each go module, sequentially. So there's nothing meaningful to parallelize here.
|
Thanks for taking the time to review. I think your point is fair. I rechecked the Makefile structure, and I’ll close this PR for now. Thanks again for your time and the helpful feedback. |
Parallelizes make targets across Go modules in collector, reducing CI wall time by up to 2-3x on multi-core runners.
This PR speeds up the collector CI test job by enabling parallel
makeexecution.The collector test workflow currently runs
make gotidyandmake gotestserially through the default Make behavior. SettingMAKEFLAGS: -j$(nproc)lets Make use the available runner CPU cores where the Makefile has independent work to execute.