core(lantern): move lantern metrics to lib/lantern#15875
Merged
connorjclark merged 12 commits intomainfrom Mar 29, 2024
Merged
Conversation
0529ace to
6df3f36
Compare
6df3f36 to
f1c36ac
Compare
f1c36ac to
9836f5f
Compare
9836f5f to
a033ae0
Compare
adamraine
reviewed
Mar 27, 2024
core/test/lib/lantern/metrics/__snapshots__/first-meaningful-paint-test.js.snap
Outdated
Show resolved
Hide resolved
| * @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, settings?: LH.Audit.Context['settings'], URL?: LH.Artifacts.URL}} opts | ||
| */ | ||
| function getComputationDataFromFixture({trace, devtoolsLog, settings, URL}) { | ||
| settings = settings || {}; |
Contributor
There was a problem hiding this comment.
settings would always be filled out in a real scenario right? Maybe the fallback should be a copy of the default settings?
Collaborator
Author
There was a problem hiding this comment.
settings and devtoolslog and URL are not real input to the planned lantern library, but they are used here as that's what Lighthouse was using. this will be addressed in a followup pr (see above TODO)
speed index is only test that is passing a settings object
adamraine
approved these changes
Mar 28, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.