2

I have XAMPP running on localhost on Windows 7. I was trying to find a way to simulate the bandwidth of dialup and 3G connections.

Is there a current solution which works on a localhost and Windows 7 and is reasonably straight-forward to enable and disable as necessary?

Force Flow
  • 714
  • 2
  • 14
  • 34

3 Answers3

2

The easiest way to use Chrome developer tools. On network tab, there is feature to throttle bandwidth in different use cases.

majapahit
  • 71
  • 9
1

Chales proxy includes a bandwidth throttle.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
0

You can use @sitespeed.io/throttle - an npm package.

Example:

# simulate slow 3g connection on localhost
npx @sitespeed.io/throttle 3gslow --localhost

# throttle localhost with roundtrip time of 200ms
npx @sitespeed.io/throttle --rtt 200 --localhost
    
# later when you are done,... stop throttling
npx @sitespeed.io/throttle --stop --localhost

Note that throttle requires sudo, and will prompt for user login.

Alternatively, throttle can be used programmatically in NodeJS. Example (copied from docs):

const throttle = require('@sitespeed.io/throttle');
// Returns a promise
const options = {up: 360, down: 780, rtt: 200};
await throttle.start(options);
// Do your thing and then stop
await throttle.stop();

See the documentation for more options.

Prince Odame
  • 534
  • 7
  • 17