-
Notifications
You must be signed in to change notification settings - Fork 655
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
Desktop performance score lower in CLI than when testing in the browser #430
Comments
Thanks for filing @amannn! When you're running from the CLI (like LHCI does) form factor and throttling are controlled separately unlike Chrome DevTools which handles this behind the scenes for you (see desktop throttling profile). module.exports = {
ci: {
collect: {
settings: {
emulatedFormFactor: 'desktop',
throttling: {rttMs: 40, throughputKbps: 10 * 1024, cpuSlowdownMultiplier: 1},
}
}
} We'd welcome adding this example config to the docs if you're up for a PR :) |
We don't really want to drift from the official Lighthouse programmatic API. It's being considered over there for 7.0 if you want to chime in GoogleChrome/lighthouse#10910 |
Right, I see. I'll open a PR to add the desktop settings to the docs as you proposed above. |
@patrickhulce I am trying Lighthouse CLI and facing similar issue with huge difference on Lighthouse UI and Lighthouse CLI. I am running below command: I am getting a differnece of at least 20-25 in Lh score. What am i doing wrong? |
That's not really enough information to explain why. If you can share the full reports, we might be able to provide more assistance. (depending on metric values, 20-25 isn't that unexpected variance) |
@patrickhulce Please find the attached reports. Do you have any pointers? |
@ankityadav4 as patrick said the variance you are experiencing is not unexpected. There are a variety of reasons that the performance score of a page could change between runs. The page content is slightly different between the two reports, this could affect your performance score. Please read our variance docs for more help. |
I'm going to lock this issue as it is very old. If you have a similar issue, please read our variance docs before filing a new issue. |
I'm using
@lhci/cli
to test the desktop viewport of a web app I'm developing. I'm using theemulatedFormFactor: 'desktop'
setting.When running in
lhci
, I get this score:However when I run the test with the same exact URL in Chrome, I get this score:
I have no idea what is causing this.
Note that the mobile performance score of the same website is 100 in
lhci
– exactly the same as in Google Chrome.Do you have any pointers? The app is private, therefore I sadly can't share a reproduction at this point. Thank you for your help!
Versions:
The text was updated successfully, but these errors were encountered: