diff --git a/lighthouse-core/gather/computed/metrics/lantern-metric.js b/lighthouse-core/gather/computed/metrics/lantern-metric.js index 591919319ea5..b6e575e4d1eb 100644 --- a/lighthouse-core/gather/computed/metrics/lantern-metric.js +++ b/lighthouse-core/gather/computed/metrics/lantern-metric.js @@ -82,11 +82,13 @@ class LanternMetricArtifact extends ComputedArtifact { const optimisticGraph = this.getOptimisticGraph(graph, traceOfTab); const pessimisticGraph = this.getPessimisticGraph(graph, traceOfTab); - const optimisticSimulation = simulator.simulate(optimisticGraph, {flexibleOrdering: true}); + const optimisticSimulation = simulator.simulate(optimisticGraph); + const optimisticFlexSimulation = simulator.simulate(optimisticGraph, {flexibleOrdering: true}); const pessimisticSimulation = simulator.simulate(pessimisticGraph); const optimisticEstimate = this.getEstimateFromSimulation( - optimisticSimulation, + optimisticSimulation.timeInMs < optimisticFlexSimulation.timeInMs ? + optimisticSimulation : optimisticFlexSimulation, Object.assign({}, extras, {optimistic: true}) ); diff --git a/lighthouse-core/test/audits/first-meaningful-paint-test.js b/lighthouse-core/test/audits/first-meaningful-paint-test.js index b7368f308bce..b261c390aee0 100644 --- a/lighthouse-core/test/audits/first-meaningful-paint-test.js +++ b/lighthouse-core/test/audits/first-meaningful-paint-test.js @@ -39,8 +39,8 @@ describe('Performance: first-meaningful-paint audit', () => { const context = {options, settings: {throttlingMethod: 'simulate'}}; const fmpResult = await FMPAudit.audit(artifacts, context); - assert.equal(fmpResult.score, 0.92); - assert.equal(Util.formatDisplayValue(fmpResult.displayValue), '2,850\xa0ms'); - assert.equal(Math.round(fmpResult.rawValue), 2851); + assert.equal(fmpResult.score, 0.95); + assert.equal(Util.formatDisplayValue(fmpResult.displayValue), '2,030\xa0ms'); + assert.equal(Math.round(fmpResult.rawValue), 2029); }); }); diff --git a/lighthouse-core/test/audits/load-fast-enough-for-pwa-test.js b/lighthouse-core/test/audits/load-fast-enough-for-pwa-test.js index 3abd6e3edfdb..e35b5991842a 100644 --- a/lighthouse-core/test/audits/load-fast-enough-for-pwa-test.js +++ b/lighthouse-core/test/audits/load-fast-enough-for-pwa-test.js @@ -67,6 +67,6 @@ describe('PWA: load-fast-enough-for-pwa audit', () => { const settings = {throttlingMethod: 'provided', throttling: {rttMs: 40, throughput: 100000}}; const result = await FastPWAAudit.audit(artifacts, {settings}); - assert.equal(Math.round(result.rawValue), 5308); + assert.equal(Math.round(result.rawValue), 4309); }); }); diff --git a/lighthouse-core/test/audits/metrics-test.js b/lighthouse-core/test/audits/metrics-test.js index 494db1b80cc5..2596f238d814 100644 --- a/lighthouse-core/test/audits/metrics-test.js +++ b/lighthouse-core/test/audits/metrics-test.js @@ -29,15 +29,15 @@ describe('Performance: metrics', () => { const result = await Audit.audit(artifacts, {settings}); assert.deepStrictEqual(result.details.items[0], { - firstContentfulPaint: 2038, + firstContentfulPaint: 1272, firstContentfulPaintTs: undefined, - firstMeaningfulPaint: 2851, + firstMeaningfulPaint: 2029, firstMeaningfulPaintTs: undefined, - firstCPUIdle: 5308, + firstCPUIdle: 4309, firstCPUIdleTs: undefined, - interactive: 5308, + interactive: 4309, interactiveTs: undefined, - speedIndex: 2063, + speedIndex: 1501, speedIndexTs: undefined, estimatedInputLatency: 104, estimatedInputLatencyTs: undefined, diff --git a/lighthouse-core/test/audits/predictive-perf-test.js b/lighthouse-core/test/audits/predictive-perf-test.js index 86c2c2a37d28..9896a17258c3 100644 --- a/lighthouse-core/test/audits/predictive-perf-test.js +++ b/lighthouse-core/test/audits/predictive-perf-test.js @@ -25,18 +25,18 @@ describe('Performance: predictive performance audit', () => { }, Runner.instantiateComputedArtifacts()); return PredictivePerf.audit(artifacts).then(output => { - assert.equal(output.score, 0.79); - assert.equal(Math.round(output.rawValue), 5308); - assert.equal(output.displayValue, '5,310\xa0ms'); + assert.equal(output.score, 0.86); + assert.equal(Math.round(output.rawValue), 4309); + assert.equal(output.displayValue, '4,310\xa0ms'); const valueOf = name => Math.round(output.extendedInfo.value[name]); - assert.equal(valueOf('roughEstimateOfFCP'), 2038); + assert.equal(valueOf('roughEstimateOfFCP'), 1272); assert.equal(valueOf('optimisticFCP'), 611); assert.equal(valueOf('pessimisticFCP'), 611); - assert.equal(valueOf('roughEstimateOfFMP'), 2851); + assert.equal(valueOf('roughEstimateOfFMP'), 2029); assert.equal(valueOf('optimisticFMP'), 911); assert.equal(valueOf('pessimisticFMP'), 1198); - assert.equal(valueOf('roughEstimateOfTTI'), 5308); + assert.equal(valueOf('roughEstimateOfTTI'), 4309); assert.equal(valueOf('optimisticTTI'), 2451); assert.equal(valueOf('pessimisticTTI'), 2752); }); diff --git a/lighthouse-core/test/gather/computed/metrics/first-contentful-paint-test.js b/lighthouse-core/test/gather/computed/metrics/first-contentful-paint-test.js index 40e8e266ab6a..6d9d05ff2b84 100644 --- a/lighthouse-core/test/gather/computed/metrics/first-contentful-paint-test.js +++ b/lighthouse-core/test/gather/computed/metrics/first-contentful-paint-test.js @@ -19,7 +19,7 @@ describe('Metrics: FCP', () => { const settings = {throttlingMethod: 'simulate'}; const result = await artifacts.requestFirstContentfulPaint({trace, devtoolsLog, settings}); - assert.equal(Math.round(result.timing), 2038); + assert.equal(Math.round(result.timing), 1272); assert.equal(Math.round(result.optimisticEstimate.timeInMs), 611); assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 611); assert.equal(result.optimisticEstimate.nodeTimings.size, 2); diff --git a/lighthouse-core/test/gather/computed/metrics/first-cpu-idle-test.js b/lighthouse-core/test/gather/computed/metrics/first-cpu-idle-test.js index aafcb9daea3b..6a4307965565 100644 --- a/lighthouse-core/test/gather/computed/metrics/first-cpu-idle-test.js +++ b/lighthouse-core/test/gather/computed/metrics/first-cpu-idle-test.js @@ -63,7 +63,7 @@ describe('FirstInteractive computed artifact:', () => { const artifacts = Runner.instantiateComputedArtifacts(); const result = await artifacts.requestFirstCPUIdle({trace, devtoolsLog, settings}); - assert.equal(Math.round(result.timing), 5308); + assert.equal(Math.round(result.timing), 4309); assert.equal(Math.round(result.optimisticEstimate.timeInMs), 2451); assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 2752); assert.equal(result.optimisticEstimate.nodeTimings.size, 19); diff --git a/lighthouse-core/test/gather/computed/metrics/first-meaningful-paint-test.js b/lighthouse-core/test/gather/computed/metrics/first-meaningful-paint-test.js index 93a370951fdb..3fbdde59f72b 100644 --- a/lighthouse-core/test/gather/computed/metrics/first-meaningful-paint-test.js +++ b/lighthouse-core/test/gather/computed/metrics/first-meaningful-paint-test.js @@ -39,7 +39,7 @@ describe('Metrics: FMP', () => { const result = await artifacts.requestFirstMeaningfulPaint({trace, devtoolsLog, settings}); - assert.equal(Math.round(result.timing), 2851); + assert.equal(Math.round(result.timing), 2029); assert.equal(Math.round(result.optimisticEstimate.timeInMs), 911); assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 1198); assert.equal(result.optimisticEstimate.nodeTimings.size, 4); diff --git a/lighthouse-core/test/gather/computed/metrics/interactive-test.js b/lighthouse-core/test/gather/computed/metrics/interactive-test.js index f24f24057907..50a53077837f 100644 --- a/lighthouse-core/test/gather/computed/metrics/interactive-test.js +++ b/lighthouse-core/test/gather/computed/metrics/interactive-test.js @@ -34,7 +34,7 @@ describe('Metrics: TTI', () => { const settings = {throttlingMethod: 'simulate'}; const result = await artifacts.requestInteractive({trace, devtoolsLog, settings}); - assert.equal(Math.round(result.timing), 5308); + assert.equal(Math.round(result.timing), 4309); assert.equal(Math.round(result.optimisticEstimate.timeInMs), 2451); assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 2752); assert.equal(result.optimisticEstimate.nodeTimings.size, 19); diff --git a/lighthouse-core/test/gather/computed/metrics/lantern-first-contentful-paint-test.js b/lighthouse-core/test/gather/computed/metrics/lantern-first-contentful-paint-test.js index ab067b6755ee..6911800366e6 100644 --- a/lighthouse-core/test/gather/computed/metrics/lantern-first-contentful-paint-test.js +++ b/lighthouse-core/test/gather/computed/metrics/lantern-first-contentful-paint-test.js @@ -18,7 +18,7 @@ describe('Metrics: Lantern FCP', () => { const result = await artifacts.requestLanternFirstContentfulPaint({trace, devtoolsLog, settings: {}}); - assert.equal(Math.round(result.timing), 2038); + assert.equal(Math.round(result.timing), 1272); assert.equal(Math.round(result.optimisticEstimate.timeInMs), 611); assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 611); assert.equal(result.optimisticEstimate.nodeTimings.size, 2); diff --git a/lighthouse-core/test/gather/computed/metrics/lantern-first-cpu-idle-test.js b/lighthouse-core/test/gather/computed/metrics/lantern-first-cpu-idle-test.js index 9a501641d306..75a6840ba336 100644 --- a/lighthouse-core/test/gather/computed/metrics/lantern-first-cpu-idle-test.js +++ b/lighthouse-core/test/gather/computed/metrics/lantern-first-cpu-idle-test.js @@ -17,7 +17,7 @@ describe('Metrics: Lantern TTFCPUI', () => { const artifacts = Runner.instantiateComputedArtifacts(); const result = await artifacts.requestLanternFirstCPUIdle({trace, devtoolsLog, settings: {}}); - assert.equal(Math.round(result.timing), 5308); + assert.equal(Math.round(result.timing), 4309); assert.equal(Math.round(result.optimisticEstimate.timeInMs), 2451); assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 2752); assert.equal(result.optimisticEstimate.nodeTimings.size, 19); diff --git a/lighthouse-core/test/gather/computed/metrics/lantern-first-meaningful-paint-test.js b/lighthouse-core/test/gather/computed/metrics/lantern-first-meaningful-paint-test.js index 49d308971c44..fbd55770f761 100644 --- a/lighthouse-core/test/gather/computed/metrics/lantern-first-meaningful-paint-test.js +++ b/lighthouse-core/test/gather/computed/metrics/lantern-first-meaningful-paint-test.js @@ -18,7 +18,7 @@ describe('Metrics: Lantern FMP', () => { const result = await artifacts.requestLanternFirstMeaningfulPaint({trace, devtoolsLog, settings: {}}); - assert.equal(Math.round(result.timing), 2851); + assert.equal(Math.round(result.timing), 2029); assert.equal(Math.round(result.optimisticEstimate.timeInMs), 911); assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 1198); assert.equal(result.optimisticEstimate.nodeTimings.size, 4); diff --git a/lighthouse-core/test/gather/computed/metrics/lantern-interactive-test.js b/lighthouse-core/test/gather/computed/metrics/lantern-interactive-test.js index 2bc007adf8a9..4dce4acb567d 100644 --- a/lighthouse-core/test/gather/computed/metrics/lantern-interactive-test.js +++ b/lighthouse-core/test/gather/computed/metrics/lantern-interactive-test.js @@ -18,7 +18,7 @@ describe('Metrics: Lantern TTI', () => { const result = await artifacts.requestLanternInteractive({trace, devtoolsLog, settings: {}}); - assert.equal(Math.round(result.timing), 5308); + assert.equal(Math.round(result.timing), 4309); assert.equal(Math.round(result.optimisticEstimate.timeInMs), 2451); assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 2752); assert.equal(result.optimisticEstimate.nodeTimings.size, 19); diff --git a/lighthouse-core/test/gather/computed/metrics/lantern-speed-index-test.js b/lighthouse-core/test/gather/computed/metrics/lantern-speed-index-test.js index f3b5632b1226..5b8f1e554f65 100644 --- a/lighthouse-core/test/gather/computed/metrics/lantern-speed-index-test.js +++ b/lighthouse-core/test/gather/computed/metrics/lantern-speed-index-test.js @@ -17,8 +17,8 @@ describe('Metrics: Lantern Speed Index', () => { const artifacts = Runner.instantiateComputedArtifacts(); const result = await artifacts.requestLanternSpeedIndex({trace, devtoolsLog, settings: {}}); - assert.equal(Math.round(result.timing), 2063); + assert.equal(Math.round(result.timing), 1501); assert.equal(Math.round(result.optimisticEstimate.timeInMs), 605); - assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 2038); + assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 1392); }); }); diff --git a/lighthouse-core/test/gather/computed/metrics/speed-index-test.js b/lighthouse-core/test/gather/computed/metrics/speed-index-test.js index dfbe883eb912..eb0aefa90da3 100644 --- a/lighthouse-core/test/gather/computed/metrics/speed-index-test.js +++ b/lighthouse-core/test/gather/computed/metrics/speed-index-test.js @@ -19,9 +19,9 @@ describe('Metrics: Speed Index', () => { const settings = {throttlingMethod: 'simulate'}; const result = await artifacts.requestSpeedIndex({trace, devtoolsLog, settings}); - assert.equal(Math.round(result.timing), 2063); + assert.equal(Math.round(result.timing), 1501); assert.equal(Math.round(result.optimisticEstimate.timeInMs), 605); - assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 2038); + assert.equal(Math.round(result.pessimisticEstimate.timeInMs), 1392); }); it('should compute an observed value', async () => { diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index f4ef9cbcbafb..20cb9648a7ba 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -2735,7 +2735,7 @@ { "url": "http://localhost:10200/dobetterweb/dbw_partial_a.html?delay=200", "totalBytes": 736, - "wastedMs": 723 + "wastedMs": 873 }, { "url": "http://localhost:10200/dobetterweb/dbw_tester.js",