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(performance-budget): add MP-FID as budget metric #8905

Merged
merged 1 commit into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion lighthouse-cli/test/smokehouse/perf/perf-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const perfConfig = {
{metric: 'first-cpu-idle', budget: 2000, tolerance: 100},
{metric: 'interactive', budget: 2000, tolerance: 100},
{metric: 'first-meaningful-paint', budget: 2000, tolerance: 100},
{metric: 'estimated-input-latency', budget: 2000, tolerance: 100},
{metric: 'max-potential-fid', budget: 2000, tolerance: 100},
],
}],
},
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/config/budget.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Budget {
'first-cpu-idle',
'interactive',
'first-meaningful-paint',
'estimated-input-latency',
'max-potential-fid',
];
// Assume metric is an allowed string, throw if not.
if (!validTimingMetrics.includes(/** @type {LH.Budget.TimingMetric} */ (metric))) {
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/test/results/sample-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const budgetedConfig = {
{metric: 'first-cpu-idle', budget: 2900, tolerance: 100},
{metric: 'interactive', budget: 2900, tolerance: 100},
{metric: 'first-meaningful-paint', budget: 2000, tolerance: 100},
{metric: 'estimated-input-latency', budget: 100, tolerance: 100},
{metric: 'max-potential-fid', budget: 100, tolerance: 100},
],
}],
},
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3290,7 +3290,7 @@
"tolerance": 100
},
{
"metric": "estimated-input-latency",
"metric": "max-potential-fid",
"budget": 100,
"tolerance": 100
}
Expand Down
2 changes: 1 addition & 1 deletion types/budget.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ declare global {
}

/** Supported timing metrics. */
export type TimingMetric = 'first-contentful-paint' | 'first-cpu-idle' | 'interactive' | 'first-meaningful-paint' | 'estimated-input-latency';
export type TimingMetric = 'first-contentful-paint' | 'first-cpu-idle' | 'interactive' | 'first-meaningful-paint' | 'max-potential-fid';

/** Supported values for the resourceType property of a ResourceBudget. */
export type ResourceType = 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'document' | 'other' | 'total' | 'third-party';
Expand Down