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

core(audits): clarify diff between load-fast-enough-for-pwa's TTI and perf TTI #6286

Merged
merged 5 commits into from
Oct 25, 2018

Conversation

exterkamp
Copy link
Member

@exterkamp exterkamp commented Oct 16, 2018

Summary
In load-fast-enough-for-PWA the interactive when "provided" + mobile throttling is defaulted to force a simulated TTI, not the provided TTI (as shown in the top as the true TTI). @brendankenny remembers this being purposeful, but it does make inconsistent numbers. @patrickhulce do you have some context?

Instead, will provide clearer explanation for why the TTIs might be different.

TODO:
If we do want to revert to this pass through of settings we need to update a test in lighthouse-core/test/audits/load-fast-enough-for-pwa-test.js

Related Issues/PRs
fixes: #6284

@patrickhulce
Copy link
Collaborator

Yes this is intentional.

as shown in the top as the true TTI
True to whom? :)

When using provided the TTI returned is probably not 3G/4G, so it's not actually checking the purpose of the audit. If they use devtools or simulated with our approved settings it uses the same number, but they can't just run it on a fast connection to pass the "Page load is fast enough on mobile networks" audit :)

@exterkamp
Copy link
Member Author

@patrickhulce modified this to have branching text for when the TTI is overridden.

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.

PR probably needs a new name ;) LGTM!!

lighthouse-core/audits/load-fast-enough-for-pwa.js Outdated Show resolved Hide resolved
lighthouse-core/audits/load-fast-enough-for-pwa.js Outdated Show resolved Hide resolved
@brendankenny brendankenny changed the title core(audits): made TTI strongly consistent in Audits core(audits): clarify diff between load-fast-enough-for-pwa's TTI and perf metric's Oct 17, 2018
@brendankenny
Copy link
Member

@exterkamp I know you have a lot on your plate, but do you want to take another look?

@exterkamp exterkamp changed the title core(audits): clarify diff between load-fast-enough-for-pwa's TTI and perf metric's core(audits): clarify diff between load-fast-enough-for-pwa's TTI and perf TTI Oct 23, 2018
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 % nits!

const override = context.settings.throttlingMethod === 'provided' ||
!isDeepEqual(context.settings.throttling, mobileThrottling);

const displayValueFinal = override?displayValueTextWithOverride: displayValueText;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: spacing :)


const displayValueFinal = override?displayValueTextWithOverride: displayValueText;

const settings = override ? Object.assign({}, context.settings, settingOverrides):
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: spacing before : :)

Copy link
Member

Choose a reason for hiding this comment

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

heh, updated linting is failing travis on this now :P

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

yeah, just more comment/test description nits from me, otherwise LGTM!

lighthouse-core/audits/load-fast-enough-for-pwa.js Outdated Show resolved Hide resolved
@paulirish paulirish merged commit 8abe545 into master Oct 25, 2018
@paulirish paulirish deleted the bug/TTI-diff branch October 25, 2018 23:12
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.

TTI Metric in PWA & performance reports do not match
4 participants