SUPERCILEX / fuc

Modern, performance focused unix commands
Apache License 2.0
340 stars 8 forks source link

Future request - progress bar #14

Closed roland-5 closed 5 months ago

roland-5 commented 1 year ago

cpz and rmz are very fast, but adding some eye candy like progress bar would be possible?

SUPERCILEX commented 1 year ago

That'll require a bunch of extra CPU time which goes against the goals of the project, so not going to happen. Thanks for the suggestion though.

EntilZha commented 1 year ago

Would it be possible instead to add a flag like --progress or --verbose to get some insight into what has been deleted/copied so far? Particularly with a huge directory, would be helpful to get a sense for how long it might take + parallelization factor.

SUPERCILEX commented 1 year ago

I'm open to having something behind a flag. I still don't think a progress bar is a good idea since that implies reading the entire source directory to get accurate percentages, but I think having a simple Number of files copied: N line that's continuously updated is reasonable. Won't have time to work on it myself though.

SUPERCILEX commented 1 year ago

Ooooh, now this would be neat: https://github.com/emersonford/tracing-indicatif. I had planned on adding tracing at some point anyway. Just needs the right cfgs.

aburow commented 5 months ago

This would be nice - either method you've highlighted. After moving 50GB tree of various sized files from local to SAN storage tonight I'm a convert - fast - last time I did this was with tar. The lack of progress did make me a little concerned as to how long it was going to take. It would certainly leave me concerned if I were to be moving terabytes of data (potentially taking days or weeks) and not really knowing if things had locked up. Even the old spinning /-|/- cursor every couple hundred files or MB could be enough to ease the nerves. :)

SUPERCILEX commented 5 months ago

Totally forgot about this, but I had added tracing support for other reasons! Anyway, I added an off-by-default progress feature that when compiled in logs every directory's copy progress. It's pretty noisy IMO (see https://github.com/emersonford/tracing-indicatif/issues/6 if you want to work on that) and was ~2x slower by wall-clock than without progress (and can be orders of magnitude worse if your terminal can't keep up with the output stream, but again that can be fixed by https://github.com/emersonford/tracing-indicatif/issues/6).

To use the feature you need to install with cargo install --features progress.

roland-5 commented 5 months ago

@SUPERCILEX Do all commits from the previous release add only a progress bar or something else (speed/stability)? If something more, would it be possible to make a new release and add it to cargo.io (a new release without the progress bar by default, sounds reasonable)?

SUPERCILEX commented 5 months ago

I'm happy to throw up a release. 2.1.0 is out. :)