Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add predefined network profiles #1098

Merged
merged 6 commits into from
Nov 15, 2023
Merged

Conversation

ankur22
Copy link
Collaborator

@ankur22 ankur22 commented Nov 10, 2023

What?

Adding predefined network profiles No Throttling, Slow 3G and Fast 3G.

Why?

These are the most commonly used during frontend testing when throttling network connections.

These could have been defined in the type definitions repo. To make it simpler for our users to work with these network profiles, it's defined in the browser module repo which will make it available for browser module users.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Updates #887

@ankur22 ankur22 changed the base branch from main to add/cpu-throttle November 10, 2023 14:55
@ankur22 ankur22 changed the title Add/predefined network profiles Add predefined network profiles Nov 10, 2023
@ankur22 ankur22 force-pushed the add/predefined-network-profiles branch 2 times, most recently from 0d0a684 to d78d1b3 Compare November 10, 2023 17:30
@ankur22 ankur22 force-pushed the add/predefined-network-profiles branch from d78d1b3 to 95553a7 Compare November 10, 2023 17:32
common/networkProfile.go Outdated Show resolved Hide resolved
inancgumus
inancgumus previously approved these changes Nov 13, 2023
Copy link
Member

@inancgumus inancgumus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after renaming the file as @ka3de suggests. Thanks!

common/networkProfile.go Outdated Show resolved Hide resolved
common/networkProfile.go Outdated Show resolved Hide resolved
ka3de
ka3de previously approved these changes Nov 14, 2023
Copy link
Collaborator

@ka3de ka3de left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Base automatically changed from add/cpu-throttle to main November 14, 2023 16:06
@ankur22 ankur22 dismissed stale reviews from ka3de and inancgumus November 14, 2023 16:06

The base branch was changed.

@ankur22 ankur22 force-pushed the add/predefined-network-profiles branch from 9118e77 to 0f67e4a Compare November 14, 2023 16:12
This type now feels like it should live closer to where the predefined
network profiles have been defined.
These are common network profiles which are used in various chromium
based browsers. It feels like it's a safe bet that these will be the
most widely used network profiles. We intend to add more once we have a
clearer idea of what.
Instead of defining a custom network profile, use the predefined one
(slow 3g). This serves as a good example as to how to work with
predefined network profiles.
This will be useful when a user may want to disable the network
throttling half way through a test.
This was copied from https://stackoverflow.com/questions/48367042/in-chrome-dev-tools-what-is-the-speed-of-each-preset-option-for-network-throttl
which outlined what the numbers mean when calculating the download and
upload throughputs. We can use this to helps us create our own profiles
when we need.
@ankur22 ankur22 force-pushed the add/predefined-network-profiles branch from 0f67e4a to 884e4b9 Compare November 15, 2023 09:48
@ankur22 ankur22 requested a review from ka3de November 15, 2023 09:49
Copy link
Collaborator

@ka3de ka3de left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ankur22 ankur22 merged commit 226013e into main Nov 15, 2023
16 checks passed
@ankur22 ankur22 deleted the add/predefined-network-profiles branch November 15, 2023 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants