-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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(screenshots): align filmstrip to observed metrics #4965
Conversation
const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS]; | ||
const metricComputationData = {trace, devtoolsLog, settings: context.settings}; | ||
const ttci = artifacts.requestConsistentlyInteractive(metricComputationData); | ||
alternativeMaximumValue = (await ttci.catch(() => ({timing: 0}))).timing; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ha, I'm not sure I'm wild about this approach. try/catch is ugly, but this makes it look like it's doing something much more complicated than it is :S
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed :P
data: base64Data, | ||
const speedline = await artifacts.requestSpeedline(trace); | ||
|
||
let alternativeMaximumValue = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment why there needs to be an alternativeMaximumValue
? (there's a comment below but maybe some variant should be up here so you don't spend too long thinking about it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah good call, done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
followup fix as promised in #4951
(easier with https://github.com/GoogleChrome/lighthouse/pull/4965/files?w=1)