You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Chrome DevTools模拟2G网络节流的具体参数值咨询

Chrome DevTools 2G网络节流参数设置

Chrome DevTools中官方定义的2G网络节流参数分为Good 2G和Regular 2G两类,以下是准确数值及对应代码实现(和你提供的Slow 3G逻辑一致,会将标称速率转换为带损耗的字节/秒):

核心参数明细

  • Good 2G

    • 标称下载速率:400 kbps
    • 标称上传速率:300 kbps
    • 延迟:150 ms
    • 实际代码计算值(字节/秒):下载=400*1000/8*0.8,上传=300*1000/8*0.8
  • Regular 2G

    • 标称下载速率:250 kbps
    • 标称上传速率:150 kbps
    • 延迟:300 ms
    • 实际代码计算值(字节/秒):下载=250*1000/8*0.8,上传=150*1000/8*0.8

对应代码示例

// Good 2G 配置
export const Good2GConditions: Conditions = {
  title: i18nLazyString(UIStrings.good2G),
  i18nTitleKey: UIStrings.good2G,
  download: 400 * 1000 / 8 * 0.8, // 40000 字节/秒
  upload: 300 * 1000 / 8 * 0.8, // 30000 字节/秒
  latency: 150,
};

// Regular 2G 配置
export const Regular2GConditions: Conditions = {
  title: i18nLazyString(UIStrings.regular2G),
  i18nTitleKey: UIStrings.regular2G,
  download: 250 * 1000 / 8 * 0.8, // 25000 字节/秒
  upload: 150 * 1000 / 8 * 0.8, // 15000 字节/秒
  latency: 300,
};

补充说明

Chrome的网络节流会在标称速率基础上乘以0.8(模拟实际网络损耗),同时将kbps转换为字节/秒(除以8),这和你提供的Slow 3G代码逻辑完全一致。不同浏览器的参数数值有细微差异,但速率和延迟的比例保持一致,这是由于各自的节流实现逻辑不同导致的。

内容的提问来源于stack exchange,提问作者Marko

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.13 12:58:57