Skip to content
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

Add remote.WithJobs and use it in remote.MultiWrite #803

Merged
merged 1 commit into from
Nov 3, 2020

Conversation

imjasonh
Copy link
Collaborator

@imjasonh imjasonh commented Nov 2, 2020

  • default parallel is 4
  • an error is returned if WithParallel is called with a value <=0 or >100

We can probably reuse this to fetch and push blobs elsewhere in remote.

MultiWrite'ing 123 distroless images with WithParallel(100) took 4s compared to 11s for the default.

@codecov-io
Copy link

codecov-io commented Nov 2, 2020

Codecov Report

Merging #803 into master will decrease coverage by 0.71%.
The diff coverage is 51.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #803      +/-   ##
==========================================
- Coverage   75.60%   74.88%   -0.72%     
==========================================
  Files         102      103       +1     
  Lines        4185     4312     +127     
==========================================
+ Hits         3164     3229      +65     
- Misses        566      606      +40     
- Partials      455      477      +22     
Impacted Files Coverage Δ
pkg/v1/remote/descriptor.go 74.39% <ø> (ø)
pkg/v1/remote/write.go 64.96% <ø> (ø)
pkg/registry/manifest.go 86.20% <7.69%> (-13.80%) ⬇️
pkg/v1/remote/options.go 69.23% <16.66%> (-9.56%) ⬇️
pkg/v1/remote/multi_write.go 57.54% <57.54%> (ø)
pkg/crane/push.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab3252b...7e43cbb. Read the comment docs.

@imjasonh imjasonh changed the title Add remote.WithParallel and use it in remote.MultiWrite Add remote.WithJobs and use it in remote.MultiWrite Nov 2, 2020
Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a TODO to Write and WriteIndex to respect WithJobs?

pkg/v1/remote/options.go Show resolved Hide resolved
- default parallel is 4
- an error is returned if WithParallel is called with a value <= 0

We can probably reuse this to fetch and push blobs elsewhere in remote.

MultiWrite'ing 123 distroless images with WithJobs(100) took 4s
compared to 11s for the default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants