I’m currently having intereset on how does lighthouse checks metrics of ‘unused javascript’.
What I’ve found so far is that, lighthouse uses puppetier to get unused javascript, and seems puppetier itself doesn’t contains logic. It seems all things are held by event drivenly.
I was focusing tracking where is the root of Profiler.takePreciseCoverage
or Profiler.startPreciseCoverage
since it is the command of getting JSCoverage.
But eventually, I’ve got stuck in module called ‘chrome-remote-interface’. It sends the command to websocket port numb 9222, and I can’t track anymore…
Anyone have inpected lighthouse before, pls give me advice..