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

Feature suggestion: show bitrate in progress bar #191

Open
afontenot opened this issue Apr 17, 2023 · 5 comments
Open

Feature suggestion: show bitrate in progress bar #191

afontenot opened this issue Apr 17, 2023 · 5 comments

Comments

@afontenot
Copy link
Contributor

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
@piegamesde
Copy link
Member

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})"?

@piegamesde
Copy link
Member

piegamesde commented Apr 21, 2023

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

@afontenot
Copy link
Contributor Author

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.

@piegamesde
Copy link
Member

Putting this on hold until #192 is resolved

@afontenot
Copy link
Contributor Author

This could be revisited now, once we bump the indicatif version.

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

No branches or pull requests

2 participants