hubcap throttle

Simulate slow network conditions using a throttling preset.

When to use

Simulate slow network conditions to test how a page performs under constrained bandwidth and high latency. Use offline to fully disconnect the browser from the network. Use block to block specific URLs rather than slowing all traffic.

Usage

hubcap throttle <preset> | --disable

Arguments

ArgumentTypeRequiredDescription
presetstringYes (when not disabling)Throttling profile to apply (e.g. 3g, slow3g, fast3g, 4g, wifi)

Flags

FlagTypeDefaultDescription
--disableboolfalseDisable network throttling and restore normal speed

Output

FieldTypeDescription
presetstringName of the applied preset (when enabling)
enabledbooleanWhether throttling is active (when enabling)
disabledbooleanWhether throttling was disabled (when disabling)

When a preset is applied:

{"preset":"3g","enabled":true}

When disabled:

{"disabled":true}

Errors

ConditionExit codeStderr
Unknown preset name1error: unknown preset "name"
Chrome not connected2error: connecting to Chrome: ...
Timeout3error: timeout

Examples

Simulate a 3G connection:

hubcap throttle 3g

Simulate a slow 3G connection:

hubcap throttle slow3g

Disable throttling:

hubcap throttle --disable

Throttle the network, load a page, and capture performance metrics:

hubcap throttle slow3g && hubcap goto https://example.com && hubcap metrics

See also

  • offline - Toggle offline mode for full network disconnection
  • block - Block specific URLs by pattern
  • network - Monitor network traffic