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

clients(devtools): use the same desktop throttling as lightrider #10322

Merged
merged 4 commits into from
Feb 25, 2020

Conversation

connorjclark
Copy link
Collaborator

fixes #10315

I was going to make a shared desktop config and rely on config inheritance, but it turns out that we only support inheriting from the default config :)

@connorjclark connorjclark requested a review from a team as a code owner February 12, 2020 02:20
@connorjclark connorjclark requested review from exterkamp and removed request for a team February 12, 2020 02:20
* @return {LH.Config.Json}
*/
function getDefaultConfigForCategories(categoryIDs) {
function createConfig(categoryIDs, device) {
Copy link
Collaborator Author

@connorjclark connorjclark Feb 12, 2020

Choose a reason for hiding this comment

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

cc @chruxin maybe a breaking change for you

// Using a "broadband" connection type
// Corresponds to "Dense 4G 25th percentile" in https://docs.google.com/document/d/1Ft1Bnq9-t4jK5egLSOc28IL4TvR-Tt0se_1faTA4KTY/edit#heading=h.bb7nfy2x9e5v
desktopDense4G: {
rttMs: 40,
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we set requestLatencyMs: 0, downloadThroughputKbps: 0, uploadThroughputKbps: 0 for no throttling when --throttling-method=devtools?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

would this be done in just the dt entry's createConfig?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

bump :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I assumed we'd set it on this same object like we do for mobile settings

Copy link
Collaborator Author

@connorjclark connorjclark Feb 19, 2020

Choose a reason for hiding this comment

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

tbh I've lost the thread here and have no idea how to synthesize what you're saying :')

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

but you said when --throttling-method=devtools, so what about for when throttling is set to simulated? That's why I thought this might need to be done in createConfig, behind a check for the throttling method

and is this what we want for lr-desktop-config too?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Well adding these here is just going to be a noop when --throttling-method=simulate, I was distinguishing that this object should cover both throttling cases like the mobile 4g ones do above.

Copy link
Member

Choose a reason for hiding this comment

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

+1 to adding =0, imo is more explicit and matches the pattern of all of the ones above.

Copy link
Collaborator

Choose a reason for hiding this comment

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

did we decide not to do this? my suggestion seems to have a +1 from shane :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i forgot to push

clients/devtools-entry.js Show resolved Hide resolved
@patrickhulce
Copy link
Collaborator

Either way this PR will have a Chromium counterpart correct?

@connorjclark
Copy link
Collaborator Author

connorjclark commented Feb 12, 2020

Either way this PR will have a Chromium counterpart correct?

Yeah. Even without this change there is. The last change to this file was post-5.7, and it completely changed the interface. #10241 tracks it.

Copy link
Member

@exterkamp exterkamp left a comment

Choose a reason for hiding this comment

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

This looks fine to me. Looks like it has been hashed out by others. I'm fine to land this once the last bit of nit's are worked out.

Is this ready to go at this point?

// Using a "broadband" connection type
// Corresponds to "Dense 4G 25th percentile" in https://docs.google.com/document/d/1Ft1Bnq9-t4jK5egLSOc28IL4TvR-Tt0se_1faTA4KTY/edit#heading=h.bb7nfy2x9e5v
desktopDense4G: {
rttMs: 40,
Copy link
Member

Choose a reason for hiding this comment

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

+1 to adding =0, imo is more explicit and matches the pattern of all of the ones above.

@connorjclark
Copy link
Collaborator Author

Is this ready to go at this point?

I think so?

@connorjclark
Copy link
Collaborator Author

@paulirish @patrickhulce I think one of you should sanity check :)

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

if the extra throttling properties issue has been resolved another way I'm unaware of then LGTM :)

clients/devtools-entry.js Show resolved Hide resolved
clients/devtools-entry.js Show resolved Hide resolved
// Using a "broadband" connection type
// Corresponds to "Dense 4G 25th percentile" in https://docs.google.com/document/d/1Ft1Bnq9-t4jK5egLSOc28IL4TvR-Tt0se_1faTA4KTY/edit#heading=h.bb7nfy2x9e5v
desktopDense4G: {
rttMs: 40,
Copy link
Collaborator

Choose a reason for hiding this comment

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

did we decide not to do this? my suggestion seems to have a +1 from shane :)

@vercel vercel bot temporarily deployed to Preview February 25, 2020 03:05 Inactive
Co-Authored-By: Patrick Hulce <patrick.hulce@gmail.com>
Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

LGTM

@patrickhulce
Copy link
Collaborator

GH comment editor somehow added trailing spaces though sorry 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chrome 80 - Desktop throttling profile not using lr-desktop-config
6 participants