请问Speedtest的上下行速率是峰值or均值?
这是一个含金量很高的问题,如果知道具体算法,那么SPEEDTEST的核心技术也就不存在了
通过SPEEDTEST官网给的算法可以看到,既不是最高速率,也不是我们传统意义上的平均速率。另外上行和下行的速率肃反有区别
以下行来说计算方法大概未:
1.每秒速率采样30次
2.将样本分成20片
3.去掉最高的2个样本和最低的 1/4的样本,取剩下样本的平均值
https://support.speedtest.net/hc/en-us/articles/203845400-How-does-the-test-itself-work-How-is-the-result-calculated-
Download
Small binary files are downloaded from the web server to the client to estimate the connection speed
Based on this result, one of several file sizes is selected to use for the real download test
The test is performed with cache prevention via random strings appended to each download
Throughput samples are received at up to 30 times per second
These samples are then aggregated into 20 slices (each being 5% of the samples)
See bottom of document for details to fill here (see * below for more detail)
The remaining slices are averaged together to determine the final result
Upload Test
A small amount of random data is generated in the client and sent to the web server to estimate the connection speed.
Based on this result, an appropriately sized chunk of randomly generated data is selected for upload.
The upload test is then performed in chunks of uniform size, pushed to the server-side script via POST.
We'll use up to four HTTP threads here, as well, to saturate the connection.
Chunks are sorted by speed, and the fastest half is averaged to eliminate anomalies and determine the result.
How results are calculated
All samples are sorted by speed. The two fastest results are removed and hte bottom 1/4 which is left (which is approximately 22% of the total). Everything else is then averaged.