Add nproc equivalent for macOS#1483
Conversation
Add hw.logicalcpu for NUM_PROCS functional parrarel run to Makefile. hw.logicalcpu is equivalent of nproc on macOS
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ciecierski The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/retest-required |
| NUM_PROCS := $(shell expr $(shell nproc --ignore 2) / 2) | ||
| endif | ||
| ifeq ($(UNAME_S),Darwin) | ||
| NUM_PROCS := $(shell expr $(shell sysctl -n hw.logicalcpu) / 2) |
There was a problem hiding this comment.
I was personally just installing coreutils from homebrew, which contains nproc:
❯ nproc --ignore 2
8
❯ uname -s
Darwin
Which comes from:
https://formulae.brew.sh/formula/coreutils
https://github.com/coreutils/coreutils/blob/037b93106155c5e11681837305b541808fbdb9b5/src/nproc.c
|
The bigger Mac related concern for me with this repo was that If I just checkout main right now, and run |
|
@ciecierski: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Add hw.logicalcpu for NUM_PROCS functional parrarel run to Makefile. hw.logicalcpu is equivalent of nproc on macOS