tidb-challenge-program / bug-hunting-issue

Bug hunting issues.
3 stars 0 forks source link

P2-[4.0-bug-hunting]-[Tiup]-Download progress shows p/s #40

Open wwar opened 4 years ago

wwar commented 4 years ago

Bug Report

1. What did you do?

This is a nit, and probably not a P2, but it looked closest based on the classification system.

The bug https://github.com/pingcap-incubator/tiup/issues/103 looks like it might not have been fixed properly. When I run tiup update --nightly --all, I see:

download https://tiup-mirrors.pingcap.com/pd-nightly-linux-amd64.tar.gz 30.52 MiB / 30.52 MiB 99.97% 6.79 MiB p/s                                           ..

My question is, why is p/s required here?

2. What did you expect to see?

It might be nice to format as follows:

[99.97%] https://tiup-mirrors.pingcap.com/pd-nightly-linux-amd64.tar.gz [30.52 MiB / 30.52 MiB] [6.79 MiB/s]                                           
..

This is useful because the percentage can be seen first (because the length of a URL is variable, it makes it hard on the eye to read anything on the right hand side).

3. What did you see instead?

download https://tiup-mirrors.pingcap.com/pd-nightly-linux-amd64.tar.gz 30.52 MiB / 30.52 MiB 99.97% 6.79 MiB p/s                                           ..

4. What version of TiDB are you using? (tidb-server -V or run select tidb_version(); on TiDB)

I have the latest:

wwar@ivory:~$ tiup update --self
download https://tiup-mirrors.pingcap.com/tiup-linux-amd64.tar.gz?v=1587266734335088527 3.31 MiB / 3.34 MiB 99.08% 4.76 MiB p/s                                                                                                                                 
Update successfully!
shuke987 commented 4 years ago

/bug P3

lonng commented 4 years ago

@wwar Thanks for your feedback. We will refactor it again.