Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>An <a href="http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average" rel="noreferrer">exponential moving average</a> is great for this. It provides a way to smooth your average so that each time you add a new sample the older samples become decreasingly important to the overall average. They are still considered, but their importance drops off exponentially--hence the name. And since it's a "moving" average, you only have to keep a single number around.</p> <p>In the context of measuring download speed the formula would look like this:</p> <pre><code>averageSpeed = SMOOTHING_FACTOR * lastSpeed + (1-SMOOTHING_FACTOR) * averageSpeed; </code></pre> <p><code>SMOOTHING_FACTOR</code> is a number between 0 and 1. The higher this number, the faster older samples are discarded. As you can see in the formula, when <code>SMOOTHING_FACTOR</code> is 1 you are simply using the value of your last observation. When <code>SMOOTHING_FACTOR</code> is 0 <code>averageSpeed</code> never changes. So, you want something in between, and usually a low value to get decent smoothing. I've found that 0.005 provides a pretty good smoothing value for an average download speed.</p> <p><code>lastSpeed</code> is the last measured download speed. You can get this value by running a timer every second or so to calculate how many bytes have downloaded since the last time you ran it.</p> <p><code>averageSpeed</code> is, obviously, the number that you want to use to calculate your estimated time remaining. Initialize this to the first <code>lastSpeed</code> measurement you get.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload