[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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
ec75de3
first pass
connorjclark Sep 20, 2019
183b080
update
connorjclark Sep 20, 2019
03f8ab6
i18n
connorjclark Sep 20, 2019
52a8d28
typos
connorjclark Sep 20, 2019
4e2e688
metrics
connorjclark Sep 20, 2019
f1836a0
ts
connorjclark Sep 20, 2019
449c7c5
fix
connorjclark Sep 20, 2019
d821da7
Apply suggestions from code review
connorjclark Sep 20, 2019
9cc6b8c
todo
connorjclark Sep 20, 2019
211a90b
fix lcp
connorjclark Sep 20, 2019
ee9f34e
update sample trace
connorjclark Sep 20, 2019
24db2ed
tweaks
connorjclark Sep 20, 2019
308f0fe
fix metrics-test
connorjclark Sep 20, 2019
33fecc9
rename all those pwa trace requires
connorjclark Sep 20, 2019
2b87da0
just update all the metric snapshots
connorjclark Sep 20, 2019
c473bf5
undo tests
connorjclark Sep 23, 2019
26bb02a
m79 in metrics test
connorjclark Sep 23, 2019
b848a73
m60
connorjclark Sep 23, 2019
967d630
lcp metric trace test
connorjclark Sep 24, 2019
5b80688
Merge remote-tracking branch 'origin/master' into lcp
connorjclark Sep 27, 2019
9da66f9
pr
connorjclark Sep 27, 2019
49aa30a
Update lighthouse-core/lib/tracehouse/trace-processor.js
connorjclark Sep 27, 2019
a71ab04
Merge branch 'lcp' of github.com:GoogleChrome/lighthouse into lcp
connorjclark Sep 27, 2019
7fd52f4
Apply suggestions from code review
connorjclark Sep 30, 2019
f351590
update traces
connorjclark Oct 1, 2019
ff42528
minify trace
connorjclark Oct 1, 2019
e93e396
first pass
connorjclark Oct 15, 2019
9103431
wip
connorjclark Oct 15, 2019
a3fade6
fix print
connorjclark Oct 29, 2019
567efc2
improve
connorjclark Oct 29, 2019
459a1de
Merge remote-tracking branch 'origin/master' into lcp-lantern
connorjclark Oct 30, 2019
a0b31db
lint, update with master
connorjclark Oct 30, 2019
045b829
add lcp to default config
connorjclark Oct 30, 2019
498df14
fix tests
connorjclark Oct 30, 2019
7bb9d86
rm stuff
connorjclark Oct 30, 2019
de48435
Merge remote-tracking branch 'origin/master' into lcp-lantern
connorjclark Nov 8, 2019
eb3599e
pr
connorjclark Nov 8, 2019
6d12f11
Apply suggestions from code review
connorjclark Nov 9, 2019
fa7f089
lint. line length
paulirish Nov 9, 2019
42b7ad1
fix lantern test
connorjclark Nov 9, 2019
8b5cce0
Merge remote-tracking branch 'origin/master' into lcp-lantern
connorjclark Nov 9, 2019
ce0042b
fix tests
connorjclark Nov 9, 2019
bbc5030
fix trace processor test
connorjclark Nov 9, 2019
9812701
rm common prefix
connorjclark Nov 9, 2019
e0a04b7
fix cli test
connorjclark Nov 9, 2019
2d34e65
delete old test
connorjclark Nov 9, 2019
6a1fdb7
pr
connorjclark Nov 9, 2019
1579ccb
comment
connorjclark Nov 9, 2019
5fc5db0
Merge remote-tracking branch 'origin/master' into lcp-lantern
connorjclark Nov 10, 2019
98f3ea2
use a better trace for lcp
connorjclark Nov 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
i18n
  • Loading branch information
connorjclark committed Sep 20, 2019
commit 03f8ab6ed70a45709aead40c23741bf56d39ac82
6 changes: 3 additions & 3 deletions lighthouse-core/audits/metrics/largest-contentful-paint.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ const i18n = require('../../lib/i18n/i18n.js');
const ComputedLcp = require('../../computed/metrics/largest-contentful-paint.js');

const UIStrings = {
/** The name of the metric that marks the time at which the first text or image is painted by the browser. Shown to users as the label for the numeric metric value. Ideally fits within a ~40 character limit. */
/** The name of the metric that marks the time at which the largest text or image is painted by the browser. Shown to users as the label for the numeric metric value. Ideally fits within a ~40 character limit. */
title: 'Largest Contentful Paint',
/** Description of the First Contentful Paint (FCP) metric, which marks the time at which the first text or image is painted by the browser. This is displayed within a tooltip when the user hovers on the metric name to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
/** Description of the Largest Contentful Paint (LCP) metric, which marks the time at which the largest text or image is painted by the browser. This is displayed within a tooltip when the user hovers on the metric name to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Largest Contentful Paint marks the time at which the first text or image is ' +
`painted. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-contentful-paint).`,
`painted. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/largest-contentful-paint).`,
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
6 changes: 6 additions & 0 deletions lighthouse-core/lib/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,12 @@
"lighthouse-core/audits/metrics/interactive.js | title": {
"message": "Time to Interactive"
},
"lighthouse-core/audits/metrics/largest-contentful-paint.js | description": {
"message": "Largest Contentful Paint marks the time at which the first text or image is painted. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/largest-contentful-paint)."
},
"lighthouse-core/audits/metrics/largest-contentful-paint.js | title": {
"message": "Largest Contentful Paint"
},
"lighthouse-core/audits/metrics/max-potential-fid.js | description": {
"message": "The maximum potential First Input Delay that your users could experience is the duration, in milliseconds, of the longest task. [Learn more](https://developers.google.com/web/updates/2018/05/first-input-delay)."
},
Expand Down
6 changes: 6 additions & 0 deletions lighthouse-core/lib/i18n/locales/en-XL.json
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,12 @@
"lighthouse-core/audits/metrics/interactive.js | title": {
"message": "T̂ím̂é t̂ó Îńt̂ér̂áĉt́îv́ê"
},
"lighthouse-core/audits/metrics/largest-contentful-paint.js | description": {
"message": "L̂ár̂ǵêśt̂ Ćôńt̂én̂t́f̂úl̂ Ṕâín̂t́ m̂ár̂ḱŝ t́ĥé t̂ím̂é ât́ ŵh́îćĥ t́ĥé f̂ír̂śt̂ t́êx́t̂ ór̂ ím̂áĝé îś p̂áîńt̂éd̂. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/tools/lighthouse/audits/largest-contentful-paint)."
},
"lighthouse-core/audits/metrics/largest-contentful-paint.js | title": {
"message": "L̂ár̂ǵêśt̂ Ćôńt̂én̂t́f̂úl̂ Ṕâín̂t́"
},
"lighthouse-core/audits/metrics/max-potential-fid.js | description": {
"message": "T̂h́ê ḿâx́îḿûḿ p̂ót̂én̂t́îál̂ F́îŕŝt́ Îńp̂út̂ D́êĺâý t̂h́ât́ ŷóûŕ ûśêŕŝ ćôúl̂d́ êx́p̂ér̂íêńĉé îś t̂h́ê d́ûŕât́îón̂, ín̂ ḿîĺl̂íŝéĉón̂d́ŝ, óf̂ t́ĥé l̂ón̂ǵêśt̂ t́âśk̂. [Ĺêár̂ń m̂ór̂é](https://developers.google.com/web/updates/2018/05/first-input-delay)."
},
Expand Down
88 changes: 47 additions & 41 deletions lighthouse-core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@
"numericValue": 3969.136,
"displayValue": "4.0 s"
},
"largest-contentful-paint": {
"id": "largest-contentful-paint",
"title": "Largest Contentful Paint",
"description": "Largest Contentful Paint marks the time at which the first text or image is painted. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/largest-contentful-paint).",
"score": null,
"scoreDisplayMode": "error",
"errorMessage": "Something went wrong with recording the trace over your page load. Please run Lighthouse again. (NO_FMP)"
},
"load-fast-enough-for-pwa": {
"id": "load-fast-enough-for-pwa",
"title": "Page load is fast enough on mobile networks",
Expand Down Expand Up @@ -1241,47 +1249,8 @@
"title": "Metrics",
"description": "Collects all available metrics.",
"score": null,
"scoreDisplayMode": "informative",
"numericValue": 4927.278,
"details": {
"type": "debugdata",
"items": [
{
"firstContentfulPaint": 3969,
"firstContentfulPaintTs": 185607289047,
"firstMeaningfulPaint": 3969,
"firstMeaningfulPaintTs": 185607289048,
"firstCPUIdle": 4927,
"firstCPUIdleTs": 185608247190,
"interactive": 4927,
"interactiveTs": 185608247190,
"speedIndex": 4417,
"speedIndexTs": 185607736912,
"estimatedInputLatency": 16,
"totalBlockingTime": 117,
"observedNavigationStart": 0,
"observedNavigationStartTs": 185603319912,
"observedFirstPaint": 3969,
"observedFirstPaintTs": 185607289043,
"observedFirstContentfulPaint": 3969,
"observedFirstContentfulPaintTs": 185607289047,
"observedFirstMeaningfulPaint": 3969,
"observedFirstMeaningfulPaintTs": 185607289048,
"observedTraceEnd": 10281,
"observedTraceEndTs": 185613601189,
"observedLoad": 4924,
"observedLoadTs": 185608244374,
"observedDomContentLoaded": 4901,
"observedDomContentLoadedTs": 185608220734,
"observedFirstVisualChange": 3969,
"observedFirstVisualChangeTs": 185607288912,
"observedLastVisualChange": 4791,
"observedLastVisualChangeTs": 185608110912,
"observedSpeedIndex": 4417,
"observedSpeedIndexTs": 185607736763
}
]
}
"scoreDisplayMode": "error",
"errorMessage": "Something went wrong with recording the trace over your page load. Please run Lighthouse again. (NO_FMP)"
},
"offline-start-url": {
"id": "offline-start-url",
Expand Down Expand Up @@ -3394,6 +3363,11 @@
"weight": 1,
"group": "metrics"
},
{
"id": "largest-contentful-paint",
"weight": 0,
"group": "metrics"
},
{
"id": "speed-index",
"weight": 4,
Expand Down Expand Up @@ -4223,6 +4197,18 @@
"duration": 100,
"entryType": "measure"
},
{
"startTime": 0,
"name": "lh:audit:largest-contentful-paint",
"duration": 100,
"entryType": "measure"
},
{
"startTime": 0,
"name": "lh:computed:LargestContentfulPaint",
"duration": 100,
"entryType": "measure"
},
{
"startTime": 0,
"name": "lh:audit:load-fast-enough-for-pwa",
Expand Down Expand Up @@ -5222,6 +5208,26 @@
"lighthouse-core/audits/metrics/first-meaningful-paint.js | description": [
"audits[first-meaningful-paint].description"
],
"lighthouse-core/audits/metrics/largest-contentful-paint.js | title": [
"audits[largest-contentful-paint].title"
],
"lighthouse-core/audits/metrics/largest-contentful-paint.js | description": [
"audits[largest-contentful-paint].description"
],
"lighthouse-core/lib/lh-error.js | badTraceRecording": [
{
"values": {
"errorCode": "NO_FMP"
},
"path": "audits[largest-contentful-paint].errorMessage"
},
{
"values": {
"errorCode": "NO_FMP"
},
"path": "audits.metrics.errorMessage"
}
],
"lighthouse-core/audits/load-fast-enough-for-pwa.js | title": [
"audits[load-fast-enough-for-pwa].title"
],
Expand Down