Hacker News new | ask | show | jobs
by atoav 1937 days ago
This is hard because predicting a duration for each process is hard. For some processes getting feedback that granular might be hard (for a download this is more or less easy, you get the moving window average downloadspeed and the total filesize and use simple arithmetic to get the duration). For other things this can be hard, e.g. if the peocess you use doesn't offer that kind of granular metrics.
1 comments

Download speed is not too important when showing a progress bar (unless one wants to do somethings fancy). If you know total content length and how much you have downloaded you just calculate the fraction and update the progress bar according a couple of times a second.
That's fine if the progress bar is only indicating the progress of the download. As mentioned elsewhere in this thread, if the download operation is only one part of the overall process, things get quite a bit trickier -- what percentage of the overall progress do you assign to the download operation when external factors like network speed and system load come into play?