Does numberOfRuns create a new context for each run? #546
-
Hello! I went through the code before I posted this just to double check my understanding. The way I read the lighthouse-ci code is that it creates one instance of puppeteer and one instance of the browser inside puppeteer. And in that instance, runs the benchmark either once or as many times as specified by the numberOfRuns property. Is this correct? The reason I ask is for our use case it would've been ideal if each run was a separate browser context (ideally incognito). It is ok if that is not the case, I might end up writing our own puppeteer script to collect results and upload to our internal CI server then. But I just wanted to be sure before I went down that route. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes that's correct.
Can your use case be satisfied by clearing storage for the origin using the DevTools protocol instead? Lighthouse does this by default but only for a few types of storage. If you want a clean slate like incognito you could instead invoke Storage.clearDataForOrigin in a LHCI puppeteer script for anything you want to reset in between runs? |
Beta Was this translation helpful? Give feedback.
Yes that's correct.
Can your use case be satisfied by clearing storage for the origin using the DevTools protocol instead? Lighthouse does this by default but only for a few types of storage. If you want a clean slate like incognito you could instead invoke Storage.clearDataForOrigin in a LHCI puppeteer s…