Open Bug 1471539 Opened 6 years ago Updated 3 days ago

Custom Throttling

Categories

(DevTools :: Netmonitor, enhancement)

62 Branch
enhancement

Tracking

(firefox62 affected)

Tracking Status
firefox62 --- affected

People

(Reporter: dave.hawkins, Unassigned)

References

(Blocks 1 open bug)

Details

Network performance can be throttled to a number of presets. However it doesn't seem to be possible to customise this, ie provide a user-defined throttle. I would like to be able to add my own bandwidth and latency settings to simulate our typical user connections, for example, accessing our web servers over a WAN with particular characteristics. (This is supported in Chrome.) Also, it's not clear what the bandwidth and latency of the presets are. Without that information they aren't really that useful.
Note that the presets are defined here: https://developer.mozilla.org/en-US/docs/Tools/Responsive_Design_Mode#Network_throttling but strangely not here: https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor#Throttling However I'm really expecting this to be clear within the network monitor UI itself.
Thanks for the note about the documentation difference. I updated the Network Monitor page to include the details. The current profiles are defined here: https://searchfox.org/mozilla-central/source/devtools/client/shared/components/throttling/profiles.js They were based on the default profiles available in Chrome in 2016, but they have changed their list since then.

This would be very useful to me for developing browser applications. I would like to simulate a long ping (500-1000ms) to inspect how loading states are handled across the app. Perhaps it's more about simulating a server load rather than a network condition, but a custom throttling rule would work here.

When testing loader in a web application, it is much more useful to have a profile with high latency and unlimited bandwidth.

I don't think it's useful to hardcode a new profile for this, but being able to customize a throttling profile (even only in about:config) would be a great tool.

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Although I don't like doing this, I have to resort to using Edge (chrome) or Google chrome...
The median fixed broadband speed as of April 2022 is ~64 Mbps (https://www.speedtest.net/global-index).

It would be very helpful to have a setting of 40-50 Mbps or greater. Currently, the fastest option is Wi-Fi (30 Mbps)...

Link for the presets for "Responsive Design Mode":
https://firefox-source-docs.mozilla.org/devtools-user/responsive_design_mode/index.html#network-throttling

Link for the (same, shared) presets for "Network panel":
https://firefox-source-docs.mozilla.org/devtools-user/network_monitor/throttling/index.html

Julian, do you recall any rules/guidelines we should follow when adding new profiles to the list?
The customization isn't on our roadmap atm, but perhaps we could add built-in profiles (e.g. 40 Mbps and 50 Mbps)?

Link to the code where the profiles are hardcoded:
https://searchfox.org/mozilla-central/rev/70cf6863bd85af2a3188ec1fe5209a3ec1b2de86/devtools/client/shared/components/throttling/profiles.js#14

Flags: needinfo?(jdescottes)

I don't remember any guideline around this, and quickly reading the implementation bug, I don't see anything obvious either. The current profiles don't depend on anything on platform side, so it's only a matter of adding new entries and finding a meaningful name for them. 2Mbps for DSL and 30 for WiFi really feel outdated.

We can add one or two new profiles, but I agree that the sensible thing here is to add a way to create custom profiles. I don't think it should be very complicated, but there's still additional UI, localization and tests to write. Maybe for now we can add a Good WiFi option to follow what we did for mobile connections.

Flags: needinfo?(jdescottes)

I'd argue to call it Highspeed / Fast Broadband or something, instead of good wifi.
Some examples used industry here: https://en.wikipedia.org/wiki/Broadband#Speed_qualifiers

I agree that "good wifi" is not a great name overall, as long as users understand that the other profile is slightly better.
I was playing a bit with the feature, before we add configuration options, it should be easy to add a "tooltip" on the button which gives the details about the profile (download/upload/latency). Let's file bugs for the other items and keep this one to support custom throttling.

See Also: → 1770882
See Also: → 1770883

(In reply to joedf from comment #8)

Interesting, I've noticed that this page uses MB/s (a mistake?):
https://firefox-source-docs.mozilla.org/devtools-user/responsive_design_mode/index.html#network-throttling

and the other is correctly using Mbps:
https://firefox-source-docs.mozilla.org/devtools-user/network_monitor/throttling/index.html

Thanks for spotting this, will be fixed in Bug 1770882

Bug created for the profile list update:

Bug 1770893 - Update throttling profile list

(In reply to Julian Descottes [:jdescottes] from comment #11)

I agree that "good wifi" is not a great name overall, as long as users understand that the other profile is slightly better.
I was playing a bit with the feature, before we add configuration options, it should be easy to add a "tooltip" on the button which gives the details about the profile (download/upload/latency). Let's file bugs for the other items and keep this one to support custom throttling.

Agreed, and great idea! That would help immensely. Come to think, I have looked up the speeds quite a few times.

Severity: normal → S3

Hello everyone, I work in QA and we use the devtools throttling options for testing purposes. The slowest option is not sufficiently slow for us and I was wondering, if this capability will not be included any time soon, if there was a way that we could manually add more throttling options perhaps by doing manual changes either through javascript or adding an extra file or making changes to pre-existing ones. I appreciate the help. Thanks

Opened 5 years ago!
It is important feature for debugging and testing usability. If the development team prefer to keep Throttling hard coded, they have to, at least, add an extra profile that simulate Dialup modem at 56K with long latency i.e. 1500ms.

I agree, also to measure the loading speed of web pages / apps / iframes etc, we need a tool that will limit connection speed withou any additional lag, so custom profile of a stable 8Mbps internet UP / DOWN is required to have reliable loading speed data source. Please please please add this as well.

You need to log in before you can comment on or make changes to this bug.