diff options
author | Mike Frysinger <vapier@google.com> | 2022-07-20 17:15:29 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2022-07-25 15:36:43 +0000 |
commit | 355f4398d870573255574c895f808485310b5c10 (patch) | |
tree | dcdf96fd22bed67ac5fdf57644d7ad6e7b2a4865 /project.py | |
parent | bddc964d9340c66066590a81d21934362fb0c490 (diff) | |
download | git-repo-355f4398d870573255574c895f808485310b5c10.tar.gz |
sync: rework --jobs to provide better defaults
For --jobs-network, the logic is now:
* If the user specifies --jobs-network, use that.
* Else, if the user specifies --jobs, use that.
* Else, if the manifest specifies sync-j, use that.
* Else, default to 1.
Then we limit the jobs count based on the softlimit RLIMIT_NOFILE.
For --jobs-checkout, the logic is now:
* If the user specifies --jobs-checkout, use that.
* Else, if the user specifies --jobs, use that.
* Else, if the manifest specifies sync-j, use that.
* Else, default to DEFAULT_LOCAL_JOBS which is based on user's ncpus.
Then we limit the jobs count based on the softlimit RLIMIT_NOFILE.
For garbage collecting, the logic is now:
* If the user specifies --jobs, use that.
* Else, if the manifest specifies sync-j, use that.
* Else, default to the user's ncpus.
Then we limit the jobs count based on the softlimit RLIMIT_NOFILE.
Having to factor in the manifest settings makes this more complicated
which is why we delay processing of defaults until after we've synced
the manifest projects.
Bug: http://b/239712300
Change-Id: Id27cda63c76c156f1d63f6a20cb2c4ceeb3d547c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/341394
Tested-by: Mike Frysinger <vapier@google.com>
Reviewed-by: LaMont Jones <lamontjones@google.com>
Diffstat (limited to 'project.py')
0 files changed, 0 insertions, 0 deletions