Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Run multiple docker containers in parallel
Build docker image
Prepare API definitions
# In master branch of googleapis git checkout 48d30c4966ef9ea31b897e13f75d8f94070cc8e9
Run script
# In main branch of google-cloud-java git checkout chore/parallel-gen chmod +x parallel-run.sh ./parallel-run.sh
Explanation
The original generation configuration (
generation_config.yaml
) has been split to three files with roughly the same size.The script will start three
docker run
command running in the background, each command will generate 1/3 libraries in one config.Log of each execution will be sent to
run-${num}.log
in the current working directory.Note that you may need to change the path to API definitions:
time spent in parallel generation (cloudtop)
real 33m45.521s
user 0m0.258s
sys 0m0.499s
real 38m2.565s
user 0m0.248s
sys 0m0.580s
real 42m6.416s
user 0m0.308s
sys 0m0.480s
time spent in sequential generation (cloudtop)
real 67m28.459s
user 0m0.574s
sys 0m2.081s