[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: add largest contentful paint to lantern and default config #9905

Merged
merged 50 commits into from
Nov 10, 2019

Conversation

connorjclark
Copy link
Collaborator
@connorjclark connorjclark commented Oct 31, 2019

(10 URLS, compared against G4s)
image

image

@connorjclark
Copy link
Collaborator Author

@patrickhulce finished a lantern collection on GCP.

image

@vercel vercel bot temporarily deployed to staging November 9, 2019 22:40 Inactive
@@ -53,6 +54,8 @@ class PredictivePerf extends Audit {
const ttfcpui = await LanternFirstCPUIdle.request({trace, devtoolsLog, settings}, context);
const si = await LanternSpeedIndex.request({trace, devtoolsLog, settings}, context);
const eil = await LanternEil.request({trace, devtoolsLog, settings}, context);
// TODO: we don't have LCP in the lantern test yet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move comment to L17?
also can you file an issue that tracks the trace-updating/calibration bit and drop the issue # here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/**
* @fileoverview Computed Largest Contentful Paint (LCP), the paint time of the largest in-viewport contentful element
* COMPAT: LCP's trace event was first introduced in m78. We can't surface an LCP for older Chrome versions
* @see https://github.com/WICG/largest-contentful-paint
* @see https://wicg.github.io/largest-contentful-paint/
* @see https://web.dev/largest-contentful-paint
*/

const makeComputedArtifact = require('../computed-artifact.js');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're inconsistent about this already. it looks 50/50 in a brief survey.

being inconsistent would suggest that we leave existing ones as they lie until we fix all of them at once. (i think that's what we've done before in similar situations... require('xx.js').. right?)

that said i dont think its important this time. so lets ignore this one.. just this one time. :)

"firstCPUIdle": 10075,
"firstCPUIdleTs": undefined,
"firstContentfulPaint": 8828,
"firstContentfulPaintTs": undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FCP, FMP, SI, and TTI flipped to undefined. i don't think that's expected is it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we went from devtools to simulate so i think these are expected to be undefined

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oic.

@@ -42,7 +42,7 @@ describe('Performance: metrics', () => {
},
};

const context = {settings: {throttlingMethod: 'devtools'}, computedCache: new Map()};
const context = {settings: {throttlingMethod: 'simulate'}, computedCache: new Map()};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't know the context here but this stands out.... is this deliberate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was devtools before because simulating wasn't an option for LCP :)

the other tests here use simulate

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha ok

Object {
"optimistic": 17637,
"pessimistic": 17637,
"timing": 17637,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😮 just noting that that 17s is a pretty huge LCP

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the trace this is at 1750ish ms

image

obviously this lantern lcp isn't perfect but i wouldnt expect that we'd have a 10x diff between observed and simulated.

would you mind looking into why it's so high?

@@ -527,6 +527,8 @@ declare global {
firstContentfulPaintEvt: TraceEvent;
/** The trace event marking firstMeaningfulPaint, if it was found. */
firstMeaningfulPaintEvt?: TraceEvent;
/** The trace event marking largestMeaningfulPaint, if it was found. */
largestMeaningfulPaintEvt?: TraceEvent;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

say whaaaaa?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

"firstCPUIdle": 10075,
"firstCPUIdleTs": undefined,
"firstContentfulPaint": 8828,
"firstContentfulPaintTs": undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oic.

@@ -42,7 +42,7 @@ describe('Performance: metrics', () => {
},
};

const context = {settings: {throttlingMethod: 'devtools'}, computedCache: new Map()};
const context = {settings: {throttlingMethod: 'simulate'}, computedCache: new Map()};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha ok

Object {
"optimistic": 17637,
"pessimistic": 17637,
"timing": 17637,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the trace this is at 1750ish ms

image

obviously this lantern lcp isn't perfect but i wouldnt expect that we'd have a 10x diff between observed and simulated.

would you mind looking into why it's so high?

});

it('should compute an observed value', async () => {
const settings = {throttlingMethod: 'provided'};
const context = {settings, computedCache: new Map()};
const result = await LargestContentfulPaint.request({trace, devtoolsLog, settings}, context);

assert.equal(Math.round(result.timing), 15024);
assert.equal(result.timestamp, 1671236939268);
assert.equal(Math.round(result.timing), 1744);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here's the observed numbers right?

this would only change with the trace changing.. i do see the trace changed but viewing the diff definitely isn't straightforward.

you had a trace before where the observed LCP was 15s ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah observed.

I guess I had a really bad trace before

@connorjclark connorjclark merged commit 7c5d86d into master Nov 10, 2019
@connorjclark connorjclark deleted the lcp-lantern branch November 10, 2019 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants