On Sun, 10 Oct 1999, Chris Frey wrote: > Attached is a patch that makes the progress and ETA for apt sessions > a bit more accurate. I use a modem which is not the most steady of > connections. With this patch, the time estimate gets more stable as > the download progresses, which makes it easier to determine how much > longer the download will be.
More accurate in this case is highly subjective. Your patch converts the instantenous CPS into a running CPS which gives very poor results when you have parallel downloads going or get large inter-file delays when using ftp. The only reason the value is not more stable when using a modem is because there is a sampling effect going on in the gathering of CPS data. The timestamping of the exact moment a new packet comes in is quantized to the update rate of the display so it can get a timestamp +0.7s from what it really is which throws the calculations because a 1k packet off by .7s over 5s (say 7.5k of data) is -200b/s on the transfer rate. Apply the same calculation to the PPP mtu and line speed and you add another 200b/s varience. The same problem comes in with PPP and the IP stack but to a lesser degree. Two fixes are longer term averaging which makes the variance from this effect very small (but makes short term rate changes very bad) or more acurate timestamping. Jason

