-
Notifications
You must be signed in to change notification settings - Fork 2k
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
New (tiny) feature - print summary stats even when --quiet is enabled #1158
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thanks for the suggestion @qth . The patch is mostly fine with regards to its stated objectives. At this stage, I'm mostly interested by the user side. You basically need an intermediate display mode, between 2 ("progression notification" + "end summary" + "overwrite prompt") and 1 (no output, except error), which would only feature "end summary". Your suggestion is to add a new mode, triggered through a new long command There are a few higher level questions associated to this suggested feature.
Point is, adding any new functionality is a burden for all users not using it,
For example, could it be served by the introduction of a new intermediate display level ?
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Hi @Cyan4973, I'll try to answer your questions as best I can:
So, I hope that folks would find it useful, but I'll let others judge if I'm just feature greedy and contributing to the carry cost of the software :-)
|
Regarding your use case : |
Right, it's easy to get the size of the generated file / output when the process is complete, but it doesn't tell me the uncompressed size / size of the input stream. The input stream size is unknown when it comes from STDIN. So, I also just tried to do 'zstd -l' to see if that could satisfy my use case, but got an interesting result instead. Here's the status line from the compression operation:
Here is what happened when I queried the file with 'zstd -l', and what happened when I decompressed:
(I used the stock 1.3.4 build from https://github.com/facebook/zstd/releases/download/v1.3.4/zstd-v1.3.4-win64.zip for all operations) I also can't use the PostgreSQL data directory as an indicator of uncompressed file size since it's smaller than the pg_dumpall output (data directory is only 25GiB vs. 29.5GiB) |
Thanks, it seems your test triggered an error in the Anyway, your use case is slightly more complex than I expected, Note that, even with a fix, There is another way to report the amount of data transferred into
Not sure if this solution would be suitable for your use case. If not, then indeed, I see no other way than adding a new command. |
I wish I were doing all of this on a BSD or Linux installation, but alas, I'm stuck on Windows 2012 server for this particular project. I'll try getting a port of |
This is what I was expecting to see after reading the problem description:
|
I will close this thread, since we will not merge this patch "as is". |
The title kind of says it all - I wanted zstd to print out the compression summary upon completion even when quiet mode is enabled.
I'm not great at coding, so if this pull request is bad please consider it a feature request instead and just send my code to /dev/null. I figured it'd be a more genuine way to ask :-)