Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

feature: implement minrate option for dfget when downloading a file #664

Merged
merged 2 commits into from
Jul 9, 2019

Conversation

jyizheng
Copy link
Contributor

@jyizheng jyizheng commented Jul 8, 2019

Signed-off-by: yizheng yizheng@cs.unc.edu

Ⅰ. Describe what this PR did

Implement minrate option for dfget when downloading a file. Use "-x" to specify minrate.
Re-implement func calculateTimeout() to use minrate.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Jul 8, 2019

Codecov Report

Merging #664 into master will increase coverage by 0.04%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #664      +/-   ##
==========================================
+ Coverage    48.2%   48.25%   +0.04%     
==========================================
  Files          99       99              
  Lines        5889     5896       +7     
==========================================
+ Hits         2839     2845       +6     
- Misses       2825     2827       +2     
+ Partials      225      224       -1
Impacted Files Coverage Δ
dfget/core/core.go 52.7% <0%> (ø) ⬆️
dfget/config/config.go 91.76% <100%> (+0.09%) ⬆️
cmd/dfget/app/root.go 62.26% <66.66%> (+0.17%) ⬆️
supernode/daemon/mgr/scheduler/manager.go 24.81% <0%> (+0.75%) ⬆️

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 b4b0d66...5908c89. Read the comment docs.

flagSet.StringVarP(&localLimit, "locallimit", "s", "",
"network bandwidth rate limit for single download task, in format of 20M/m/K/k")
flagSet.StringVarP(&minRate, "minrate", "x", "",
Copy link
Member

Choose a reason for hiding this comment

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

It's unnecessary to set short flag for minRate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Handled.

Signed-off-by: yizheng <yizheng@cs.unc.edu>
Signed-off-by: yizheng <yizheng@cs.unc.edu>
Copy link
Member

@lowzj lowzj left a comment

Choose a reason for hiding this comment

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

LGTM

@lowzj lowzj merged commit 0fdb4fb into dragonflyoss:master Jul 9, 2019
yunfeiyanggzq pushed a commit to yunfeiyanggzq/Dragonfly that referenced this pull request Jul 19, 2019
…ragonflyoss#664)

* feature: implement minrate option for dfget when downloading a file

Signed-off-by: yizheng <yizheng@cs.unc.edu>

* remove short flag for minRate

Signed-off-by: yizheng <yizheng@cs.unc.edu>
starnop pushed a commit to starnop/Dragonfly that referenced this pull request Nov 27, 2019
…ragonflyoss#664)

* feature: implement minrate option for dfget when downloading a file

Signed-off-by: yizheng <yizheng@cs.unc.edu>

* remove short flag for minRate

Signed-off-by: yizheng <yizheng@cs.unc.edu>
inoc603 pushed a commit to inoc603/Dragonfly that referenced this pull request Dec 23, 2019
…ragonflyoss#664)

* feature: implement minrate option for dfget when downloading a file

Signed-off-by: yizheng <yizheng@cs.unc.edu>

* remove short flag for minRate

Signed-off-by: yizheng <yizheng@cs.unc.edu>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants