5

Possible Duplicate:
Estimating/forecasting download completion time

We've all seen the download time running estimate that initially says something like "7 days", but keeps dropping wildly (e.g. "23 hours", "45 minutes", "1 min. 50 sec", etc) with each successive estimation as the chunks are downloaded.

To avoid these initial (alarming) estimates, there are techniques one could try like suppressing display of the first n estimates, or waiting for the delta between estimates to drop below some threshold before you start displaying them, but these don't seem like a general, robust solution. There are corner cases involving too few samples, or samples that actually are wildly varying...

I think I recall a general solution for this kind of thing in mathematics (statistics?) that reduced or eliminated these wild values.

Does anyone know?

Edit:

OK, looks like this has already been asked and answered:

Community
  • 1
  • 1
Scott Smith
  • 3,900
  • 2
  • 31
  • 63
  • Take a larger number of samples? Display "calculating" until you get enough samples? – Max Shawabkeh Mar 13 '10 at 22:53
  • @Max - yeah, that's one of the possibilities mentioned above, except that it's not always possible to take a greater number of samples (that would involve downloading the data in smaller chunks, which is something you may have no control over). One difficulty is what to do when the total download is less than or equal to your minimum number of samples (although you could just allow it to say 'calculating' and then finish without a time estimate, I suppose). – Scott Smith Mar 13 '10 at 23:02
  • 1
    Take a look at http://stackoverflow.com/questions/1881652 and http://stackoverflow.com/questions/1788283 – Gumbo Mar 13 '10 at 23:07
  • If you’re satisfied with one of the answers to the other question, please close your question or I close it as a duplicate. – Gumbo Mar 13 '10 at 23:34
  • @Gumbo - I could only find a way to 'vote' to close it. Is that what you meant, or as the author, is there some way I can just close it? – Scott Smith Mar 14 '10 at 00:13

2 Answers2

1

Use filer, moving avarege can be good enough, for calculating speed.

S_filtered=S_filtered_prevous*(1-x) + S_current*x

Where x is inverse value of filtered samples, try different values from 0.1 - 0.01 (10-100)

Luka Rahne
  • 10,336
  • 3
  • 34
  • 56
  • For those looking for more information, it's called an Exponential Weighted Moving Average: https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average – ctc Aug 11 '15 at 18:35
0

If you have the size of the file, how much of it is downloaded, and the expected download speed

  • from previous files
  • from previous samples
  • from a dropdown the user picks from
  • from a speed test

you could provide improved estimates.

kiwicptn
  • 502
  • 2
  • 9