-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools/check: increase the parallelism for building test binaries #48985
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #48985 +/- ##
================================================
+ Coverage 70.9767% 72.4537% +1.4770%
================================================
Files 1368 1391 +23
Lines 404407 412082 +7675
================================================
+ Hits 287035 298569 +11534
+ Misses 97376 94672 -2704
+ Partials 19996 18841 -1155
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -448,6 +450,8 @@ func main() { | |||
|
|||
// Get the correct count of CPU if it's in docker. | |||
p = runtime.GOMAXPROCS(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work correctly in container environments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I'm not sure, but as the old code it should be fine.
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Defined2014, hawkingrei, tiancaiamao The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: ref #31880
Problem Summary:
What changed and how does it work?
Increase the parallelism when building the test binaries, by default it is the number of cores(https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies):
I found that when running the 'building binaries stage' of
make ut
, the CPU usage is not high with the default value. So I think it's a better idea to increase the parallelism. In this PR, I doubled it.The result of
make ut
time in my Macbook M2 Pro:(Before this PR)
(After this PR)
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.