模拟最烂的网速
How to install Apple’s Network Link Conditioner
Instructions current as of December 8, 2014 – OS X Yosemite 10.10
-
Install Xcode if you don’t have it
-
Open XCode and go to Xcode › Open Developer Tool › More Developer Tools…
-
Download Hardware IO Tools for Xcode
-
Open the downloaded disk image and double-click the .prefpane to install it.
-
There we go!
-
Be sure to turn it on. You need to select a profile and enable the network conditioner with the big toggle that should be familiar from the Time Machine prefpane.
Caveat
This won't affect localhost, so be sure to use a staging server or co-worker's computer to simulate slow network connections to an API you’re running yourself. You may find https://ngrok.com/helpful in this regard.