firebase-streaming-import icon indicating copy to clipboard operation
firebase-streaming-import copied to clipboard

Progress indication

Open hijonathan opened this issue 10 years ago • 2 comments

The only outputs from this script are the start, end and error states. If it's streaming, could you print a time estimation or some kind of progress?

I'd like to send a PR, but my python is pretty rusty.

hijonathan avatar Jan 10 '15 20:01 hijonathan

Hi hijonathan,

Sorry for responding so late, somehow this issue you opened never made it out to me. A progress bar would be a useful feature, but I'm not sure how it would be implemented. If you look at the code, ijson simply spits out events to python, which parses them. I don't see a way to count all the events first and construct some sort of parsing, without loading the whole file into memory, which is exactly what this script is trying to avoid.

Do you have any ideas on how a progress bar would be implemented?

m-tse avatar Apr 15 '15 23:04 m-tse

Perhaps I could do a python OS call to check the size of the disk, and have a incremental counter that estimates the size of the data already written. It wouldn't be an exact progress, but it could be close.

m-tse avatar Apr 16 '15 18:04 m-tse