GoogleChrome / lighthouse

Automated auditing, performance metrics, and best practices for the web.
https://developer.chrome.com/docs/lighthouse/overview/
Apache License 2.0
28.27k stars 9.35k forks source link

core(lantern): move lantern metrics to lib/lantern #15875

Closed connorjclark closed 6 months ago

connorjclark commented 6 months ago

ref #15841

This moves the meat of all the computed lantern metrics to lib/lantern/metrics, leaving behind just a ComputedArtifact wrapper and a conversion from Lighthouse data to Lantern data.

A change to note is that the Lantern metrics now do not directly call what they depend on, but instead are expected to be called with any dependent metric values they require. This change was made to remove caching of results (the purpose of Lighthouse's ComputedArtifact) from the library.