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

Show overall progress when checking #181

Open
Sarke opened this issue Nov 2, 2021 · 4 comments
Open

Show overall progress when checking #181

Sarke opened this issue Nov 2, 2021 · 4 comments
Labels

Comments

@Sarke
Copy link

Sarke commented Nov 2, 2021

I see there are flags to show the speed and progress per file, but what about overall progress?

It would involve counting the lines in the checksum file and then showing a progress bar or percentage when checking.

@rhash
Copy link
Owner

rhash commented Jun 19, 2022

The files listed in a hash file can vary greatly in size. So the speed calculated by the count of lines will be essentially nonuniform. This can be mitigated if such overall progress is printed in the form [ CURRENT_LINE / TOTAL_LINES ]. This form of total progress is already used by some Linux utilities, like apt.

Some notes:

  • Such feature will not work for a hash file coming from the program standard input.
  • Reading a big hash file twice can be slow, especially from a slow network filesystem (this degradation can be just mentioned in the manpage).
  • It's not clear what should be shown, when many hash files are verified, Should RHash first read all of them to count the total number of lines?
  • What about other RHash program modes, i.e. creation of a hash file. Should RHash first calculate total amount of work, before doing it? This can significantly delay the start of file hashing, reducing the feature usefulness from the UX perspective.

@Sarke
Copy link
Author

Sarke commented May 21, 2023

I've come full circle. I was looking for a tool to do this. I (re-)discovered rhash. Then I tried to search for a way for it to display overall progress...

@nioncode
Copy link

I think it would be best to just get the file size of each file in the hash list (which is fast, at least if you are not trying to verify a list with millions of small files on a HDD) and then display the overall progress based on bytes_hashed/bytes_overall. Best would be to also print some kind of ETA (based on the avg speed of the last minute), something like:

--( Verifying checksums.md5 ) ------------
fileA      3%      [Total 0.2%, ETA: 03h 42m 30s]

@rhash
Copy link
Owner

rhash commented Jan 23, 2024

Not all hash list are short.
Not all filesystems are fast to return file size (even not all files specified on the command line have a file size).

Not for all users RHash (with the discussed feature) will instantly start calculating with percents. So there will be requests to print something while RHash is calculating sizes before the actual work. It's a neverending wheel of feature requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants