-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
client: Less noisy progress #102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better like this and it looks correct to me, except for some typos and an outdated comment.
But the purpose of line.ljust(self.width, " ") is not clear to me. It's not changed in this PR though, so doesn't matter maybe.
Example output when downloading real image:
|
Previously we updated the progress up to 10 times per second, and we displayed fractional percent values (e.g. 12.57%). This is too noisy and creates too many uninteresting updates. It also calls time.monotonic_time() on every update to check if it is time to update which is waste of resources for very little benefit. Change the progress to show integer values (12%) and update the progress only when the progress value changes. With this change we update the progress up to 100 times during a transfer. Signed-off-by: Nir Soffer <nsoffer@redhat.com>
Previously we updated the progress up to 10 times per second, and we
displayed fractional percent values (e.g. 12.57%). This is too noisy and
creates too many uninteresting updates. It also calls
time.monotonic_time() on every update to check if it is time to update
which is waste of resources for very little benefit.
Change the progress to show integer values (12%) and update the progress
only when the progress value changes. With this change we update the
progress up to 100 times during a transfer.
This PR implements part of #72.