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

Add --progress flag #2595

Merged
merged 1 commit into from
May 6, 2021
Merged

Add --progress flag #2595

merged 1 commit into from
May 6, 2021

Conversation

senhuang42
Copy link
Contributor

Addressing #2556

A while ago, the way zstd interacts with stdin and stdout was refactored, removing any possibility of (de)compressed output to stdout displayed in the terminal to mix with stderr (since that's generally not what we want), so currently zstdcli doesn't generate a refreshing progress meter when output is going to stdout.

This PR adds that possibility back in, but now behind a new flag, --progress (to go along with --no-progress) that will force the progress meter to display on (de)compression.

@@ -68,6 +68,8 @@ void FIO_freeContext(FIO_ctx_t* const fCtx);

typedef struct FIO_display_prefs_s FIO_display_prefs_t;

typedef enum { FIO_ps_auto, FIO_ps_never, FIO_ps_always } FIO_progressSetting_e;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@Cyan4973 Cyan4973 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me !

I'm wondering if there would be a way to automatically test this feature,
though I understand it's a fairly tricky topic.

Maybe redirect stderr to stdout and grep the result for traces (or absence of traces) of the counter ?

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

Successfully merging this pull request may close these issues.

3 participants