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

Performance budgets are erroring in 8.4.0-plus1 #2307

Closed
gidztech opened this Issue Feb 12, 2019 · 7 comments

Comments

Projects
None yet
2 participants
@gidztech
Copy link
Contributor

gidztech commented Feb 12, 2019

I'm trying to use the sitespeedio/sitespeed.io:8.4.0-plus1 image, which includes the Lighthouse plugin. However, when adding budget configuration, I get the following error:

[2019-02-12 11:24:58] INFO: Got https://www.sitespeed.io/ analysed from Google Page Speed Insights
[2019-02-12 11:24:58] ERROR: TypeError: Cannot read property 'requests' of undefined
    at verify (/usr/src/app/lib/plugins/budget/verify.js:58:32)
    at Object.processMessage (/usr/src/app/lib/plugins/budget/index.js:36:9)
    at queue.process.message (/usr/src/app/lib/core/queueHandler.js:211:32)
    at drainItem (/usr/src/app/node_modules/concurrent-queue/index.js:96:21)
    at Immediate.drain [as _onImmediate] (/usr/src/app/node_modules/concurrent-queue/index.js:77:84)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)

I'm running the following command (in Windows):

docker run --rm -v "%cd%":/sitespeed.io sitespeedio/sitespeed.io:8.4.0-plus1 --outputFolder output --budget.configPath sitespeed.io/budget.json --budget.output junit https://www.sitespeed.io/ -n 1

If I use the default image, i.e. remove the 8.4.0-plus1 tag, there are no errors and I see the junit report.

@soulgalore soulgalore added the bug label Feb 12, 2019

@soulgalore

This comment has been minimized.

Copy link
Member

soulgalore commented Feb 12, 2019

Hi @gidztech thanks for filing the issue. GPSI and Lighthouse (or WebPageTest) doesn't support the new budget format (yet) (however it shouldn't give an error in the log + we should document it). The old one works: https://www.sitespeed.io/documentation/sitespeed.io/performance-budget/#budget-configuration-using-the-internal-data-structrure

I'll fix the error, document and then we need to do follow to support other tools.

Best
Peter

@gidztech

This comment has been minimized.

Copy link
Contributor Author

gidztech commented Feb 12, 2019

@soulgalore Thanks Peter for the super fast response and for looking into it!

soulgalore added a commit that referenced this issue Feb 12, 2019

soulgalore added a commit that referenced this issue Feb 12, 2019

@soulgalore

This comment has been minimized.

Copy link
Member

soulgalore commented Feb 12, 2019

@gidztech don't spend so much time out, I can make a push tonight or early tomorrow where I can include the most important metrics for Lighthouse/GPSI/WebPageTest, I had it on the list but had other things I wanted to do first.

@gidztech

This comment has been minimized.

Copy link
Contributor Author

gidztech commented Feb 13, 2019

@soulgalore I'm having another problem with the budgets here. I'm now using the standard version without Lighthouse, using the new budget format (just an example below):

{
  "budget": {
    "requests": {
        "total": 60
    },
    "score": {
      "accessibility": 75,
      "bestpractice": 75,
      "privacy": 75,
      "performance": 75
    }
  }
}

However, in the junit.xml output, I'm getting some results where the limit min is undefined. For example, "bestpractice is 68 and limit min undefined". I'm not sure what "limit min" is meant to mean, but I assumed it meant to show the min score as set in the budget file.

Interestingly, if I set all the budgets to 100, then every result is undefined.

soulgalore added a commit that referenced this issue Feb 13, 2019

Budget fix (#2309)
* Take care of non supported budget from other tools #2307

* Support WebPageTest, Lighthouse and GPSI in the simple budget format

soulgalore added a commit that referenced this issue Feb 13, 2019

@soulgalore

This comment has been minimized.

Copy link
Member

soulgalore commented Feb 13, 2019

Hi @gidztech sorry for the late reply, been home with a sick child today and always stay away from the computer when I do that.

There was a typeo in JunitXML introduced when I added the JSON output format, I've pushed a fix and will roll it out later tonight.

Best
Peter

soulgalore added a commit that referenced this issue Feb 13, 2019

@soulgalore

This comment has been minimized.

Copy link
Member

soulgalore commented Feb 13, 2019

The JUnit fix and using WebPageTest/Lighthouse/GPSI has been fixed in 8.5.0, checkout which budget metrics you can use: https://www.sitespeed.io/documentation/sitespeed.io/performance-budget/#full-example

@gidztech

This comment has been minimized.

Copy link
Contributor Author

gidztech commented Feb 27, 2019

I can confirm that the budgets are working for me using the new version. Thanks for fixing that! 👍

@gidztech gidztech closed this Feb 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.