有没有可靠的方法来计算互联网连接的当前比特率?

发布于 2024-08-13 18:01:16 字数 133 浏览 2 评论 0原文

我已经尝试了一种涉及网页请求的技术,您可以使用该技术根据字节除以经过的时间来计算比特率。当然,您可以对多个数据点进行平均,但这与可以进行的比特率估计一样准确吗?

是否存在任何专业或不那么黑客的技术? (或者这只是互联网的神奇奥秘之一?)

I have experimented with a technique that involves a web page request which you use to calculate the bit-rate based on bytes divided by the time elapsed. You can average multiple data points of course, but is this as accurate of a bit-rate estimation that can be made?

Do any professional or less hackish techniques exists? (Or is this just one of the magical mysteries of the internet?)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

昵称有卵用 2024-08-20 18:01:16

这实际上取决于您对哪种速度信息感兴趣。您必须注意以下几点:

  1. 速度测试可能会因缓存
  2. 捕获请求的 CDN 服务器而产生偏差(假设您正在检查 HTTP 响应速度)
  3. 网络的偶然性流量转向拥塞的网络
  4. DNS 缓存

我的建议是向相当数量的唯一站点发出请求以进行测试。 [在可接受的误差范围内]

测试大量并获取平均速度,这就是您通常可以从客户那里得到的期望。最大值是客户端可以获得的估计最大值。客户端可以保证的最小值是 0mbs。

This really depends what kind of speed information you are interested in. You must be aware of several things:

  1. The speed test may be skewed by caching
  2. CDN servers that catch a request (assuming you are checking for HTTP response speed)
  3. The offchance of the network traffic veering to a congested network
  4. DNS caching

My suggestion is to make requests to a fair amount of unique sites for it to test. [Within an accetable margin of error]

Test lots of them and take the average speed, that is what you can generally expect from a client. The max is an estimated maximum that a client can get. The minimum that a client can guarentee is 0mbs.

尽揽少女心 2024-08-20 18:01:16

假设您想按照语法顺序执行此操作,也许其中一个连接速度测试服务有一个可供您使用的 API?

速度测试

Assuming that you want to do this anagrammatically, perhaps one of the connection speed testing services have an API that you can use?

Speed Test

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文