Fiddler——若网模拟测试


1、默认方式

2、自定义规则

 2.1、固定 阈值

   计算公式:

 2.2、区间 阈值

var customSpeedRuleFlag = fales; // 自定义限速区间

// 自定义弱网区间阈值 (上传、下载 速度,在1-50ms随机)
static function customRandInt(min, max) {
    return Math.round(Math.random()*(max-min)+min);
}

if(customSpeedRule){
    oSession["request-trickle-delay"] = "" + customRandInt(1, 50);
    oSession["response-trickle-delay"] = "" + customRandInt(1, 50);
}

   

OK.