Skip to content

Commit

Permalink
core(performance-budget): add MP-FID as budget metric (#8905)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny authored and paulirish committed May 28, 2019
1 parent fd0a34e commit 60dba87
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
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

0 comments on commit 60dba87

Please sign in to comment.