Skip to content

Commit

Permalink
update TTI/SI test values
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny committed Dec 14, 2022
1 parent b5e1543 commit 4360edd
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 37 deletions.
8 changes: 4 additions & 4 deletions core/test/audits/__snapshots__/metrics-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Object {
"firstContentfulPaintTs": undefined,
"firstMeaningfulPaint": 2758,
"firstMeaningfulPaintTs": undefined,
"interactive": 4519,
"interactive": 4592,
"interactiveTs": undefined,
"largestContentfulPaint": 2758,
"largestContentfulPaintAllFrames": undefined,
Expand Down Expand Up @@ -103,7 +103,7 @@ Object {
"observedTotalCumulativeLayoutShift": 0,
"observedTraceEnd": 7416,
"observedTraceEndTs": 713044439102,
"speedIndex": 3681,
"speedIndex": 3169,
"speedIndexTs": undefined,
"totalBlockingTime": 1205,
"totalCumulativeLayoutShift": 0,
Expand Down Expand Up @@ -175,7 +175,7 @@ Object {
"firstContentfulPaintTs": undefined,
"firstMeaningfulPaint": 1541,
"firstMeaningfulPaintTs": undefined,
"interactive": 3975,
"interactive": 3955,
"interactiveTs": undefined,
"largestContentfulPaint": undefined,
"largestContentfulPaintAllFrames": undefined,
Expand Down Expand Up @@ -213,7 +213,7 @@ Object {
"observedTotalCumulativeLayoutShift": 0,
"observedTraceEnd": 12540,
"observedTraceEndTs": 225426711887,
"speedIndex": 1676,
"speedIndex": 1511,
"speedIndexTs": undefined,
"totalBlockingTime": 777,
"totalCumulativeLayoutShift": 0,
Expand Down
4 changes: 2 additions & 2 deletions core/test/audits/__snapshots__/predictive-perf-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Object {
"roughEstimateOfFCP": 2289,
"roughEstimateOfFMP": 2758,
"roughEstimateOfLCP": 2758,
"roughEstimateOfSI": 3681,
"roughEstimateOfTTI": 4519,
"roughEstimateOfSI": 3169,
"roughEstimateOfTTI": 4592,
}
`;
2 changes: 1 addition & 1 deletion core/test/audits/predictive-perf-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Performance: predictive performance audit', () => {
const context = {computedCache: new Map(), settings: {locale: 'en'}};

const output = await PredictivePerf.audit(artifacts, context);
expect(output.displayValue).toBeDisplayString('4,520 ms');
expect(output.displayValue).toBeDisplayString('4,590 ms');
const metrics = output.details.items[0];
for (const [key, value] of Object.entries(metrics)) {
metrics[key] = Math.round(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ exports[`Metrics: TTI should compute a simulated value 1`] = `
Object {
"optimistic": 4177,
"pessimistic": 3773,
"timing": 3975,
"timing": 3955,
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ exports[`Metrics: Lantern TTI should compute predicted value 1`] = `
Object {
"optimistic": 4177,
"pessimistic": 3773,
"timing": 3975,
"timing": 3955,
}
`;

exports[`Metrics: Lantern TTI should compute predicted value on iframes with substantial layout 1`] = `
Object {
"optimistic": 6207,
"pessimistic": 6242,
"timing": 6224,
"timing": 6226,
}
`;
10 changes: 5 additions & 5 deletions core/test/computed/metrics/lantern-speed-index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Metrics: Lantern Speed Index', () => {
Object {
"optimistic": 605,
"pessimistic": 1661,
"timing": 1676,
"timing": 1511,
}
`);
});
Expand All @@ -51,7 +51,7 @@ describe('Metrics: Lantern Speed Index', () => {
Object {
"optimistic": 605,
"pessimistic": 2439,
"timing": 3007,
"timing": 2198,
}
`);
});
Expand All @@ -63,16 +63,16 @@ describe('Metrics: Lantern Speed Index', () => {

it('should scale coefficients back', async () => {
const result = LanternSpeedIndex.getScaledCoefficients(5);
expect(result).toEqual({intercept: -0, pessimistic: 0.5, optimistic: 0.5});
expect(result).toEqual({intercept: 0, pessimistic: 0.5, optimistic: 0.5});
});

it('should scale coefficients forward', async () => {
const result = LanternSpeedIndex.getScaledCoefficients(300);
expect(result).toMatchInlineSnapshot(`
Object {
"intercept": -562.5,
"intercept": 0,
"optimistic": 2.525,
"pessimistic": 0.8375,
"pessimistic": 0.275,
}
`);
});
Expand Down
4 changes: 2 additions & 2 deletions core/test/computed/metrics/speed-index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Metrics: Speed Index', () => {
Object {
"optimistic": 605,
"pessimistic": 1661,
"timing": 1676,
"timing": 1511,
}
`);
});
Expand Down Expand Up @@ -68,7 +68,7 @@ describe('Metrics: Speed Index', () => {
Object {
"optimistic": 575,
"pessimistic": 633,
"timing": 635,
"timing": 642,
}
`);
});
Expand Down
22 changes: 11 additions & 11 deletions core/test/fixtures/fraggle-rock/reports/sample-flow-result.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"description": "Speed Index shows how quickly the contents of a page are visibly populated. [Learn more about the Speed Index metric](https://developer.chrome.com/docs/lighthouse/performance/speed-index/).",
"score": 1,
"scoreDisplayMode": "numeric",
"numericValue": 1903.3357599943133,
"numericValue": 1858.6607599943131,
"numericUnit": "millisecond",
"displayValue": "1.9 s"
},
Expand Down Expand Up @@ -252,7 +252,7 @@
"description": "Time to Interactive is the amount of time it takes for the page to become fully interactive. [Learn more about the Time to Interactive metric](https://developer.chrome.com/docs/lighthouse/performance/interactive/).",
"score": 0.96,
"scoreDisplayMode": "numeric",
"numericValue": 2919.2315,
"numericValue": 2926.9816500000006,
"numericUnit": "millisecond",
"displayValue": "2.9 s"
},
Expand Down Expand Up @@ -1239,7 +1239,7 @@
"description": "Collects all available metrics.",
"score": null,
"scoreDisplayMode": "informative",
"numericValue": 2919,
"numericValue": 2927,
"numericUnit": "millisecond",
"details": {
"type": "debugdata",
Expand All @@ -1248,8 +1248,8 @@
"firstContentfulPaint": 1179,
"firstMeaningfulPaint": 1179,
"largestContentfulPaint": 2574,
"interactive": 2919,
"speedIndex": 1903,
"interactive": 2927,
"speedIndex": 1859,
"totalBlockingTime": 32,
"maxPotentialFID": 113,
"cumulativeLayoutShift": 0.009249603271484375,
Expand Down Expand Up @@ -6145,13 +6145,13 @@
},
{
"values": {
"timeInMs": 1903.3357599943133
"timeInMs": 1858.6607599943131
},
"path": "audits[speed-index].displayValue"
},
{
"values": {
"timeInMs": 2919.2315
"timeInMs": 2926.9816500000006
},
"path": "audits.interactive.displayValue"
},
Expand Down Expand Up @@ -14409,7 +14409,7 @@
"description": "Time to Interactive is the amount of time it takes for the page to become fully interactive. [Learn more about the Time to Interactive metric](https://developer.chrome.com/docs/lighthouse/performance/interactive/).",
"score": 1,
"scoreDisplayMode": "numeric",
"numericValue": 911.4059182891847,
"numericValue": 916.9316764602663,
"numericUnit": "millisecond",
"displayValue": "0.9 s"
},
Expand Down Expand Up @@ -15357,7 +15357,7 @@
"description": "Collects all available metrics.",
"score": null,
"scoreDisplayMode": "informative",
"numericValue": 911,
"numericValue": 917,
"numericUnit": "millisecond",
"details": {
"type": "debugdata",
Expand All @@ -15366,7 +15366,7 @@
"firstContentfulPaint": 829,
"firstMeaningfulPaint": 829,
"largestContentfulPaint": 1812,
"interactive": 911,
"interactive": 917,
"speedIndex": 829,
"totalBlockingTime": 21,
"maxPotentialFID": 92,
Expand Down Expand Up @@ -20286,7 +20286,7 @@
},
{
"values": {
"timeInMs": 911.4059182891847
"timeInMs": 916.9316764602663
},
"path": "audits.interactive.displayValue"
},
Expand Down
18 changes: 9 additions & 9 deletions core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -4678,9 +4678,9 @@
"id": "unused-javascript",
"title": "Reduce unused JavaScript",
"description": "Reduce unused JavaScript and defer loading scripts until they are required to decrease bytes consumed by network activity. [Learn how to reduce unused JavaScript](https://developer.chrome.com/docs/lighthouse/performance/unused-javascript/).",
"score": 0.58,
"score": 0.5,
"scoreDisplayMode": "numeric",
"numericValue": 600,
"numericValue": 750,
"numericUnit": "millisecond",
"displayValue": "Potential savings of 64 KiB",
"details": {
Expand Down Expand Up @@ -4726,7 +4726,7 @@
"wastedPercent": 70.99531129443884
}
],
"overallSavingsMs": 600,
"overallSavingsMs": 750,
"overallSavingsBytes": 65111
}
},
Expand Down Expand Up @@ -4936,9 +4936,9 @@
"id": "uses-text-compression",
"title": "Enable text compression",
"description": "Text-based resources should be served with compression (gzip, deflate or brotli) to minimize total network bytes. [Learn more about text compression](https://developer.chrome.com/docs/lighthouse/performance/uses-text-compression/).",
"score": 0.38,
"score": 0.34,
"scoreDisplayMode": "numeric",
"numericValue": 1800,
"numericValue": 2120,
"numericUnit": "millisecond",
"displayValue": "Potential savings of 143 KiB",
"details": {
Expand Down Expand Up @@ -4972,7 +4972,7 @@
"wastedBytes": 11647
}
],
"overallSavingsMs": 1800,
"overallSavingsMs": 2120,
"overallSavingsBytes": 146478
}
},
Expand Down Expand Up @@ -5141,9 +5141,9 @@
"id": "legacy-javascript",
"title": "Avoid serving legacy JavaScript to modern browsers",
"description": "Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren't necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. [Learn how to use modern JavaScript](https://web.dev/publish-modern-javascript/)",
"score": 0.88,
"score": 0.75,
"scoreDisplayMode": "numeric",
"numericValue": 150,
"numericValue": 300,
"numericUnit": "millisecond",
"displayValue": "Potential savings of 21 KiB",
"details": {
Expand Down Expand Up @@ -5204,7 +5204,7 @@
"totalBytes": 0
}
],
"overallSavingsMs": 150,
"overallSavingsMs": 300,
"overallSavingsBytes": 21189
}
},
Expand Down

0 comments on commit 4360edd

Please sign in to comment.