vbauerster / mpb

multi progress bar for Go cli applications
The Unlicense
2.29k stars 123 forks source link

DynTotal with EWMA question #124

Open mmellin opened 1 year ago

mmellin commented 1 year ago

Hello, thank you for your work on this library.

I have servers that I am running collection tasks on, and each server is one of several types. Collection tasks could range from <1sec to >5mins each, and the total number of such tasks is dynamic and depends on things like the number of log files in directories, the state of the system and the program's flags enabled more or less options.

I'd like to create progress bars for each group of node types (there could be 1000's of nodes, but <10 node types) with an ETA and a percentage. I'm having trouble figuring out how to use EWMA with a bar total = 0.

vbauerster commented 1 year ago

I think it's not possible to measure ETA if you don't know total at all. If you get it at a later point then it's ok. I recommend first to try Average ETA in any case, then if you really need EWMA read their corresponding documentation.