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

cmd: support human friendly values for bandwidth options #4567

Merged
merged 5 commits into from
Mar 24, 2024
Merged

Conversation

SandyXSD
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Mar 23, 2024

Codecov Report

Attention: Patch coverage is 46.46465% with 53 lines in your changes are missing coverage. Please review.

Project coverage is 55.62%. Comparing base (8cab7a1) to head (2708ce1).
Report is 1 commits behind head on main.

❗ Current head 2708ce1 differs from pull request most recent head 512b9a3. Consider uploading reports for the commit 512b9a3 to get more accurate results

Files Patch % Lines
pkg/utils/humanize.go 38.57% 42 Missing and 1 partial ⚠️
cmd/config.go 42.85% 4 Missing ⚠️
cmd/mount.go 66.66% 2 Missing ⚠️
cmd/format.go 75.00% 1 Missing ⚠️
cmd/quota.go 0.00% 1 Missing ⚠️
pkg/sync/config.go 0.00% 1 Missing ⚠️
pkg/sync/sync.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4567      +/-   ##
==========================================
- Coverage   55.67%   55.62%   -0.06%     
==========================================
  Files         157      158       +1     
  Lines       43021    43060      +39     
==========================================
  Hits        23950    23950              
- Misses      16410    16448      +38     
- Partials     2661     2662       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SandyXSD
Copy link
Contributor Author

@davies Please review each commit individually.

pkg/sync/sync.go Outdated
@@ -1212,7 +1212,7 @@ func Sync(src, dst object.ObjectStorage, config *Config) error {
wg := sync.WaitGroup{}
concurrent = make(chan int, config.Threads)
if config.BWLimit > 0 {
bps := float64(int64(config.BWLimit)*(1<<20)/8) * 0.85 // 15% overhead
bps := float64(config.BWLimit*(1<<20)/8) * 0.85 // 15% overhead
Copy link
Contributor

Choose a reason for hiding this comment

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

1000 or 1024?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be 1000

@davies davies merged commit 49ea79e into main Mar 24, 2024
27 checks passed
@davies davies deleted the humanize-mbps branch March 24, 2024 01:14
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.

2 participants