-
Notifications
You must be signed in to change notification settings - Fork 43
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
Performance numbers are on the extreme ends of the Prism when used Lighthouse chrome browser Plugin versus Cypress Audit library #89
Comments
It may (and will) vary depending:
And probably many other things that I don't have in mind. It's important to remember that this module uses the lighthouse node module with Cypress. Cypress is not free for the machine and it's possible that the lighthouse module may be different from the one ship in the browser. I honestly don't have a strong answer to this question. The only thing I know is that there is a lot to consider in order to make "an accurate" difference (which again, might not be accurate because lighthouse can't be 100% deterministic). |
Hi, LH CI: cypress-audit:
In both cases, the final performance score will be the same (LH CI = 40, cypress-audit = 40) but when I added a --preset=desktop flag LH CI perf score will be 95 -> the same result is visible also in lighthouse chrome dev tool the same change for cypress-audit:
performance score will be still 40. Something is wrong with preset flag?
maybe you are using somewhere in your project --config-path and --preset was overridden? |
Thank you so much for the help you provided @rad-der 🙏🏻 . This is awesome 👍🏻 |
I've found bypass solution, it's not ideal but works. screenEmulation: const DESKTOP_EMULATION_METRICS = {
mobile: false,
width: 1350,
height: 940,
deviceScaleFactor: 1,
disabled: false,
}; throttling: desktopDense4G: {
rttMs: 40,
throughputKbps: 10 * 1024,
cpuSlowdownMultiplier: 1,
requestLatencyMs: 0, // 0 means unset
downloadThroughputKbps: 0,
uploadThroughputKbps: 0,
} const customThresholds = {
performance: 90,
}
const desktopConfig = {
formFactor: 'desktop',
screenEmulation: {
width: 1350,
height: 940,
deviceScaleRatio: 1,
mobile: false,
disable: false,
},
throttling: {
rttMs: 40,
throughputKbps: 11024,
cpuSlowdownMultiplier: 1,
requestLatencyMs: 0,
downloadThroughputKbps: 0,
uploadThroughputKbps: 0,
},
}
cy.lighthouse(customThresholds, desktopConfig) |
Hello, quick follow-up on this issue. I have added a section in the LH docs to suggest using the settings provided by @maciejtrzcinski => https://github.com/mfrachet/cypress-audit/blob/master/docs/lighthouse.md#lighthouse-scores-may-be-different-between-local-run-and-cypress-audit I would like to take some time with this before making them as default inside the library. If we see again this kind of issues, I'll put them as default and iterate from that :). Thanks again everyone for this 🙏🏻 . Closing for now 😊 |
@mfrachet - link seems to be broken, could you please update |
When I run the Perf testing for google page using the chrome lighthouse plugin the numbers are 100s and 90s. I do the same using the cypress-audit library using cy.lighthouse the numbers are like 40s and 50s.
Same goes with the other pages that Im currently working on my project. I was wondering as to why there's such a huge gap.
The text was updated successfully, but these errors were encountered: