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

Lighthouse v6: cumulativeLayoutShift is rounded to 0 in metrics section #10486

Closed
alekseykulikov opened this issue Mar 20, 2020 · 3 comments · Fixed by #10728
Closed

Lighthouse v6: cumulativeLayoutShift is rounded to 0 in metrics section #10486

alekseykulikov opened this issue Mar 20, 2020 · 3 comments · Fixed by #10728
Assignees
Labels

Comments

@alekseykulikov
Copy link
Contributor

Provide the steps to reproduce

Run LH 6.0.0.beta on any URL

lighthouse https://www.apple.com/

What is the current behavior?

audits.metrics.details[0].cumulativeLayoutShift is 0

But audits.cumulative-layout-shift.numericValue is 0.19574185519748266.

What is the expected behavior?

I expect the value rounded to 3 decimals, like in the HTML Report: 0.196, because a good CLS value is 0.1 and it's a first float value in metrics.

The problem is related to this line of code: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/audits/metrics.js#L41

Environment Information

  • Affected Channels: All
  • Lighthouse version: v6.0.0.beta
  • Chrome version: v83.0.4090.0
  • Node.js version: v12
  • Operating System: Mac
@paulirish
Copy link
Member

Great catch. I'll take care of this.

@paulirish
Copy link
Member

@patrickhulce could you take this? should be quick

@patrickhulce
Copy link
Collaborator

sure thing 👍

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 a pull request may close this issue.

5 participants