-
Notifications
You must be signed in to change notification settings - Fork 60
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-bytes SIZE #313
Conversation
This is split off from #305. It adds |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5d308a4
to
2326a1f
Compare
This comment has been minimized.
This comment has been minimized.
2326a1f
to
adf3446
Compare
What does it mean for a byte to be "processed" here? Testing this on my laptop, it looks to me like we're not including data which is being supplied via the chunkification cache -- probably because that bypasses almost everything in libarchive. I suspect this wasn't intentional? |
In terms of the user-visible behaviour, I'd say that not including data from the cache is intentional. Or at least, it wasn't unintended? Leaving aside the name of Granted, there could theoretically be cases where only a tiny amount of data is uploaded so the limiting factor is the chunkification cache. I'd tentatively assume that anybody in that case will be sufficiently technically skilled that they can understand why we're only notifying about uploaded bytes. Provided that the command-line name and docs are clear about what's happening. On a related note, |
FWIW, the first version of this work used I think I changed it purely because very few other tarsnap args contain two hyphens (the only ones I saw from skimming are |
The reason I was surprised by data handled via the chunkification cache not being counted -- once I figured out what's what was happening, which took some time since all I saw at first was "this says it's handled 2 GB of data, but I swear there's more data than that going into this archive" -- is that the chunkification cache is... well, a cache. It's a performance optimization, but it's not supposed to have user-visible effects. So I'd say that reporting progress differently based on whether something was cached or not qualifies as "astonishing behaviour". |
Just to be clear, I'm talking about the |
Woah! I didn't realize you were talking about |
95c4473
to
300bd34
Compare
Updated version, rebased on master. This lets the user specify something like Note:
this seems odd, since we're definitely adding 2 files! I do have a separate branch which addresses that to produce:
but note the changed
I was going to start adding a "definitely print a final progress message at the end" thing, but at that point I wondered if it was really worth it. I mean, this is really only intended for people who want the reassurance of seeing some progress updates, so does it really matter what the final message says before it ends? I don't have any firm intuitions about this. |
40923e5
to
4b89fcc
Compare
Updated version, rebased on master. This lets the user specify something like Note:
If/when this PR is merged, I'll tackle the matter of displaying "new bytes" with these messages (which is #305). |
@cperciva: I have a new version working, but I have two options for the code.
where the
and in siginfo.c, change these lines:
into:
|
POSIX says that "If a signal handler is called, the raise() function shall not return until after the signal handler does." so I'd go with the first option. |
4b89fcc
to
36b5e85
Compare
36b5e85
to
08a4050
Compare
08a4050
to
803a5fd
Compare
I think this is finally ready. Examples of
examples of
|
No description provided.