Calculating download/upload speed
If one calculates download/upload speed, what is more realistic?
If the total data rece开发者_如何学编程ived/sent is divided by the total transfer time or if the chunk size received/sent is divided by the time since the last transfer(the current time between receiving)?
The second option is more up to date but I am not sure if it is a stable value.
Which one is used in applications?
Neither. The best approach is a moving average of the last N chunks.
精彩评论