【发布时间】:2018-06-30 05:25:22
【问题描述】:
【问题讨论】:
-
这里有同样的问题。不幸的是,开发工具发行说明中对慢速 3G 和快速 3G 的描述不是很有帮助。 developers.google.com/web/updates/2017/05/…
标签: google-chrome
【问题讨论】:
标签: google-chrome
我用互联网上的两个速度测试做了一些测量。使用以下自定义配置文件,我收到了与预设相似的下载速度和 ping 延迟。
慢速 3G 自定义:下载 376 kb/s,延迟 2000 毫秒
快速 3G 自定义:下载 1500 kb/s = 1.5 Mb/s,延迟 = 550 ms
通过速度测试测得的实际下载速度仅略低于配置值。测得的 ping 延迟是自定义配置文件中配置值的一半。
【讨论】:
【讨论】:
这是来自Robroi2000's answer的屏幕截图中值的csv
Preset,download(kb/s),upload(kb/s),RTT(ms)
GPRS,50,20,500
Regular 2G,250,50,300
Good 2G,450,150,150
Regular 3G,750,250,100
Good 3G, 1000,750,40
Regular 4G, 4000,3000,20
DSL 2000, 1000,5
WiFi 30000,15000,2
【讨论】:
From Chrome DevTools’ source code,这里是预设:
/** @type {!Conditions} */
export const OfflineConditions = {
title: Common.UIString.UIString('Offline'),
download: 0,
upload: 0,
latency: 0,
};
/** @type {!Conditions} */
export const Slow3GConditions = {
title: Common.UIString.UIString('Slow 3G'),
download: 500 * 1024 / 8 * .8,
upload: 500 * 1024 / 8 * .8,
latency: 400 * 5,
};
/** @type {!Conditions} */
export const Fast3GConditions = {
title: Common.UIString.UIString('Fast 3G'),
download: 1.6 * 1024 * 1024 / 8 * .9,
upload: 750 * 1024 / 8 * .9,
latency: 150 * 3.75,
};
【讨论】:
/ 8将位数转换为字节数。
download和upload的单位是每秒字节数,即使chrome中的接口显示每秒千位。代码中的计算例如Fast3GConditions.download 表示 1.6 (Mb/s) * 1024 (to kilo bits) * 1024 (to bits) / 8 (to bytes) * .9 (10% bandwidth loss),它将 1.6 Mb/s(3G 数据表带宽)转换为 188743 B/s(3G 实际带宽)。
对于想知道在连接上下载/上传 1 MB 需要多少时间的人,以下是基于 Roboroi's Screenshot 的结果
下载 1 MB 的时间
(1MB = 8Mb = 1024 Bytes = 8192 bits)
CONNECTION TYPE DOWNLOAD_TIME UPLOAD TIME
Regular 2G (250Kb/s⬇ 50Kb/s⬆) -> 33s 163 (2m 43s)
Good 2G (450Kb/s⬇ 150Kb/s⬆) -> 18s 54s
Regular 3G (750Kb/s⬇ 250Kb/s⬆) -> 11s 32s
Good 3G (1Mb/s⬇ 750Kb/s⬆) -> 8s 11s
Regular 4G (4Mb/s⬇ 3Mb/s⬆) -> 2s 3s
Wifi (30Mb/s⬇ 15Mb/s⬆) -> 0.27s 0.53s
【讨论】: