這是一個(gè)含金量很高的問題,如果知道具體算法,那么SPEEDTEST的核心技術(shù)也就不存在了
通過SPEEDTEST官網(wǎng)給的算法可以看到,既不是最高速率,也不是我們傳統(tǒng)意義上的平均速率。另外上行和下行的速率肅反有區(qū)別
以下行來說計(jì)算方法大概未:
1.每秒速率采樣30次
2.將樣本分成20片
3.去掉最高的2個(gè)樣本和最低的 1/4的樣本,取剩下樣本的平均值
https://support.speedtest.net/hc ... -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.