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: remove estimated-input-latency and first-cpu-idle #12553

Merged
merged 11 commits into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
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
6 changes: 2 additions & 4 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ module.exports = {
onlyAudits: [
'first-meaningful-paint',
'speed-index',
'first-cpu-idle',
'interactive',
],
},
Expand Down Expand Up @@ -127,8 +126,7 @@ The audits property controls which audits to run and include with your Lighthous
```js
{
audits: [
'first-meaningful-paint',
'first-cpu-idle',
'first-contentful-paint',
'byte-efficiency/uses-optimized-images',
]
}
Expand All @@ -150,7 +148,7 @@ The categories property controls how to score and organize the audit results in
description: 'This category judges your performance',
auditRefs: [
{id: 'first-meaningful-paint', weight: 2, group: 'metrics'},
{id: 'first-cpu-idle', weight: 3, group: 'metrics'},
{id: 'first-contentful-paint', weight: 3, group: 'metrics'},
{id: 'interactive', weight: 5, group: 'metrics'},
],
}
Expand Down
2 changes: 0 additions & 2 deletions docs/performance-budgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,9 @@ Use the optional `timings` property to define budgets for time-based performance
Supported timing metrics:

- `first-contentful-paint`
- `first-cpu-idle`
- `interactive`
- `first-meaningful-paint`
- `max-potential-fid`
- `estimated-input-latency`
- `total-blocking-time`
- `speed-index`
- `largest-contentful-paint`
Expand Down
1 change: 0 additions & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ In order to extend the Lighthouse configuration programmatically, you need to pa
onlyAudits: [
'first-meaningful-paint',
'speed-index',
'first-cpu-idle',
'interactive',
],
},
Expand Down
15 changes: 0 additions & 15 deletions lighthouse-cli/test/cli/__snapshots__/index-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ Object {
Object {
"path": "final-screenshot",
},
Object {
"path": "metrics/estimated-input-latency",
},
Object {
"path": "metrics/total-blocking-time",
},
Expand All @@ -51,9 +48,6 @@ Object {
Object {
"path": "server-response-time",
},
Object {
"path": "metrics/first-cpu-idle",
},
Object {
"path": "metrics/interactive",
},
Expand Down Expand Up @@ -924,11 +918,6 @@ Object {
],
"weight": 5,
},
Object {
"acronym": "FCI",
"id": "first-cpu-idle",
"weight": 0,
},
Object {
"id": "max-potential-fid",
"weight": 0,
Expand All @@ -938,10 +927,6 @@ Object {
"id": "first-meaningful-paint",
"weight": 0,
},
Object {
"id": "estimated-input-latency",
"weight": 0,
},
Object {
"group": "load-opportunities",
"id": "render-blocking-resources",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ module.exports = [
'first-contentful-paint': {
numericValue: '>2000',
},
'first-cpu-idle': {
numericValue: '>2000',
},
// TODO: ?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should I replace these smoke expectations with something else?

Copy link
Member

Choose a reason for hiding this comment

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

nah. FCI is basically TTI and TTI is already there.

Copy link
Member

Choose a reason for hiding this comment

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

delete?

// 'first-cpu-idle': {
// numericValue: '>2000',
// },
'interactive': {
numericValue: '>2000',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ module.exports = [
'first-meaningful-paint': {
score: '>=0.90', // primarily just making sure it didn't fail/go crazy, specific value isn't that important
},
'first-cpu-idle': {
score: '>=0.90', // primarily just making sure it didn't fail/go crazy, specific value isn't that important
},
'interactive': {
score: '>=0.90', // primarily just making sure it didn't fail/go crazy, specific value isn't that important
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const perfConfig = {
],
timings: [
{metric: 'first-contentful-paint', budget: 2000},
{metric: 'first-cpu-idle', budget: 2000},
{metric: 'interactive', budget: 2000},
{metric: 'first-meaningful-paint', budget: 2000},
{metric: 'max-potential-fid', budget: 2000},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ module.exports = [
requestedUrl: 'http://localhost:10200/tricky-tti.html',
finalUrl: 'http://localhost:10200/tricky-tti.html',
audits: {
'first-cpu-idle': {
Copy link
Member

Choose a reason for hiding this comment

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

on these you could add assertions for TBT if you want, but i don't think that's necessary or a great test for that metric.

so i'm +1 on removing in this file too

// stalls for ~5 seconds, ~5 seconds out, so should be at least ~10s
numericValue: '>9900',
},
'interactive': {
// stalls for ~5 seconds, ~5 seconds out, so should be at least ~10s
numericValue: '>9900',
Expand All @@ -33,10 +29,6 @@ module.exports = [
requestedUrl: 'http://localhost:10200/tricky-tti-late-fcp.html',
finalUrl: 'http://localhost:10200/tricky-tti-late-fcp.html',
audits: {
'first-cpu-idle': {
// FCP at least ~5 seconds out
numericValue: '>4900',
},
'interactive': {
// FCP at least ~5 seconds out
numericValue: '>4900',
Expand Down
74 changes: 0 additions & 74 deletions lighthouse-core/audits/metrics/estimated-input-latency.js

This file was deleted.

87 changes: 0 additions & 87 deletions lighthouse-core/audits/metrics/first-cpu-idle.js

This file was deleted.

12 changes: 0 additions & 12 deletions lighthouse-core/audits/predictive-perf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ const i18n = require('../lib/i18n/i18n.js');
const LanternFcp = require('../computed/metrics/lantern-first-contentful-paint.js');
const LanternFmp = require('../computed/metrics/lantern-first-meaningful-paint.js');
const LanternInteractive = require('../computed/metrics/lantern-interactive.js');
const LanternFirstCPUIdle = require('../computed/metrics/lantern-first-cpu-idle.js');
const LanternSpeedIndex = require('../computed/metrics/lantern-speed-index.js');
const LanternEil = require('../computed/metrics/lantern-estimated-input-latency.js');
const LanternLcp = require('../computed/metrics/lantern-largest-contentful-paint.js');

// Parameters (in ms) for log-normal CDF scoring. To see the curve:
Expand Down Expand Up @@ -53,9 +51,7 @@ class PredictivePerf extends Audit {
const fcp = await LanternFcp.request({trace, devtoolsLog, settings}, context);
const fmp = await LanternFmp.request({trace, devtoolsLog, settings}, context);
const tti = await LanternInteractive.request({trace, devtoolsLog, settings}, context);
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);
const lcp = await LanternLcp.request({trace, devtoolsLog, settings}, context);

const values = {
Expand All @@ -71,18 +67,10 @@ class PredictivePerf extends Audit {
optimisticTTI: tti.optimisticEstimate.timeInMs,
pessimisticTTI: tti.pessimisticEstimate.timeInMs,

roughEstimateOfTTFCPUI: ttfcpui.timing,
optimisticTTFCPUI: ttfcpui.optimisticEstimate.timeInMs,
pessimisticTTFCPUI: ttfcpui.pessimisticEstimate.timeInMs,

roughEstimateOfSI: si.timing,
optimisticSI: si.optimisticEstimate.timeInMs,
pessimisticSI: si.pessimisticEstimate.timeInMs,

roughEstimateOfEIL: eil.timing,
optimisticEIL: eil.optimisticEstimate.timeInMs,
pessimisticEIL: eil.pessimisticEstimate.timeInMs,

roughEstimateOfLCP: lcp.timing,
optimisticLCP: lcp.optimisticEstimate.timeInMs,
pessimisticLCP: lcp.pessimisticEstimate.timeInMs,
Expand Down
8 changes: 2 additions & 6 deletions lighthouse-core/audits/timing-budget.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ class TimingBudget extends Audit {
/** @type {Record<LH.Budget.TimingMetric, string>} */
const strMappings = {
'first-contentful-paint': i18n.UIStrings.firstContentfulPaintMetric,
'first-cpu-idle': i18n.UIStrings.firstCPUIdleMetric,
'interactive': i18n.UIStrings.interactiveMetric,
'first-meaningful-paint': i18n.UIStrings.firstMeaningfulPaintMetric,
'max-potential-fid': i18n.UIStrings.maxPotentialFIDMetric,
'estimated-input-latency': i18n.UIStrings.estimatedInputLatencyMetric,
'total-blocking-time': i18n.UIStrings.totalBlockingTimeMetric,
'speed-index': i18n.UIStrings.speedIndexMetric,
'largest-contentful-paint': i18n.UIStrings.largestContentfulPaintMetric,
Expand All @@ -70,11 +68,9 @@ class TimingBudget extends Audit {
/** @type {Record<LH.Budget.TimingMetric, number|undefined>} */
const measurements = {
'first-contentful-paint': summary.firstContentfulPaint,
'first-cpu-idle': summary.firstCPUIdle,
'interactive': summary.interactive,
'first-meaningful-paint': summary.firstMeaningfulPaint,
'max-potential-fid': summary.maxPotentialFID,
'estimated-input-latency': summary.estimatedInputLatency,
'total-blocking-time': summary.totalBlockingTime,
'speed-index': summary.speedIndex,
'largest-contentful-paint': summary.largestContentfulPaint,
Expand Down Expand Up @@ -115,14 +111,14 @@ class TimingBudget extends Audit {
// Defining type here overrides the column setting so that it doesn't receive ms units.
const clsItem = items.find(item => item.metric === 'cumulative-layout-shift');
if (clsItem) {
if (typeof clsItem.measurement !== 'object') {
if (typeof clsItem.measurement === 'number') {
clsItem.measurement = {
type: 'numeric',
value: Number(clsItem.measurement),
granularity: 0.01,
};
}
if (typeof clsItem.overBudget !== 'object') {
if (typeof clsItem.overBudget === 'number') {
clsItem.overBudget = {
type: 'numeric',
value: Number(clsItem.overBudget),
Expand Down
Loading