lighthouse 11.6.0 → 11.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/test/smokehouse/core-tests.js +2 -2
- package/core/audits/byte-efficiency/byte-efficiency-audit.d.ts +2 -2
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +7 -7
- package/core/audits/byte-efficiency/render-blocking-resources.d.ts +4 -3
- package/core/audits/byte-efficiency/render-blocking-resources.js +6 -6
- package/core/audits/dobetterweb/uses-http2.d.ts +3 -3
- package/core/audits/dobetterweb/uses-http2.js +4 -4
- package/core/audits/installable-manifest.d.ts +2 -0
- package/core/audits/installable-manifest.js +2 -0
- package/core/audits/metrics/interaction-to-next-paint.js +1 -3
- package/core/audits/prioritize-lcp-image.d.ts +1 -1
- package/core/audits/work-during-interaction.js +0 -8
- package/core/computed/document-urls.js +1 -1
- package/core/computed/load-simulator.d.ts +2 -2
- package/core/computed/load-simulator.js +3 -2
- package/core/computed/main-resource.js +1 -1
- package/core/computed/metrics/lantern-first-contentful-paint.d.ts +18 -6
- package/core/computed/metrics/lantern-first-contentful-paint.js +4 -4
- package/core/computed/metrics/lantern-first-meaningful-paint.d.ts +14 -2
- package/core/computed/metrics/lantern-first-meaningful-paint.js +1 -1
- package/core/computed/metrics/lantern-interactive.d.ts +8 -6
- package/core/computed/metrics/lantern-interactive.js +3 -3
- package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +14 -2
- package/core/computed/metrics/lantern-largest-contentful-paint.js +1 -1
- package/core/computed/metrics/lantern-max-potential-fid.d.ts +8 -2
- package/core/computed/metrics/lantern-max-potential-fid.js +3 -3
- package/core/computed/metrics/lantern-metric.d.ts +4 -63
- package/core/computed/metrics/lantern-metric.js +6 -124
- package/core/computed/metrics/lantern-speed-index.d.ts +8 -2
- package/core/computed/metrics/lantern-speed-index.js +3 -3
- package/core/computed/metrics/lantern-total-blocking-time.d.ts +8 -2
- package/core/computed/metrics/lantern-total-blocking-time.js +3 -3
- package/core/computed/metrics/responsiveness.d.ts +5 -13
- package/core/computed/metrics/responsiveness.js +10 -14
- package/core/computed/network-analysis.js +1 -1
- package/core/computed/page-dependency-graph.d.ts +4 -57
- package/core/computed/page-dependency-graph.js +4 -451
- package/core/config/config-helpers.js +1 -1
- package/core/gather/driver/execution-context.d.ts +2 -1
- package/core/gather/driver/execution-context.js +9 -9
- package/core/gather/driver/wait-for-condition.js +4 -2
- package/core/gather/gatherers/accessibility.js +2 -1
- package/core/gather/gatherers/css-usage.d.ts +1 -9
- package/core/gather/gatherers/css-usage.js +23 -25
- package/core/gather/gatherers/devtools-log.d.ts +4 -0
- package/core/gather/gatherers/devtools-log.js +7 -0
- package/core/gather/gatherers/full-page-screenshot.d.ts +4 -0
- package/core/gather/gatherers/full-page-screenshot.js +31 -35
- package/core/gather/gatherers/root-causes.js +1 -3
- package/core/gather/gatherers/trace-elements.js +1 -1
- package/core/gather/gatherers/trace.d.ts +1 -0
- package/core/gather/gatherers/trace.js +4 -0
- package/core/gather/navigation-runner.js +49 -62
- package/core/gather/session.js +5 -0
- package/core/gather/snapshot-runner.js +25 -25
- package/core/gather/timespan-runner.js +24 -25
- package/core/lib/asset-saver.js +1 -1
- package/core/lib/emulation.js +0 -3
- package/core/lib/{dependency-graph → lantern}/base-node.d.ts +12 -8
- package/core/lib/{dependency-graph → lantern}/base-node.js +8 -3
- package/core/lib/{dependency-graph → lantern}/cpu-node.d.ts +5 -1
- package/core/lib/{dependency-graph → lantern}/cpu-node.js +4 -0
- package/core/lib/lantern/lantern.d.ts +8 -0
- package/core/lib/lantern/lantern.js +31 -0
- package/core/lib/lantern/metric.d.ts +71 -0
- package/core/lib/lantern/metric.js +143 -0
- package/core/lib/{dependency-graph → lantern}/network-node.d.ts +17 -10
- package/core/lib/lantern/network-node.js +114 -0
- package/core/lib/lantern/page-dependency-graph.d.ts +58 -0
- package/core/lib/lantern/page-dependency-graph.js +463 -0
- package/core/lib/{dependency-graph → lantern}/simulator/connection-pool.d.ts +14 -14
- package/core/lib/{dependency-graph → lantern}/simulator/connection-pool.js +7 -7
- package/core/lib/{dependency-graph → lantern}/simulator/dns-cache.d.ts +5 -5
- package/core/lib/{dependency-graph → lantern}/simulator/dns-cache.js +3 -3
- package/core/lib/{dependency-graph → lantern}/simulator/network-analyzer.d.ts +36 -32
- package/core/lib/{dependency-graph → lantern}/simulator/network-analyzer.js +21 -17
- package/core/lib/{dependency-graph → lantern}/simulator/simulator.d.ts +18 -15
- package/core/lib/{dependency-graph → lantern}/simulator/simulator.js +18 -15
- package/core/lib/lantern/types/lantern.d.ts +129 -0
- package/core/lib/lantern/types/lantern.js +7 -0
- package/core/lib/lantern-trace-saver.d.ts +4 -4
- package/core/lib/lantern-trace-saver.js +6 -4
- package/core/lib/navigation-error.js +1 -1
- package/core/lib/network-recorder.js +2 -2
- package/core/lib/network-request.d.ts +6 -0
- package/core/lib/network-request.js +12 -0
- package/package.json +4 -5
- package/shared/localization/locales/ar-XB.json +1 -1
- package/shared/localization/locales/ar.json +1 -1
- package/shared/localization/locales/bg.json +1 -1
- package/shared/localization/locales/ca.json +1 -1
- package/shared/localization/locales/cs.json +1 -1
- package/shared/localization/locales/da.json +2 -2
- package/shared/localization/locales/de.json +1 -1
- package/shared/localization/locales/el.json +1 -1
- package/shared/localization/locales/en-GB.json +1 -1
- package/shared/localization/locales/en-US.json +3 -0
- package/shared/localization/locales/en-XA.json +1 -1
- package/shared/localization/locales/en-XL.json +3 -0
- package/shared/localization/locales/es-419.json +1 -1
- package/shared/localization/locales/es.json +1 -1
- package/shared/localization/locales/fi.json +1 -1
- package/shared/localization/locales/fil.json +1 -1
- package/shared/localization/locales/he.json +1 -1
- package/shared/localization/locales/hi.json +1 -1
- package/shared/localization/locales/hr.json +1 -1
- package/shared/localization/locales/hu.json +1 -1
- package/shared/localization/locales/id.json +1 -1
- package/shared/localization/locales/it.json +1 -1
- package/shared/localization/locales/ko.json +1 -1
- package/shared/localization/locales/lt.json +1 -1
- package/shared/localization/locales/nl.json +1 -1
- package/shared/localization/locales/no.json +1 -1
- package/shared/localization/locales/pl.json +1 -1
- package/shared/localization/locales/pt-PT.json +1 -1
- package/shared/localization/locales/pt.json +1 -1
- package/shared/localization/locales/ro.json +1 -1
- package/shared/localization/locales/sk.json +1 -1
- package/shared/localization/locales/sl.json +1 -1
- package/shared/localization/locales/sr-Latn.json +1 -1
- package/shared/localization/locales/sr.json +1 -1
- package/shared/localization/locales/sv.json +1 -1
- package/shared/localization/locales/ta.json +1 -1
- package/shared/localization/locales/te.json +1 -1
- package/shared/localization/locales/th.json +4 -4
- package/shared/localization/locales/tr.json +1 -1
- package/shared/localization/locales/uk.json +1 -1
- package/shared/localization/locales/vi.json +1 -1
- package/shared/localization/locales/zh-HK.json +1 -1
- package/shared/localization/locales/zh-TW.json +1 -1
- package/shared/localization/locales/zh.json +1 -1
- package/third-party/chromium-synchronization/installability-errors-test.js +1 -1
- package/tsconfig.json +7 -5
- package/types/artifacts.d.ts +1 -1
- package/types/gatherer.d.ts +8 -35
- package/types/lhr/lhr.d.ts +1 -1
- package/core/lib/dependency-graph/network-node.js +0 -99
- /package/core/lib/{dependency-graph → lantern}/simulator/simulator-timing-map.d.ts +0 -0
- /package/core/lib/{dependency-graph → lantern}/simulator/simulator-timing-map.js +0 -0
- /package/core/lib/{dependency-graph → lantern}/simulator/tcp-connection.d.ts +0 -0
- /package/core/lib/{dependency-graph → lantern}/simulator/tcp-connection.js +0 -0
|
@@ -17,6 +17,7 @@ import formsAutoComplete from './test-definitions/forms-autocomplete.js';
|
|
|
17
17
|
import fpsMax from './test-definitions/fps-max.js';
|
|
18
18
|
import fpsMaxPassive from './test-definitions/fps-max-passive.js';
|
|
19
19
|
import fpsScaled from './test-definitions/fps-scaled.js';
|
|
20
|
+
import fpsOverflowX from './test-definitions/fps-overflow-x.js';
|
|
20
21
|
import issuesMixedContent from './test-definitions/issues-mixed-content.js';
|
|
21
22
|
import lanternFetch from './test-definitions/lantern-fetch.js';
|
|
22
23
|
import lanternIdleCallbackLong from './test-definitions/lantern-idle-callback-long.js';
|
|
@@ -44,7 +45,6 @@ import perfFonts from './test-definitions/perf-fonts.js';
|
|
|
44
45
|
import perfFrameMetrics from './test-definitions/perf-frame-metrics.js';
|
|
45
46
|
import perfPreload from './test-definitions/perf-preload.js';
|
|
46
47
|
import perfTraceElements from './test-definitions/perf-trace-elements.js';
|
|
47
|
-
import pubads from './test-definitions/pubads.js';
|
|
48
48
|
import pwaAirhorner from './test-definitions/pwa-airhorner.js';
|
|
49
49
|
import pwaCaltrain from './test-definitions/pwa-caltrain.js';
|
|
50
50
|
import pwaChromestatus from './test-definitions/pwa-chromestatus.js';
|
|
@@ -81,6 +81,7 @@ const smokeTests = [
|
|
|
81
81
|
formsAutoComplete,
|
|
82
82
|
fpsMax,
|
|
83
83
|
fpsMaxPassive,
|
|
84
|
+
fpsOverflowX,
|
|
84
85
|
fpsScaled,
|
|
85
86
|
issuesMixedContent,
|
|
86
87
|
lanternFetch,
|
|
@@ -109,7 +110,6 @@ const smokeTests = [
|
|
|
109
110
|
perfFrameMetrics,
|
|
110
111
|
perfPreload,
|
|
111
112
|
perfTraceElements,
|
|
112
|
-
pubads,
|
|
113
113
|
pwaAirhorner,
|
|
114
114
|
pwaCaltrain,
|
|
115
115
|
pwaChromestatus,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type Simulator = import('../../lib/
|
|
2
|
-
export type Node = import('../../lib/
|
|
1
|
+
export type Simulator = import('../../lib/lantern/simulator/simulator.js').Simulator;
|
|
2
|
+
export type Node = import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>;
|
|
3
3
|
export type ByteEfficiencyProduct = {
|
|
4
4
|
items: Array<LH.Audit.ByteEfficiencyItem>;
|
|
5
5
|
wastedBytesByUrl?: Map<string, number> | undefined;
|
|
@@ -16,8 +16,8 @@ import {LCPImageRecord} from '../../computed/lcp-image-record.js';
|
|
|
16
16
|
|
|
17
17
|
const str_ = i18n.createIcuMessageFn(import.meta.url, {});
|
|
18
18
|
|
|
19
|
-
/** @typedef {import('../../lib/
|
|
20
|
-
/** @typedef {import('../../lib/
|
|
19
|
+
/** @typedef {import('../../lib/lantern/simulator/simulator.js').Simulator} Simulator */
|
|
20
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
21
21
|
|
|
22
22
|
// Parameters for log-normal distribution scoring. These values were determined by fitting the
|
|
23
23
|
// log-normal cumulative distribution function curve to the former method of linear interpolation
|
|
@@ -125,10 +125,10 @@ class ByteEfficiencyAudit extends Audit {
|
|
|
125
125
|
const wastedBytes = wastedBytesByUrl.get(node.record.url);
|
|
126
126
|
if (!wastedBytes) return;
|
|
127
127
|
|
|
128
|
-
const original = node.
|
|
129
|
-
originalTransferSizes.set(node.
|
|
128
|
+
const original = node.request.transferSize;
|
|
129
|
+
originalTransferSizes.set(node.request.requestId, original);
|
|
130
130
|
|
|
131
|
-
node.
|
|
131
|
+
node.request.transferSize = Math.max(original - wastedBytes, 0);
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
const simulationAfterChanges = simulator.simulate(graph, {label: afterLabel});
|
|
@@ -136,9 +136,9 @@ class ByteEfficiencyAudit extends Audit {
|
|
|
136
136
|
// Restore the original transfer size after we've done our simulation
|
|
137
137
|
graph.traverse(node => {
|
|
138
138
|
if (node.type !== 'network') return;
|
|
139
|
-
const originalTransferSize = originalTransferSizes.get(node.
|
|
139
|
+
const originalTransferSize = originalTransferSizes.get(node.request.requestId);
|
|
140
140
|
if (originalTransferSize === undefined) return;
|
|
141
|
-
node.
|
|
141
|
+
node.request.transferSize = originalTransferSize;
|
|
142
142
|
});
|
|
143
143
|
|
|
144
144
|
const savings = simulationBeforeChanges.timeInMs - simulationAfterChanges.timeInMs;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default RenderBlockingResources;
|
|
2
|
-
export type Simulator = import('../../lib/
|
|
3
|
-
export type Node = import('../../lib/
|
|
4
|
-
export type NetworkNode =
|
|
2
|
+
export type Simulator = import('../../lib/lantern/simulator/simulator.js').Simulator;
|
|
3
|
+
export type Node = import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>;
|
|
4
|
+
export type NetworkNode = import('../../lib/lantern/network-node.js').NetworkNode<LH.Artifacts.NetworkRequest>;
|
|
5
5
|
declare class RenderBlockingResources extends Audit {
|
|
6
6
|
/**
|
|
7
7
|
* @param {LH.Artifacts} artifacts
|
|
@@ -52,5 +52,6 @@ export namespace UIStrings {
|
|
|
52
52
|
const title: string;
|
|
53
53
|
const description: string;
|
|
54
54
|
}
|
|
55
|
+
import { NetworkRequest } from '../../lib/network-request.js';
|
|
55
56
|
import { Audit } from '../audit.js';
|
|
56
57
|
//# sourceMappingURL=render-blocking-resources.d.ts.map
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import {Audit} from '../audit.js';
|
|
13
13
|
import * as i18n from '../../lib/i18n/i18n.js';
|
|
14
|
-
import {BaseNode} from '../../lib/
|
|
14
|
+
import {BaseNode} from '../../lib/lantern/base-node.js';
|
|
15
15
|
import {UnusedCSS} from '../../computed/unused-css.js';
|
|
16
16
|
import {NetworkRequest} from '../../lib/network-request.js';
|
|
17
17
|
import {ProcessedNavigation} from '../../computed/processed-navigation.js';
|
|
@@ -20,9 +20,9 @@ import {FirstContentfulPaint} from '../../computed/metrics/first-contentful-pain
|
|
|
20
20
|
import {LCPImageRecord} from '../../computed/lcp-image-record.js';
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
/** @typedef {import('../../lib/
|
|
24
|
-
/** @typedef {import('../../lib/
|
|
25
|
-
/** @typedef {import('../../lib/
|
|
23
|
+
/** @typedef {import('../../lib/lantern/simulator/simulator.js').Simulator} Simulator */
|
|
24
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
25
|
+
/** @typedef {import('../../lib/lantern/network-node.js').NetworkNode<LH.Artifacts.NetworkRequest>} NetworkNode */
|
|
26
26
|
|
|
27
27
|
// Because of the way we detect blocking stylesheets, asynchronously loaded
|
|
28
28
|
// CSS with link[rel=preload] and an onload handler (see https://github.com/filamentgroup/loadCSS)
|
|
@@ -249,9 +249,9 @@ class RenderBlockingResources extends Audit {
|
|
|
249
249
|
// Add the inlined bytes to the HTML response
|
|
250
250
|
const originalTransferSize = minimalFCPGraph.record.transferSize;
|
|
251
251
|
const safeTransferSize = originalTransferSize || 0;
|
|
252
|
-
minimalFCPGraph.
|
|
252
|
+
minimalFCPGraph.request.transferSize = safeTransferSize + totalChildNetworkBytes;
|
|
253
253
|
const estimateAfterInline = simulator.simulate(minimalFCPGraph).timeInMs;
|
|
254
|
-
minimalFCPGraph.
|
|
254
|
+
minimalFCPGraph.request.transferSize = originalTransferSize;
|
|
255
255
|
return Math.round(Math.max(estimateBeforeInline - estimateAfterInline, 0));
|
|
256
256
|
}
|
|
257
257
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default UsesHTTP2Audit;
|
|
2
|
-
export type Simulator = import('../../lib/
|
|
3
|
-
export type Node = import('../../lib/
|
|
2
|
+
export type Simulator = import('../../lib/lantern/simulator/simulator.js').Simulator;
|
|
3
|
+
export type Node = import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>;
|
|
4
4
|
declare class UsesHTTP2Audit extends Audit {
|
|
5
5
|
/**
|
|
6
6
|
* Computes the estimated effect of all results being converted to http/2 on the provided graph.
|
|
@@ -83,7 +83,7 @@ export namespace UIStrings {
|
|
|
83
83
|
const displayValue: string;
|
|
84
84
|
const columnProtocol: string;
|
|
85
85
|
}
|
|
86
|
-
import { Audit } from '../audit.js';
|
|
87
86
|
import { NetworkRequest } from '../../lib/network-request.js';
|
|
87
|
+
import { Audit } from '../audit.js';
|
|
88
88
|
import { EntityClassification } from '../../computed/entity-classification.js';
|
|
89
89
|
//# sourceMappingURL=uses-http2.d.ts.map
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* origin are over the http/2 protocol.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
/** @typedef {import('../../lib/
|
|
13
|
-
/** @typedef {import('../../lib/
|
|
12
|
+
/** @typedef {import('../../lib/lantern/simulator/simulator.js').Simulator} Simulator */
|
|
13
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
14
14
|
|
|
15
15
|
import {Audit} from '../audit.js';
|
|
16
16
|
import {EntityClassification} from '../../computed/entity-classification.js';
|
|
@@ -94,7 +94,7 @@ class UsesHTTP2Audit extends Audit {
|
|
|
94
94
|
if (!urlsToChange.has(node.record.url)) return;
|
|
95
95
|
|
|
96
96
|
originalProtocols.set(node.record.requestId, node.record.protocol);
|
|
97
|
-
node.
|
|
97
|
+
node.request.protocol = 'h2';
|
|
98
98
|
});
|
|
99
99
|
|
|
100
100
|
const simulationAfter = simulator.simulate(graph, {label: afterLabel, flexibleOrdering});
|
|
@@ -104,7 +104,7 @@ class UsesHTTP2Audit extends Audit {
|
|
|
104
104
|
if (node.type !== 'network') return;
|
|
105
105
|
const originalProtocol = originalProtocols.get(node.record.requestId);
|
|
106
106
|
if (originalProtocol === undefined) return;
|
|
107
|
-
node.
|
|
107
|
+
node.request.protocol = originalProtocol;
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
const savings = simulationBefore.timeInMs - simulationAfter.timeInMs;
|
|
@@ -59,6 +59,8 @@ export const UIStrings: {
|
|
|
59
59
|
'manifest-display-not-supported': string;
|
|
60
60
|
/** Error message explaining that the manifest could not be fetched, might be empty, or could not be parsed. */
|
|
61
61
|
'manifest-empty': string;
|
|
62
|
+
/** Error message explaining that the manifest could not be fetched, might be empty, or could not be parsed. */
|
|
63
|
+
'manifest-parsing-or-network-error': string;
|
|
62
64
|
/**
|
|
63
65
|
* @description Error message explaining that the manifest does not contain a suitable icon.
|
|
64
66
|
* @example {192} value0
|
|
@@ -44,6 +44,8 @@ const UIStrings = {
|
|
|
44
44
|
'manifest-display-not-supported': 'Manifest `display` property must be one of `standalone`, `fullscreen`, or `minimal-ui`',
|
|
45
45
|
/** Error message explaining that the manifest could not be fetched, might be empty, or could not be parsed. */
|
|
46
46
|
'manifest-empty': `Manifest could not be fetched, is empty, or could not be parsed`,
|
|
47
|
+
/** Error message explaining that the manifest could not be fetched, might be empty, or could not be parsed. */
|
|
48
|
+
'manifest-parsing-or-network-error': 'Manifest could not be fetched, is empty, or could not be parsed',
|
|
47
49
|
/**
|
|
48
50
|
* @description Error message explaining that the manifest does not contain a suitable icon.
|
|
49
51
|
* @example {192} value0
|
|
@@ -70,9 +70,7 @@ class InteractionToNextPaint extends Audit {
|
|
|
70
70
|
return {score: null, notApplicable: true};
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
const timing = interactionEvent.name === 'FallbackTiming' ?
|
|
75
|
-
interactionEvent.duration : interactionEvent.args.data.duration;
|
|
73
|
+
const timing = interactionEvent.args.data.duration;
|
|
76
74
|
|
|
77
75
|
return {
|
|
78
76
|
score: Audit.computeLogNormalScore({p10: context.options.p10, median: context.options.median},
|
|
@@ -39,7 +39,7 @@ declare class PrioritizeLcpImage extends Audit {
|
|
|
39
39
|
* @return {{lcpNodeToPreload?: LH.Gatherer.Simulation.GraphNetworkNode, initiatorPath?: InitiatorPath}}
|
|
40
40
|
*/
|
|
41
41
|
static getLCPNodeToPreload(mainResource: LH.Artifacts.NetworkRequest, graph: LH.Gatherer.Simulation.GraphNode, lcpRecord: NetworkRequest | undefined): {
|
|
42
|
-
lcpNodeToPreload?: import("../lib/
|
|
42
|
+
lcpNodeToPreload?: import("../lib/lantern/network-node.js").NetworkNode<NetworkRequest> | undefined;
|
|
43
43
|
initiatorPath?: InitiatorPath | undefined;
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
@@ -14,7 +14,6 @@ import {taskGroups} from '../lib/tracehouse/task-groups.js';
|
|
|
14
14
|
import {TraceProcessor} from '../lib/tracehouse/trace-processor.js';
|
|
15
15
|
import {getExecutionTimingsByURL} from '../lib/tracehouse/task-summary.js';
|
|
16
16
|
import InteractionToNextPaint from './metrics/interaction-to-next-paint.js';
|
|
17
|
-
import {LighthouseError} from '../lib/lh-error.js';
|
|
18
17
|
|
|
19
18
|
/** @typedef {import('../computed/metrics/responsiveness.js').EventTimingEvent} EventTimingEvent */
|
|
20
19
|
/** @typedef {import('../lib/tracehouse/main-thread-tasks.js').TaskNode} TaskNode */
|
|
@@ -243,13 +242,6 @@ class WorkDuringInteraction extends Audit {
|
|
|
243
242
|
metricSavings: {INP: 0},
|
|
244
243
|
};
|
|
245
244
|
}
|
|
246
|
-
// TODO: remove workaround once 103.0.5052.0 is sufficiently released.
|
|
247
|
-
if (interactionEvent.name === 'FallbackTiming') {
|
|
248
|
-
throw new LighthouseError(
|
|
249
|
-
LighthouseError.errors.UNSUPPORTED_OLD_CHROME,
|
|
250
|
-
{featureName: 'detailed EventTiming trace events'}
|
|
251
|
-
);
|
|
252
|
-
}
|
|
253
245
|
|
|
254
246
|
const auditDetailsItems = [];
|
|
255
247
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {NetworkAnalyzer} from '../lib/
|
|
7
|
+
import {NetworkAnalyzer} from '../lib/lantern/simulator/network-analyzer.js';
|
|
8
8
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
9
9
|
import {NetworkRecords} from './network-records.js';
|
|
10
10
|
import {ProcessedTrace} from './processed-trace.js';
|
|
@@ -5,7 +5,7 @@ declare const LoadSimulatorComputed: typeof LoadSimulator & {
|
|
|
5
5
|
settings: LH.Audit.Context['settings'];
|
|
6
6
|
}, context: import("../../types/utility-types.js").default.ImmutableObject<{
|
|
7
7
|
computedCache: Map<string, import("../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
8
|
-
}>) => Promise<Simulator
|
|
8
|
+
}>) => Promise<Simulator<any>>;
|
|
9
9
|
};
|
|
10
10
|
declare class LoadSimulator {
|
|
11
11
|
/**
|
|
@@ -23,6 +23,6 @@ declare class LoadSimulator {
|
|
|
23
23
|
*/
|
|
24
24
|
static convertAnalysisToSaveableLanternData(networkAnalysis: LH.Artifacts.NetworkAnalysis): LH.PrecomputedLanternData;
|
|
25
25
|
}
|
|
26
|
-
import { Simulator } from '../lib/
|
|
26
|
+
import { Simulator } from '../lib/lantern/simulator/simulator.js';
|
|
27
27
|
import { NetworkAnalysis } from './network-analysis.js';
|
|
28
28
|
//# sourceMappingURL=load-simulator.d.ts.map
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as Lantern from '../lib/lantern/types/lantern.js';
|
|
7
8
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
8
9
|
import * as constants from '../config/constants.js';
|
|
9
|
-
import {Simulator} from '../lib/
|
|
10
|
+
import {Simulator} from '../lib/lantern/simulator/simulator.js';
|
|
10
11
|
import {NetworkAnalysis} from './network-analysis.js';
|
|
11
12
|
|
|
12
13
|
class LoadSimulator {
|
|
@@ -19,7 +20,7 @@ class LoadSimulator {
|
|
|
19
20
|
const {throttlingMethod, throttling, precomputedLanternData} = data.settings;
|
|
20
21
|
const networkAnalysis = await NetworkAnalysis.request(data.devtoolsLog, context);
|
|
21
22
|
|
|
22
|
-
/** @type {
|
|
23
|
+
/** @type {Lantern.Simulation.Options} */
|
|
23
24
|
const options = {
|
|
24
25
|
additionalRttByOrigin: networkAnalysis.additionalRttByOrigin,
|
|
25
26
|
serverResponseTimeByOrigin: networkAnalysis.serverResponseTimeByOrigin,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
8
8
|
import {NetworkRecords} from './network-records.js';
|
|
9
|
-
import {NetworkAnalyzer} from '../lib/
|
|
9
|
+
import {NetworkAnalyzer} from '../lib/lantern/simulator/network-analyzer.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @fileoverview This artifact identifies the main resource on the page. Current solution assumes
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export { LanternFirstContentfulPaintComputed as LanternFirstContentfulPaint };
|
|
2
|
-
export type Node = import('../../lib/
|
|
3
|
-
export type CPUNode = import('../../lib/
|
|
4
|
-
export type NetworkNode = import('../../lib/
|
|
2
|
+
export type Node = import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>;
|
|
3
|
+
export type CPUNode = import('../../lib/lantern/cpu-node.js').CPUNode<LH.Artifacts.NetworkRequest>;
|
|
4
|
+
export type NetworkNode = import('../../lib/lantern/network-node.js').NetworkNode<LH.Artifacts.NetworkRequest>;
|
|
5
5
|
declare const LanternFirstContentfulPaintComputed: typeof LanternFirstContentfulPaint & {
|
|
6
6
|
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
7
7
|
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
8
8
|
}>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
|
|
9
9
|
};
|
|
10
|
-
/** @typedef {import('../../lib/
|
|
11
|
-
/** @typedef {import('../../lib/
|
|
12
|
-
/** @typedef {import('../../lib/
|
|
10
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
11
|
+
/** @typedef {import('../../lib/lantern/cpu-node.js').CPUNode<LH.Artifacts.NetworkRequest>} CPUNode */
|
|
12
|
+
/** @typedef {import('../../lib/lantern/network-node.js').NetworkNode<LH.Artifacts.NetworkRequest>} NetworkNode */
|
|
13
13
|
declare class LanternFirstContentfulPaint extends LanternMetric {
|
|
14
14
|
/**
|
|
15
15
|
* @typedef FirstPaintBasedGraphOpts
|
|
@@ -77,6 +77,18 @@ declare class LanternFirstContentfulPaint extends LanternMetric {
|
|
|
77
77
|
*/
|
|
78
78
|
additionalCpuNodesToTreatAsRenderBlocking?: ((arg0: CPUNode) => boolean) | undefined;
|
|
79
79
|
}): Node;
|
|
80
|
+
/**
|
|
81
|
+
* @param {Node} dependencyGraph
|
|
82
|
+
* @param {LH.Artifacts.ProcessedNavigation} processedNavigation
|
|
83
|
+
* @return {Node}
|
|
84
|
+
*/
|
|
85
|
+
static getOptimisticGraph(dependencyGraph: Node, processedNavigation: LH.Artifacts.ProcessedNavigation): Node;
|
|
86
|
+
/**
|
|
87
|
+
* @param {Node} dependencyGraph
|
|
88
|
+
* @param {LH.Artifacts.ProcessedNavigation} processedNavigation
|
|
89
|
+
* @return {Node}
|
|
90
|
+
*/
|
|
91
|
+
static getPessimisticGraph(dependencyGraph: Node, processedNavigation: LH.Artifacts.ProcessedNavigation): Node;
|
|
80
92
|
}
|
|
81
93
|
import { LanternMetric } from './lantern-metric.js';
|
|
82
94
|
//# sourceMappingURL=lantern-first-contentful-paint.d.ts.map
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
8
|
import {LanternMetric} from './lantern-metric.js';
|
|
9
|
-
import {BaseNode} from '../../lib/
|
|
9
|
+
import {BaseNode} from '../../lib/lantern/base-node.js';
|
|
10
10
|
|
|
11
|
-
/** @typedef {import('../../lib/
|
|
12
|
-
/** @typedef {import('../../lib/
|
|
13
|
-
/** @typedef {import('../../lib/
|
|
11
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
12
|
+
/** @typedef {import('../../lib/lantern/cpu-node.js').CPUNode<LH.Artifacts.NetworkRequest>} CPUNode */
|
|
13
|
+
/** @typedef {import('../../lib/lantern/network-node.js').NetworkNode<LH.Artifacts.NetworkRequest>} NetworkNode */
|
|
14
14
|
|
|
15
15
|
class LanternFirstContentfulPaint extends LanternMetric {
|
|
16
16
|
/**
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
export { LanternFirstMeaningfulPaintComputed as LanternFirstMeaningfulPaint };
|
|
2
|
-
export type Node = import('../../lib/
|
|
2
|
+
export type Node = import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>;
|
|
3
3
|
declare const LanternFirstMeaningfulPaintComputed: typeof LanternFirstMeaningfulPaint & {
|
|
4
4
|
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
5
5
|
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
6
6
|
}>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
|
|
7
7
|
};
|
|
8
|
-
/** @typedef {import('../../lib/
|
|
8
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
9
9
|
declare class LanternFirstMeaningfulPaint extends LanternMetric {
|
|
10
|
+
/**
|
|
11
|
+
* @param {Node} dependencyGraph
|
|
12
|
+
* @param {LH.Artifacts.ProcessedNavigation} processedNavigation
|
|
13
|
+
* @return {Node}
|
|
14
|
+
*/
|
|
15
|
+
static getOptimisticGraph(dependencyGraph: Node, processedNavigation: LH.Artifacts.ProcessedNavigation): Node;
|
|
16
|
+
/**
|
|
17
|
+
* @param {Node} dependencyGraph
|
|
18
|
+
* @param {LH.Artifacts.ProcessedNavigation} processedNavigation
|
|
19
|
+
* @return {Node}
|
|
20
|
+
*/
|
|
21
|
+
static getPessimisticGraph(dependencyGraph: Node, processedNavigation: LH.Artifacts.ProcessedNavigation): Node;
|
|
10
22
|
}
|
|
11
23
|
import { LanternMetric } from './lantern-metric.js';
|
|
12
24
|
//# sourceMappingURL=lantern-first-meaningful-paint.d.ts.map
|
|
@@ -9,7 +9,7 @@ import {LanternMetric} from './lantern-metric.js';
|
|
|
9
9
|
import {LighthouseError} from '../../lib/lh-error.js';
|
|
10
10
|
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
11
11
|
|
|
12
|
-
/** @typedef {import('../../lib/
|
|
12
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
13
13
|
|
|
14
14
|
class LanternFirstMeaningfulPaint extends LanternMetric {
|
|
15
15
|
/**
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
export { LanternInteractiveComputed as LanternInteractive };
|
|
2
|
-
export type Node = import('../../lib/
|
|
2
|
+
export type Node = import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>;
|
|
3
3
|
declare const LanternInteractiveComputed: typeof LanternInteractive & {
|
|
4
|
-
/**
|
|
5
|
-
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
6
|
-
* @param {LH.Artifacts.ComputedContext} context
|
|
7
|
-
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
8
|
-
*/
|
|
9
4
|
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
10
5
|
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
11
6
|
}>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
|
|
12
7
|
};
|
|
8
|
+
import { NetworkRequest } from '../../lib/network-request.js';
|
|
13
9
|
declare class LanternInteractive extends LanternMetric {
|
|
14
10
|
/**
|
|
15
11
|
* @param {Node} dependencyGraph
|
|
@@ -21,6 +17,12 @@ declare class LanternInteractive extends LanternMetric {
|
|
|
21
17
|
* @return {Node}
|
|
22
18
|
*/
|
|
23
19
|
static getPessimisticGraph(dependencyGraph: Node): Node;
|
|
20
|
+
/**
|
|
21
|
+
* @param {LH.Gatherer.Simulation.Result} simulationResult
|
|
22
|
+
* @param {import('../../lib/lantern/metric.js').Extras} extras
|
|
23
|
+
* @return {LH.Gatherer.Simulation.Result}
|
|
24
|
+
*/
|
|
25
|
+
static getEstimateFromSimulation(simulationResult: LH.Gatherer.Simulation.Result, extras: import('../../lib/lantern/metric.js').Extras): LH.Gatherer.Simulation.Result;
|
|
24
26
|
/**
|
|
25
27
|
* @param {LH.Gatherer.Simulation.Result['nodeTimings']} nodeTimings
|
|
26
28
|
* @return {number}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
8
|
import {LanternMetric} from './lantern-metric.js';
|
|
9
|
-
import {BaseNode} from '../../lib/
|
|
9
|
+
import {BaseNode} from '../../lib/lantern/base-node.js';
|
|
10
10
|
import {NetworkRequest} from '../../lib/network-request.js';
|
|
11
11
|
import {LanternFirstMeaningfulPaint} from './lantern-first-meaningful-paint.js';
|
|
12
12
|
|
|
13
|
-
/** @typedef {import('../../lib/
|
|
13
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
14
14
|
|
|
15
15
|
// Any CPU task of 20 ms or more will end up being a critical long task on mobile
|
|
16
16
|
const CRITICAL_LONG_TASK_THRESHOLD = 20;
|
|
@@ -63,7 +63,7 @@ class LanternInteractive extends LanternMetric {
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @param {LH.Gatherer.Simulation.Result} simulationResult
|
|
66
|
-
* @param {import('
|
|
66
|
+
* @param {import('../../lib/lantern/metric.js').Extras} extras
|
|
67
67
|
* @return {LH.Gatherer.Simulation.Result}
|
|
68
68
|
*/
|
|
69
69
|
static getEstimateFromSimulation(simulationResult, extras) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { LanternLargestContentfulPaintComputed as LanternLargestContentfulPaint };
|
|
2
|
-
export type Node = import('../../lib/
|
|
2
|
+
export type Node = import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>;
|
|
3
3
|
declare const LanternLargestContentfulPaintComputed: typeof LanternLargestContentfulPaint & {
|
|
4
4
|
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
5
5
|
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
6
6
|
}>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
|
|
7
7
|
};
|
|
8
|
-
/** @typedef {import('../../lib/
|
|
8
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
9
9
|
declare class LanternLargestContentfulPaint extends LanternMetric {
|
|
10
10
|
/**
|
|
11
11
|
* Low priority image nodes are usually offscreen and very unlikely to be the
|
|
@@ -15,6 +15,18 @@ declare class LanternLargestContentfulPaint extends LanternMetric {
|
|
|
15
15
|
* @return {boolean}
|
|
16
16
|
*/
|
|
17
17
|
static isNotLowPriorityImageNode(node: Node): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @param {Node} dependencyGraph
|
|
20
|
+
* @param {LH.Artifacts.ProcessedNavigation} processedNavigation
|
|
21
|
+
* @return {Node}
|
|
22
|
+
*/
|
|
23
|
+
static getOptimisticGraph(dependencyGraph: Node, processedNavigation: LH.Artifacts.ProcessedNavigation): Node;
|
|
24
|
+
/**
|
|
25
|
+
* @param {Node} dependencyGraph
|
|
26
|
+
* @param {LH.Artifacts.ProcessedNavigation} processedNavigation
|
|
27
|
+
* @return {Node}
|
|
28
|
+
*/
|
|
29
|
+
static getPessimisticGraph(dependencyGraph: Node, processedNavigation: LH.Artifacts.ProcessedNavigation): Node;
|
|
18
30
|
/**
|
|
19
31
|
* @param {LH.Gatherer.Simulation.Result} simulationResult
|
|
20
32
|
* @return {LH.Gatherer.Simulation.Result}
|
|
@@ -9,7 +9,7 @@ import {LanternMetric} from './lantern-metric.js';
|
|
|
9
9
|
import {LighthouseError} from '../../lib/lh-error.js';
|
|
10
10
|
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
11
11
|
|
|
12
|
-
/** @typedef {import('../../lib/
|
|
12
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
13
13
|
|
|
14
14
|
class LanternLargestContentfulPaint extends LanternMetric {
|
|
15
15
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { LanternMaxPotentialFIDComputed as LanternMaxPotentialFID };
|
|
2
|
-
export type Node = import('../../lib/
|
|
2
|
+
export type Node = import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>;
|
|
3
3
|
declare const LanternMaxPotentialFIDComputed: typeof LanternMaxPotentialFID & {
|
|
4
4
|
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
5
5
|
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
6
6
|
}>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
|
|
7
7
|
};
|
|
8
|
-
/** @typedef {import('../../lib/
|
|
8
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
9
9
|
declare class LanternMaxPotentialFID extends LanternMetric {
|
|
10
10
|
/**
|
|
11
11
|
* @param {Node} dependencyGraph
|
|
@@ -17,6 +17,12 @@ declare class LanternMaxPotentialFID extends LanternMetric {
|
|
|
17
17
|
* @return {Node}
|
|
18
18
|
*/
|
|
19
19
|
static getPessimisticGraph(dependencyGraph: Node): Node;
|
|
20
|
+
/**
|
|
21
|
+
* @param {LH.Gatherer.Simulation.Result} simulation
|
|
22
|
+
* @param {import('../../lib/lantern/metric.js').Extras} extras
|
|
23
|
+
* @return {LH.Gatherer.Simulation.Result}
|
|
24
|
+
*/
|
|
25
|
+
static getEstimateFromSimulation(simulation: LH.Gatherer.Simulation.Result, extras: import('../../lib/lantern/metric.js').Extras): LH.Gatherer.Simulation.Result;
|
|
20
26
|
/**
|
|
21
27
|
* @param {LH.Gatherer.Simulation.Result['nodeTimings']} nodeTimings
|
|
22
28
|
* @param {number} fcpTimeInMs
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
8
|
import {LanternMetric} from './lantern-metric.js';
|
|
9
|
-
import {BaseNode} from '../../lib/
|
|
9
|
+
import {BaseNode} from '../../lib/lantern/base-node.js';
|
|
10
10
|
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
11
11
|
|
|
12
|
-
/** @typedef {import('../../lib/
|
|
12
|
+
/** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
13
13
|
|
|
14
14
|
class LanternMaxPotentialFID extends LanternMetric {
|
|
15
15
|
/**
|
|
@@ -41,7 +41,7 @@ class LanternMaxPotentialFID extends LanternMetric {
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* @param {LH.Gatherer.Simulation.Result} simulation
|
|
44
|
-
* @param {import('
|
|
44
|
+
* @param {import('../../lib/lantern/metric.js').Extras} extras
|
|
45
45
|
* @return {LH.Gatherer.Simulation.Result}
|
|
46
46
|
*/
|
|
47
47
|
static getEstimateFromSimulation(simulation, extras) {
|