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 first-meaningful-paint metric #16047

Merged
merged 12 commits into from
Jun 7, 2024
3 changes: 0 additions & 3 deletions cli/test/smokehouse/test-definitions/perf-preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ const expectations = {
'speed-index': {
score: '>=0.80', // primarily just making sure it didn't fail/go crazy, specific value isn't that important
},
'first-meaningful-paint': {
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
89 changes: 0 additions & 89 deletions core/audits/metrics/first-meaningful-paint.js

This file was deleted.

2 changes: 1 addition & 1 deletion core/audits/metrics/interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);

/**
* @fileoverview This audit identifies the time the page is "consistently interactive".
* Looks for the first period of at least 5 seconds after FMP where both CPU and network were quiet,
* Looks for the first period of at least 5 seconds after FCP where both CPU and network were quiet,
* and returns the timestamp of the beginning of the CPU quiet period.
* @see https://docs.google.com/document/d/1GGiI9-7KeY3TPqS3YT271upUVimo-XiL5mwWorDUD4c/edit#
*/
Expand Down
6 changes: 0 additions & 6 deletions core/audits/predictive-perf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import {Audit} from './audit.js';
import * as i18n from '../lib/i18n/i18n.js';
import {LanternFirstContentfulPaint} from '../computed/metrics/lantern-first-contentful-paint.js';
import {LanternFirstMeaningfulPaint} from '../computed/metrics/lantern-first-meaningful-paint.js';
import {LanternInteractive} from '../computed/metrics/lantern-interactive.js';
import {LanternSpeedIndex} from '../computed/metrics/lantern-speed-index.js';
import {LanternLargestContentfulPaint} from '../computed/metrics/lantern-largest-contentful-paint.js';
Expand Down Expand Up @@ -52,7 +51,6 @@ class PredictivePerf extends Audit {
const settings = JSON.parse(JSON.stringify(defaultSettings)); // Use default settings.
const computationData = {trace, devtoolsLog, gatherContext, settings, URL};
const fcp = await LanternFirstContentfulPaint.request(computationData, context);
const fmp = await LanternFirstMeaningfulPaint.request(computationData, context);
const tti = await LanternInteractive.request(computationData, context);
const si = await LanternSpeedIndex.request(computationData, context);
const lcp = await LanternLargestContentfulPaint.request(computationData, context);
Expand All @@ -64,10 +62,6 @@ class PredictivePerf extends Audit {
optimisticFCP: fcp.optimisticEstimate.timeInMs,
pessimisticFCP: fcp.pessimisticEstimate.timeInMs,

roughEstimateOfFMP: fmp.timing,
optimisticFMP: fmp.optimisticEstimate.timeInMs,
pessimisticFMP: fmp.pessimisticEstimate.timeInMs,

roughEstimateOfTTI: tti.timing,
optimisticTTI: tti.optimisticEstimate.timeInMs,
pessimisticTTI: tti.pessimisticEstimate.timeInMs,
Expand Down
44 changes: 0 additions & 44 deletions core/computed/metrics/first-meaningful-paint.js

This file was deleted.

43 changes: 0 additions & 43 deletions core/computed/metrics/lantern-first-meaningful-paint.js

This file was deleted.

6 changes: 3 additions & 3 deletions core/computed/metrics/lantern-interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import {makeComputedArtifact} from '../computed-artifact.js';
import {LanternFirstMeaningfulPaint} from './lantern-first-meaningful-paint.js';
import {LanternLargestContentfulPaint} from './lantern-largest-contentful-paint.js';
import {Interactive} from '../../lib/lantern/metrics/interactive.js';
import {getComputationDataParams, lanternErrorAdapter} from './lantern-metric.js';

Expand All @@ -29,8 +29,8 @@ class LanternInteractive extends Interactive {
* @return {Promise<LH.Artifacts.LanternMetric>}
*/
static async compute_(data, context) {
const fmpResult = await LanternFirstMeaningfulPaint.request(data, context);
return this.computeMetricWithGraphs(data, context, {fmpResult});
const lcpResult = await LanternLargestContentfulPaint.request(data, context);
return this.computeMetricWithGraphs(data, context, {lcpResult});
}
}

Expand Down
6 changes: 0 additions & 6 deletions core/computed/metrics/timing-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {ProcessedNavigation} from '../processed-navigation.js';
import {Speedline} from '../speedline.js';
import {FirstContentfulPaint} from './first-contentful-paint.js';
import {FirstContentfulPaintAllFrames} from './first-contentful-paint-all-frames.js';
import {FirstMeaningfulPaint} from './first-meaningful-paint.js';
import {LargestContentfulPaint} from './largest-contentful-paint.js';
import {LargestContentfulPaintAllFrames} from './largest-contentful-paint-all-frames.js';
import {Interactive} from './interactive.js';
Expand Down Expand Up @@ -51,7 +50,6 @@ class TimingSummary {
const speedline = await Speedline.request(trace, context);
const firstContentfulPaint = await requestOrUndefined(FirstContentfulPaint, metricComputationData);
const firstContentfulPaintAllFrames = await requestOrUndefined(FirstContentfulPaintAllFrames, metricComputationData);
const firstMeaningfulPaint = await requestOrUndefined(FirstMeaningfulPaint, metricComputationData);
const largestContentfulPaint = await requestOrUndefined(LargestContentfulPaint, metricComputationData);
const largestContentfulPaintAllFrames = await requestOrUndefined(LargestContentfulPaintAllFrames, metricComputationData);
const interactive = await requestOrUndefined(Interactive, metricComputationData);
Expand All @@ -74,8 +72,6 @@ class TimingSummary {
firstContentfulPaintTs: firstContentfulPaint?.timestamp,
firstContentfulPaintAllFrames: firstContentfulPaintAllFrames?.timing,
firstContentfulPaintAllFramesTs: firstContentfulPaintAllFrames?.timestamp,
firstMeaningfulPaint: firstMeaningfulPaint?.timing,
firstMeaningfulPaintTs: firstMeaningfulPaint?.timestamp,
largestContentfulPaint: largestContentfulPaint?.timing,
largestContentfulPaintTs: largestContentfulPaint?.timestamp,
largestContentfulPaintAllFrames: largestContentfulPaintAllFrames?.timing,
Expand Down Expand Up @@ -107,8 +103,6 @@ class TimingSummary {
observedFirstContentfulPaintTs: processedNavigation?.timestamps.firstContentfulPaint,
observedFirstContentfulPaintAllFrames: processedNavigation?.timings.firstContentfulPaintAllFrames,
observedFirstContentfulPaintAllFramesTs: processedNavigation?.timestamps.firstContentfulPaintAllFrames,
observedFirstMeaningfulPaint: processedNavigation?.timings.firstMeaningfulPaint,
observedFirstMeaningfulPaintTs: processedNavigation?.timestamps.firstMeaningfulPaint,
observedLargestContentfulPaint: processedNavigation?.timings.largestContentfulPaint,
observedLargestContentfulPaintTs: processedNavigation?.timestamps.largestContentfulPaint,
observedLargestContentfulPaintAllFrames: processedNavigation?.timings.largestContentfulPaintAllFrames,
Expand Down
2 changes: 0 additions & 2 deletions core/config/default-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ const defaultConfig = {
'viewport',
'metrics/first-contentful-paint',
'metrics/largest-contentful-paint',
'metrics/first-meaningful-paint',
'metrics/speed-index',
'screenshot-thumbnails',
'final-screenshot',
Expand Down Expand Up @@ -388,7 +387,6 @@ const defaultConfig = {
// These are our "invisible" metrics. Not displayed, but still in the LHR.
{id: 'interactive', weight: 0, group: 'hidden', acronym: 'TTI'},
{id: 'max-potential-fid', weight: 0, group: 'hidden'},
{id: 'first-meaningful-paint', weight: 0, acronym: 'FMP', group: 'hidden'},

{id: 'render-blocking-resources', weight: 0, group: 'diagnostics'},
{id: 'uses-responsive-images', weight: 0, group: 'diagnostics'},
Expand Down
2 changes: 1 addition & 1 deletion core/lib/lantern/metric.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {RESOURCE_TYPES} from '../../lib/network-request.js';
* @typedef Extras
* @property {boolean} optimistic
* @property {LH.Artifacts.LanternMetric=} fcpResult
* @property {LH.Artifacts.LanternMetric=} fmpResult
* @property {LH.Artifacts.LanternMetric=} lcpResult
* @property {LH.Artifacts.LanternMetric=} interactiveResult
* @property {{speedIndex: number}=} speedline
*/
Expand Down
64 changes: 0 additions & 64 deletions core/lib/lantern/metrics/first-meaningful-paint.js

This file was deleted.

Loading
Loading