Inaccurate and inconsistent results in Google App Engine
See original GitHub issueI am receiving inaccurate, inconsistent results when running Lighthouse performance audits while deployed from Google App Engine. Not sure if it is Lighthouse or Puppeteer which isn’t playing nice in the Google App Engine environment. Below is the function I am calling.
const lighthouse = require('lighthouse')
const puppeteer = require('puppeteer')
async function launchPuppeteerRunLighthouse(url) {
try {
const browser = await puppeteer.launch({
args: [
'--no-sandbox',
'--incognito',
'--disable-gpu',
'--disable-dev-shm-usage',
'--disable-setuid-sandbox',
'--no-first-run',
'--no-zygote',
],
})
const port = browser._connection._url.slice(15, 20)
const { lhr, report } = await lighthouse(url, {
port,
output: 'html',
onlyCategories: ['performance'],
logLevel: 'debug',
})
browser.close();
return { report, lhr }
} catch (error) {
console.log(error)
}
}
Here is my app.yaml
runtime: nodejs8
instance_class: F4_1G
When I run a performance audit for https://www.google.com programmatically on my local development server I am observing results consistent with running the performance audit using Lighthouse located in Chrome Dev Tools.
When running the performance audit for https://www.google.com programmatically on Google App Engine I am receiving much lower performance scores.
I have tested in both environments with dozens of audits. I am attaching screenshots for what I would consider an average result of a performance audit of https://www.google.com in both environments.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (2 by maintainers)
Top GitHub Comments
After testing on a Google Compute Engine
n1-standard-2
instance, I am observing Lighthouse performance audits consistent with what I observe while testing in my local Chrome. Thank you @patrickhulce and @benschwarz for the recommendation.@patrickhulce @tostaylo we also faced the same kind of problems at @treosh. After moving to stable dedicated instance we increased results stability as well. Check out the public report for google.com https://treo.sh/demo/4/pages/5?interval=1year btw, @alekseykulikov is champion in that question 🥇