Skip to content

Does numberOfRuns create a new context for each run? #546

Answered by patrickhulce
zshnr asked this question in Q&A
Discussion options

You must be logged in to vote

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?

Yes that's 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).

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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zshnr
Comment options

Answer selected by zshnr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants