Feature suggestion: show bitrate in progress bar
afontenot opened this issue · 5 comments
Having the bitrate available is great for diagnosing performance issues at a glance, and making sure that very large transfers are proceeding as planned. I made a few modifications to the progress bar format that include showing the bitrate, but I didn't want to submit a PR for this without discussion about an acceptable format first.
I wonder if this progress bar style is worth consideration, or (alternatively) if the option to display a custom progress bar could be added as a command line option.
.template("{percent}% [{wide_bar}] {bytes} ({bytes_per_sec}) eta {eta}")
100% [###########################################] 599.21 MiB (2.56 MiB/s) eta 0s
Hm, your proposed design removes the time-elapsed information and the sent-bytes count. Of course, we can't cram everything into a single line so it is about priorities.
One requirement that I have though is that all items left to the progress bar are fixed size, otherwise it would wobble too much.
So, how about something like "{percent:>3}% [{wide_bar}] {bytes} ({bytes_per_sec}, {eta})"
?
Okay I tried it out, and:
- I like the speed information
- I do not miss the elapsed time information
- I kind of miss the total_bytes information
- I do not need the progress percent information
- I'd like to have some information on the left of the progress bar, to give it some padding to the edge of the terminal
How would you like "[{bytes:>10}/{total_bytes}] [{wide_bar}] [{bytes_per_sec}, {eta}]"
?
[ 51.04 MiB/2.30 GiB] [##>------------------------------------------------------] [4.72 MiB/s, 8m]
Might need more experiments with the brackets
I don't hate that. My thinking about total size is that the sender already knows the size of the file, typically. And the receiver also knows the size of the file because it's specified right above the progress bar, i.e. Receive file 'fn' (<size> in size)?
So if you're trying to buy space from somewhere it seems like an easy thing to give up.
I like having the percentage personally, but I admit it's redundant with the progress bar. Leaving it out is fine if you prefer it that way.
My one complaint about your idea is that the reserved space for {bytes}
leaves a weird looking space on the left until you get into the hundreds of MiB. Maybe there's a way to always get the bytes
value to format with 4 digits? So when you have hundreds of MiB, it prints something like 123.4 MiB
instead of 123.45 MiB
? That would solve the width problem in a cleaner fashion IMO.
Putting this on hold until #192 is resolved
This could be revisited now, once we bump the indicatif version.