fiddler fiddler limit network speed network speed limit

fiddler network speed limit

 

During the test, often require some special cases when the test is weak network conditions, this time IOS better said, adjusting the network mode in the options to developers, but the android only through other ways, here compiled by fiddler packet capture tool to set up a weak network mode, you can set network speed you want in the fiddler, or unstable speeds to simulate .

1 download fiddler

Step Two: Set fiddler

fiddler also need to set about the need to set up, find the head of the function Tools, then click on the first function Options, a screen will pop up

 

3

Step 3: Set Android device proxy
open our phone into wifi settings, to note here is the Android device must be connected to the wifi and our successful PC is set to the same network. Most Android devices can be set up inside the proxy settings in wifi, but do not rule out a small part of the system equipment is limited. Before setting the proxy we need to know ip address of your PC, you can then get through the system cmd ipconfig command
--------------------- 
4 cell phones proxy settings

After 5 After setting, all network requests are on the phone to the agent can then view the Fiddler

6: Set the network restriction

Back to our fiddler in the past, find the Rules toolbar, from the name is very obvious that the function is used to doing. And then to find the Customize Rules Rules list, this will pop up a text editor like something

Used in this text editor Ctrl + F Use search keywords: simulate, you can find the following code fragment:

 

 

request-trickle-delay represents the delay time of the network your request, response-trickle-delay represents the delay time in response to the network, the units are milliseconds, where the default is 300 milliseconds to 150 milliseconds and, therefore, only need to modify two values to simulate latency and a weak network environment, such as the two values may be modified: 2000 and 2000, network requests on behalf of a 2 second delay, delay 2 seconds response network:
--------- ------------ 
after he remember to press Ctrl + S to save.

Step five: Turn on network latency
then you can open the network delay, or our Rules function, find Performance, then you can see a Simulate Modems Speeds in the sub-option, select it, you're done, the network delay has been opened, if need to close the network delay, click again.

Step Six: Extended weak network rules
may have been that we do not want a weak network environment in the test, but the strength of the random network, this is more appropriate to our really the case, then we can modify the above code as follows:
- -------------------

static function randInt(min, max) {
return Math.round(Math.random()*(max-min)+min);
}
if (m_SimulateModem) {
// Delay sends by 300ms per KB uploaded.
oSession["request-trickle-delay"] = ""+randInt(1,2000);
// Delay receives by 150ms per KB downloaded.
oSession["response-trickle-delay"] = ""+randInt(1,2000);
}
---------------------

 

 

RandInt (1,2000) here should be well understood, a random integer 1-2000 in a representative, so that there will be occasional delay network and the occasional good 

original: https://blog.csdn.net/u010618194/ article / details / 76652513 

During the test, often require some special cases when the test is weak network conditions, this time IOS better said, adjusting the network mode in the options to developers, but the android only through other ways, here compiled by fiddler packet capture tool to set up a weak network mode, you can set network speed you want in the fiddler, or unstable speeds to simulate .

1 download fiddler

Step Two: Set fiddler

fiddler also need to set about the need to set up, find the head of the function Tools, then click on the first function Options, a screen will pop up

 

3

Step 3: Set Android device proxy
open our phone into wifi settings, to note here is the Android device must be connected to the wifi and our successful PC is set to the same network. Most Android devices can be set up inside the proxy settings in wifi, but do not rule out a small part of the system equipment is limited. Before setting the proxy we need to know ip address of your PC, you can then get through the system cmd ipconfig command
--------------------- 
4 cell phones proxy settings

After 5 After setting, all network requests are on the phone to the agent can then view the Fiddler

6: Set the network restriction

Back to our fiddler in the past, find the Rules toolbar, from the name is very obvious that the function is used to doing. And then to find the Customize Rules Rules list, this will pop up a text editor like something

Used in this text editor Ctrl + F Use search keywords: simulate, you can find the following code fragment:

 

 

request-trickle-delay represents the delay time of the network your request, response-trickle-delay represents the delay time in response to the network, the units are milliseconds, where the default is 300 milliseconds to 150 milliseconds and, therefore, only need to modify two values to simulate latency and a weak network environment, such as the two values may be modified: 2000 and 2000, network requests on behalf of a 2 second delay, delay 2 seconds response network:
--------- ------------ 
after he remember to press Ctrl + S to save.

第五步:开启网络延迟
接下来就可以开启网络延迟了,还是我们的Rules功能中,找到Performance,然后在子选项中可以看到一个Simulate Modems Speeds,选中它,大功告成,网络延迟已经开启,如果需要关闭网络延迟,再次点击即可。

第六步:扩展弱网络规则
可能我们在测试中不会想要一个一直虚弱的网络环境,而是随机强弱的网络,这样比较贴切我们的真是情况,那么我们可以修改上述代码为:
---------------------

static function randInt(min, max) {
return Math.round(Math.random()*(max-min)+min);
}
if (m_SimulateModem) {
// Delay sends by 300ms per KB uploaded.
oSession["request-trickle-delay"] = ""+randInt(1,2000);
// Delay receives by 150ms per KB downloaded.
oSession["response-trickle-delay"] = ""+randInt(1,2000);
}
---------------------

 

 

这里的randInt(1,2000)应该很好理解,代表1-2000中的一个随机整数,这样就会出现偶尔有延迟偶尔网络又良好的情况 

原文:https://blog.csdn.net/u010618194/article/details/76652513 

Guess you like

Origin www.cnblogs.com/Horne/p/11131697.html