-
-
Notifications
You must be signed in to change notification settings - Fork 859
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
Enhancement: progress of large uploads on normal log #12
Comments
Hi, since I was testing, I have given some thought to this as well. So the simplest way to do is put a log.log in upload.d in the JSONValue upload() function just below the The following code could do the trick: If you feel you can cut the decimals to one decimal place to have a more elegant output |
Thanks for the feedback & trying something out on this - will look at this later today |
So with adding in the data this way it is totally dependant on the file size / fragment size. If still a large file but <10Mb progress stays at 0% then gets done, if 20Mb and so on it gets Progress: 50% then done. I was reading a number of other articles a while back on some other items - will dig this out as I think the right way to do this is elsewhere. |
The idea I was chasing down was to attach output via the http.onProgress - as this would give (and does) finer grain output as to what is being sent / received & would do so, not just for large uploads but smaller ones as well. In the end tho this was being too fickle in working right at the moment - so going with your suggestion with a couple of tweaks. Can you check PR #99 for reference?
|
You are absolutely correct, this outputs a lot of 0% as the main source of truth here are the fragments and onedirve large file logic. I also mentioned that this is the simplest way just with 1 line of code to add :) The problem here is that the need for information depends on two things: file size (that is an easy one as we have that info) and the upload speed (this is problematic as it likely changes over time). The reason being is that if you have a 10mb file but your upload speed is only 10kb than you surely want some output of the progress, but if your upload speed is 10mb you would not want upload progress for a file less that a few hundred mb. |
I think the right way to do this is to utilise http.onProgress to display this information - will work on that aspect & why it's being fickle at the moment. |
Confirmed, log works |
Can you check the latest pull of PR #99? It should generate a progress bar that provides an ETA & % uploaded for large file uploads
When creating test files I am using the following:
|
This works just great. Nice work! It was a good idea to remove it from the log and put it to screen only (if one just thinks about it, from a log perspective the progress is not relevant - e.g. when you run it as a daemon, but when you actually have a terminal open to track the progress than you do want some feedback) one thing, but its more like a nice to have: we upload/download is finished, the ETA that is currently changes to 00:00:00 could show the time required for upload. |
thanks for the suggestion - agree that the ETA should be changed from Will also look at how best to integrate with a download operation - as that will be easier than handling the chunks for upload using http.onProgress |
Works as expected, thanks! |
@Abasz Along with the upload progress bar, there should now be a working download progress bar for large files - where the file threshold is the same for uploads of 4MiB:
|
Closing due to merge into master of PR #99 |
Apologies, I am on holiday with limited access :) I was able to do a simple test and worked nicely. I'll be able to have a more in depth look at this on Sunday the earliest if still needed. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
It would be good to be able to follow the upload progress in normal log not just in verbose mode (e.g. logging the percentage of the fragments)
The text was updated successfully, but these errors were encountered: