lighthouse 9.5.0-dev.20220907 → 9.5.0-dev.20220907-2
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/core/audits/bootup-time.js +2 -2
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +7 -6
- package/core/audits/byte-efficiency/duplicated-javascript.js +1 -1
- package/core/audits/byte-efficiency/legacy-javascript.js +2 -2
- package/core/audits/byte-efficiency/offscreen-images.js +2 -2
- package/core/audits/byte-efficiency/render-blocking-resources.js +5 -5
- package/core/audits/byte-efficiency/total-byte-weight.js +1 -1
- package/core/audits/byte-efficiency/unminified-css.js +1 -1
- package/core/audits/byte-efficiency/unused-css-rules.js +1 -1
- package/core/audits/byte-efficiency/unused-javascript.js +4 -4
- package/core/audits/byte-efficiency/uses-long-cache-ttl.js +1 -1
- package/core/audits/byte-efficiency/uses-responsive-images.js +1 -1
- package/core/audits/critical-request-chains.js +1 -1
- package/core/audits/csp-xss.js +1 -1
- package/core/audits/deprecations.js +2 -2
- package/core/audits/diagnostics.js +7 -7
- package/core/audits/dobetterweb/charset.js +1 -1
- package/core/audits/dobetterweb/uses-http2.js +6 -6
- package/core/audits/errors-in-console.js +2 -2
- package/core/audits/final-screenshot.js +2 -2
- package/core/audits/font-display.js +1 -1
- package/core/audits/installable-manifest.js +1 -1
- package/core/audits/is-on-https.js +1 -1
- package/core/audits/long-tasks.js +4 -4
- package/core/audits/main-thread-tasks.js +1 -1
- package/core/audits/mainthread-work-breakdown.js +1 -1
- package/core/audits/maskable-icon.js +1 -1
- package/core/audits/metrics/cumulative-layout-shift.js +1 -1
- package/core/audits/metrics/experimental-interaction-to-next-paint.js +1 -1
- package/core/audits/metrics/first-contentful-paint-3g.js +1 -1
- package/core/audits/metrics/first-contentful-paint.js +1 -1
- package/core/audits/metrics/first-meaningful-paint.js +1 -1
- package/core/audits/metrics/interactive.js +1 -1
- package/core/audits/metrics/largest-contentful-paint.js +1 -1
- package/core/audits/metrics/max-potential-fid.js +1 -1
- package/core/audits/metrics/speed-index.js +1 -1
- package/core/audits/metrics/total-blocking-time.js +1 -1
- package/core/audits/metrics.js +2 -2
- package/core/audits/network-requests.js +2 -2
- package/core/audits/network-rtt.js +3 -3
- package/core/audits/network-server-latency.js +3 -3
- package/core/audits/no-unload-listeners.js +2 -2
- package/core/audits/performance-budget.js +2 -2
- package/core/audits/predictive-perf.js +8 -8
- package/core/audits/preload-fonts.js +1 -1
- package/core/audits/preload-lcp-image.js +4 -4
- package/core/audits/redirects.js +4 -4
- package/core/audits/resource-summary.js +1 -1
- package/core/audits/screenshot-thumbnails.js +1 -1
- package/core/audits/script-treemap-data.js +5 -5
- package/core/audits/seo/canonical.js +1 -1
- package/core/audits/seo/font-size.js +2 -2
- package/core/audits/seo/http-status-code.js +1 -1
- package/core/audits/seo/is-crawlable.js +1 -1
- package/core/audits/seo/tap-targets.js +2 -2
- package/core/audits/server-response-time.js +1 -1
- package/core/audits/splash-screen.js +1 -1
- package/core/audits/themed-omnibox.js +1 -1
- package/core/audits/third-party-facades.js +3 -3
- package/core/audits/third-party-summary.js +2 -2
- package/core/audits/timing-budget.js +2 -2
- package/core/audits/user-timings.js +1 -1
- package/core/audits/uses-rel-preconnect.js +9 -8
- package/core/audits/uses-rel-preload.js +4 -4
- package/core/audits/viewport.js +2 -2
- package/core/audits/violation-audit.js +2 -2
- package/core/audits/work-during-interaction.js +4 -4
- package/core/computed/critical-request-chains.js +5 -3
- package/core/computed/image-records.js +3 -1
- package/core/computed/js-bundles.js +2 -1
- package/core/computed/load-simulator.js +3 -5
- package/core/computed/main-resource.js +3 -2
- package/core/computed/main-thread-tasks.js +3 -2
- package/core/computed/manifest-values.js +3 -1
- package/core/computed/metrics/cumulative-layout-shift.js +3 -2
- package/core/computed/metrics/first-contentful-paint-all-frames.js +3 -2
- package/core/computed/metrics/first-contentful-paint.js +4 -3
- package/core/computed/metrics/first-meaningful-paint.js +4 -3
- package/core/computed/metrics/interactive.js +4 -3
- package/core/computed/metrics/lantern-first-contentful-paint.js +3 -2
- package/core/computed/metrics/lantern-first-meaningful-paint.js +4 -3
- package/core/computed/metrics/lantern-interactive.js +4 -3
- package/core/computed/metrics/lantern-largest-contentful-paint.js +4 -3
- package/core/computed/metrics/lantern-max-potential-fid.js +5 -4
- package/core/computed/metrics/lantern-metric.js +6 -6
- package/core/computed/metrics/lantern-speed-index.js +5 -4
- package/core/computed/metrics/lantern-total-blocking-time.js +5 -4
- package/core/computed/metrics/largest-contentful-paint-all-frames.js +3 -2
- package/core/computed/metrics/largest-contentful-paint.js +4 -3
- package/core/computed/metrics/max-potential-fid.js +4 -3
- package/core/computed/metrics/metric.js +3 -3
- package/core/computed/metrics/navigation-metric.js +4 -3
- package/core/computed/metrics/responsiveness.js +3 -2
- package/core/computed/metrics/speed-index.js +5 -4
- package/core/computed/metrics/timing-summary.js +15 -14
- package/core/computed/metrics/total-blocking-time.js +5 -4
- package/core/computed/module-duplication.js +5 -3
- package/core/computed/network-analysis.js +3 -2
- package/core/computed/network-records.js +2 -1
- package/core/computed/page-dependency-graph.js +13 -11
- package/core/computed/processed-navigation.js +2 -1
- package/core/computed/processed-trace.js +2 -1
- package/core/computed/resource-summary.js +4 -2
- package/core/computed/screenshots.js +2 -1
- package/core/computed/speedline.js +3 -2
- package/core/computed/unused-css.js +3 -2
- package/core/computed/unused-javascript-summary.js +2 -1
- package/core/computed/user-timings.js +3 -2
- package/core/computed/viewport-meta.js +2 -1
- package/core/fraggle-rock/gather/navigation-runner.js +1 -1
- package/core/gather/gather-runner.js +1 -1
- package/core/gather/gatherers/dobetterweb/optimized-images.js +1 -1
- package/core/gather/gatherers/dobetterweb/response-compression.js +1 -1
- package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +1 -1
- package/core/gather/gatherers/inspector-issues.js +1 -1
- package/core/gather/gatherers/link-elements.js +1 -1
- package/core/gather/gatherers/main-document-content.js +1 -1
- package/core/gather/gatherers/script-elements.js +1 -1
- package/core/gather/gatherers/trace-elements.js +4 -4
- package/core/index.js +1 -1
- package/core/lib/asset-saver.js +4 -4
- package/dist/report/flow.js +11 -11
- package/lol.report.json +5856 -0
- package/package.json +1 -1
- package/shared/localization/locales/en-US.ctc.json +8059 -0
- package/shared/localization/locales/en-XL.ctc.json +8036 -0
- package/changelog.md +0 -5902
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
-
import LanternMetric from './lantern-metric.js';
|
|
8
|
+
import {LanternMetric} from './lantern-metric.js';
|
|
9
9
|
import {LighthouseError} from '../../lib/lh-error.js';
|
|
10
|
-
import LanternFirstContentfulPaint from './lantern-first-contentful-paint.js';
|
|
10
|
+
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
11
11
|
|
|
12
12
|
/** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
|
|
13
13
|
|
|
@@ -76,7 +76,8 @@ class LanternFirstMeaningfulPaint extends LanternMetric {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
const LanternFirstMeaningfulPaintComputed = makeComputedArtifact(
|
|
80
80
|
LanternFirstMeaningfulPaint,
|
|
81
81
|
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
82
82
|
);
|
|
83
|
+
export {LanternFirstMeaningfulPaintComputed as LanternFirstMeaningfulPaint};
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
-
import LanternMetric from './lantern-metric.js';
|
|
8
|
+
import {LanternMetric} from './lantern-metric.js';
|
|
9
9
|
import {BaseNode} from '../../lib/dependency-graph/base-node.js';
|
|
10
10
|
import {NetworkRequest} from '../../lib/network-request.js';
|
|
11
|
-
import LanternFirstMeaningfulPaint from './lantern-first-meaningful-paint.js';
|
|
11
|
+
import {LanternFirstMeaningfulPaint} from './lantern-first-meaningful-paint.js';
|
|
12
12
|
|
|
13
13
|
/** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
|
|
14
14
|
|
|
@@ -106,7 +106,8 @@ class LanternInteractive extends LanternMetric {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
const LanternInteractiveComputed = makeComputedArtifact(
|
|
110
110
|
LanternInteractive,
|
|
111
111
|
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
112
112
|
);
|
|
113
|
+
export {LanternInteractiveComputed as LanternInteractive};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
-
import LanternMetric from './lantern-metric.js';
|
|
8
|
+
import {LanternMetric} from './lantern-metric.js';
|
|
9
9
|
import {LighthouseError} from '../../lib/lh-error.js';
|
|
10
|
-
import LanternFirstContentfulPaint from './lantern-first-contentful-paint.js';
|
|
10
|
+
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
11
11
|
|
|
12
12
|
/** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
|
|
13
13
|
|
|
@@ -104,7 +104,8 @@ class LanternLargestContentfulPaint extends LanternMetric {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
const LanternLargestContentfulPaintComputed = makeComputedArtifact(
|
|
108
108
|
LanternLargestContentfulPaint,
|
|
109
109
|
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
110
110
|
);
|
|
111
|
+
export {LanternLargestContentfulPaintComputed as LanternLargestContentfulPaint};
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
-
import
|
|
8
|
+
import {LanternMetric} from './lantern-metric.js';
|
|
9
9
|
import {BaseNode} from '../../lib/dependency-graph/base-node.js';
|
|
10
|
-
import LanternFirstContentfulPaint from './lantern-first-contentful-paint.js';
|
|
10
|
+
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
11
11
|
|
|
12
12
|
/** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
|
|
13
13
|
|
|
14
|
-
class LanternMaxPotentialFID extends
|
|
14
|
+
class LanternMaxPotentialFID extends LanternMetric {
|
|
15
15
|
/**
|
|
16
16
|
* @return {LH.Gatherer.Simulation.MetricCoefficients}
|
|
17
17
|
*/
|
|
@@ -86,7 +86,8 @@ class LanternMaxPotentialFID extends LanternMetricArtifact {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
const LanternMaxPotentialFIDComputed = makeComputedArtifact(
|
|
90
90
|
LanternMaxPotentialFID,
|
|
91
91
|
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
92
92
|
);
|
|
93
|
+
export {LanternMaxPotentialFIDComputed as LanternMaxPotentialFID};
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
import {BaseNode} from '../../lib/dependency-graph/base-node.js';
|
|
8
8
|
import {NetworkRequest} from '../../lib/network-request.js';
|
|
9
|
-
import ProcessedTrace from '../processed-trace.js';
|
|
10
|
-
import ProcessedNavigation from '../processed-navigation.js';
|
|
11
|
-
import PageDependencyGraph from '../page-dependency-graph.js';
|
|
12
|
-
import LoadSimulator from '../load-simulator.js';
|
|
9
|
+
import {ProcessedTrace} from '../processed-trace.js';
|
|
10
|
+
import {ProcessedNavigation} from '../processed-navigation.js';
|
|
11
|
+
import {PageDependencyGraph} from '../page-dependency-graph.js';
|
|
12
|
+
import {LoadSimulator} from '../load-simulator.js';
|
|
13
13
|
|
|
14
14
|
/** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
|
|
15
15
|
/** @typedef {import('../../lib/dependency-graph/network-node').NetworkNode} NetworkNode */
|
|
@@ -24,7 +24,7 @@ import LoadSimulator from '../load-simulator.js';
|
|
|
24
24
|
* @property {{speedIndex: number}=} speedline
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
class
|
|
27
|
+
class LanternMetric {
|
|
28
28
|
/**
|
|
29
29
|
* @param {Node} dependencyGraph
|
|
30
30
|
* @param {function(NetworkNode):boolean=} condition
|
|
@@ -161,4 +161,4 @@ class LanternMetricArtifact {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
export
|
|
164
|
+
export {LanternMetric};
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
-
import LanternMetric from './lantern-metric.js';
|
|
8
|
+
import {LanternMetric} from './lantern-metric.js';
|
|
9
9
|
import {BaseNode} from '../../lib/dependency-graph/base-node.js';
|
|
10
|
-
import Speedline from '../speedline.js';
|
|
11
|
-
import LanternFirstContentfulPaint from './lantern-first-contentful-paint.js';
|
|
10
|
+
import {Speedline} from '../speedline.js';
|
|
11
|
+
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
12
12
|
import {throttling as defaultThrottling} from '../../config/constants.js';
|
|
13
13
|
|
|
14
14
|
/** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
|
|
@@ -143,7 +143,8 @@ class LanternSpeedIndex extends LanternMetric {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
const LanternSpeedIndexComputed = makeComputedArtifact(
|
|
147
147
|
LanternSpeedIndex,
|
|
148
148
|
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
149
149
|
);
|
|
150
|
+
export {LanternSpeedIndexComputed as LanternSpeedIndex};
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
-
import LanternMetric from './lantern-metric.js';
|
|
8
|
+
import {LanternMetric} from './lantern-metric.js';
|
|
9
9
|
import {BaseNode} from '../../lib/dependency-graph/base-node.js';
|
|
10
|
-
import LanternFirstContentfulPaint from './lantern-first-contentful-paint.js';
|
|
11
|
-
import LanternInteractive from './lantern-interactive.js';
|
|
10
|
+
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
11
|
+
import {LanternInteractive} from './lantern-interactive.js';
|
|
12
12
|
import {BLOCKING_TIME_THRESHOLD, calculateSumOfBlockingTime} from './tbt-utils.js';
|
|
13
13
|
|
|
14
14
|
/** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
|
|
@@ -119,7 +119,8 @@ class LanternTotalBlockingTime extends LanternMetric {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
const LanternTotalBlockingTimeComputed = makeComputedArtifact(
|
|
123
123
|
LanternTotalBlockingTime,
|
|
124
124
|
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
125
125
|
);
|
|
126
|
+
export {LanternTotalBlockingTimeComputed as LanternTotalBlockingTime};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
12
|
-
import NavigationMetric from './navigation-metric.js';
|
|
12
|
+
import {NavigationMetric} from './navigation-metric.js';
|
|
13
13
|
import {LighthouseError} from '../../lib/lh-error.js';
|
|
14
14
|
|
|
15
15
|
class LargestContentfulPaintAllFrames extends NavigationMetric {
|
|
@@ -38,7 +38,8 @@ class LargestContentfulPaintAllFrames extends NavigationMetric {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
const LargestContentfulPaintAllFramesComputed = makeComputedArtifact(
|
|
42
42
|
LargestContentfulPaintAllFrames,
|
|
43
43
|
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
44
44
|
);
|
|
45
|
+
export {LargestContentfulPaintAllFramesComputed as LargestContentfulPaintAllFrames};
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
16
|
-
import NavigationMetric from './navigation-metric.js';
|
|
16
|
+
import {NavigationMetric} from './navigation-metric.js';
|
|
17
17
|
import {LighthouseError} from '../../lib/lh-error.js';
|
|
18
|
-
import LanternLargestContentfulPaint from './lantern-largest-contentful-paint.js';
|
|
18
|
+
import {LanternLargestContentfulPaint} from './lantern-largest-contentful-paint.js';
|
|
19
19
|
|
|
20
20
|
class LargestContentfulPaint extends NavigationMetric {
|
|
21
21
|
/**
|
|
@@ -45,7 +45,8 @@ class LargestContentfulPaint extends NavigationMetric {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
const LargestContentfulPaintComputed = makeComputedArtifact(
|
|
49
49
|
LargestContentfulPaint,
|
|
50
50
|
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
51
51
|
);
|
|
52
|
+
export {LargestContentfulPaintComputed as LargestContentfulPaint};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
-
import NavigationMetric from './navigation-metric.js';
|
|
9
|
-
import LanternMaxPotentialFID from './lantern-max-potential-fid.js';
|
|
8
|
+
import {NavigationMetric} from './navigation-metric.js';
|
|
9
|
+
import {LanternMaxPotentialFID} from './lantern-max-potential-fid.js';
|
|
10
10
|
import {TraceProcessor} from '../../lib/tracehouse/trace-processor.js';
|
|
11
11
|
|
|
12
12
|
class MaxPotentialFID extends NavigationMetric {
|
|
@@ -38,7 +38,8 @@ class MaxPotentialFID extends NavigationMetric {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
const MaxPotentialFIDComputed = makeComputedArtifact(
|
|
42
42
|
MaxPotentialFID,
|
|
43
43
|
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
44
44
|
);
|
|
45
|
+
export {MaxPotentialFIDComputed as MaxPotentialFID};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {TraceProcessor} from '../../lib/tracehouse/trace-processor.js';
|
|
8
|
-
import ProcessedTrace from '../processed-trace.js';
|
|
9
|
-
import ProcessedNavigation from '../processed-navigation.js';
|
|
10
|
-
import NetworkRecords from '../network-records.js';
|
|
8
|
+
import {ProcessedTrace} from '../processed-trace.js';
|
|
9
|
+
import {ProcessedNavigation} from '../processed-navigation.js';
|
|
10
|
+
import {NetworkRecords} from '../network-records.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @fileOverview Encapsulates logic for choosing the correct metric computation method based on the
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import Metric from './metric.js';
|
|
8
|
-
|
|
9
7
|
/**
|
|
10
8
|
* @fileOverview Enforces that a metric can only be computed on navigations.
|
|
11
9
|
*/
|
|
10
|
+
|
|
11
|
+
import Metric from './metric.js';
|
|
12
|
+
|
|
12
13
|
class NavigationMetric extends Metric {
|
|
13
14
|
/**
|
|
14
15
|
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
@@ -42,4 +43,4 @@ class NavigationMetric extends Metric {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
export
|
|
46
|
+
export {NavigationMetric};
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* @typedef {{name: 'FallbackTiming', duration: number}} FallbackTimingEvent
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
import ProcessedTrace from '../processed-trace.js';
|
|
33
|
+
import {ProcessedTrace} from '../processed-trace.js';
|
|
34
34
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
35
35
|
|
|
36
36
|
const KEYBOARD_EVENTS = new Set(['keydown', 'keypress', 'keyup']);
|
|
@@ -150,7 +150,8 @@ class Responsiveness {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
const ResponsivenessComputed = makeComputedArtifact(Responsiveness, [
|
|
154
154
|
'trace',
|
|
155
155
|
'settings',
|
|
156
156
|
]);
|
|
157
|
+
export {ResponsivenessComputed as Responsiveness};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
-
import NavigationMetric from './navigation-metric.js';
|
|
9
|
-
import LanternSpeedIndex from './lantern-speed-index.js';
|
|
10
|
-
import Speedline from '../speedline.js';
|
|
8
|
+
import {NavigationMetric} from './navigation-metric.js';
|
|
9
|
+
import {LanternSpeedIndex} from './lantern-speed-index.js';
|
|
10
|
+
import {Speedline} from '../speedline.js';
|
|
11
11
|
|
|
12
12
|
class SpeedIndex extends NavigationMetric {
|
|
13
13
|
/**
|
|
@@ -33,7 +33,8 @@ class SpeedIndex extends NavigationMetric {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
const SpeedIndexComputed = makeComputedArtifact(
|
|
37
37
|
SpeedIndex,
|
|
38
38
|
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
39
39
|
);
|
|
40
|
+
export {SpeedIndexComputed as SpeedIndex};
|
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import ProcessedTrace from '../processed-trace.js';
|
|
8
|
-
import ProcessedNavigation from '../processed-navigation.js';
|
|
9
|
-
import Speedline from '../speedline.js';
|
|
10
|
-
import FirstContentfulPaint from './first-contentful-paint.js';
|
|
11
|
-
import FirstContentfulPaintAllFrames from './first-contentful-paint-all-frames.js';
|
|
12
|
-
import FirstMeaningfulPaint from './first-meaningful-paint.js';
|
|
13
|
-
import LargestContentfulPaint from './largest-contentful-paint.js';
|
|
14
|
-
import LargestContentfulPaintAllFrames from './largest-contentful-paint-all-frames.js';
|
|
15
|
-
import Interactive from './interactive.js';
|
|
16
|
-
import CumulativeLayoutShift from './cumulative-layout-shift.js';
|
|
17
|
-
import SpeedIndex from './speed-index.js';
|
|
18
|
-
import MaxPotentialFID from './max-potential-fid.js';
|
|
19
|
-
import TotalBlockingTime from './total-blocking-time.js';
|
|
7
|
+
import {ProcessedTrace} from '../processed-trace.js';
|
|
8
|
+
import {ProcessedNavigation} from '../processed-navigation.js';
|
|
9
|
+
import {Speedline} from '../speedline.js';
|
|
10
|
+
import {FirstContentfulPaint} from './first-contentful-paint.js';
|
|
11
|
+
import {FirstContentfulPaintAllFrames} from './first-contentful-paint-all-frames.js';
|
|
12
|
+
import {FirstMeaningfulPaint} from './first-meaningful-paint.js';
|
|
13
|
+
import {LargestContentfulPaint} from './largest-contentful-paint.js';
|
|
14
|
+
import {LargestContentfulPaintAllFrames} from './largest-contentful-paint-all-frames.js';
|
|
15
|
+
import {Interactive} from './interactive.js';
|
|
16
|
+
import {CumulativeLayoutShift} from './cumulative-layout-shift.js';
|
|
17
|
+
import {SpeedIndex} from './speed-index.js';
|
|
18
|
+
import {MaxPotentialFID} from './max-potential-fid.js';
|
|
19
|
+
import {TotalBlockingTime} from './total-blocking-time.js';
|
|
20
20
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
21
21
|
|
|
22
22
|
class TimingSummary {
|
|
@@ -150,7 +150,8 @@ class TimingSummary {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
const TimingSummaryComputed = makeComputedArtifact(
|
|
154
154
|
TimingSummary,
|
|
155
155
|
['devtoolsLog', 'gatherContext', 'settings', 'trace', 'URL']
|
|
156
156
|
);
|
|
157
|
+
export {TimingSummaryComputed as TimingSummary};
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
8
|
import ComputedMetric from './metric.js';
|
|
9
9
|
import {TraceProcessor} from '../../lib/tracehouse/trace-processor.js';
|
|
10
|
-
import LanternTotalBlockingTime from './lantern-total-blocking-time.js';
|
|
11
|
-
import
|
|
10
|
+
import {LanternTotalBlockingTime} from './lantern-total-blocking-time.js';
|
|
11
|
+
import {Interactive} from './interactive.js';
|
|
12
12
|
import {calculateSumOfBlockingTime} from './tbt-utils.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -46,7 +46,7 @@ class TotalBlockingTime extends ComputedMetric {
|
|
|
46
46
|
if (data.processedNavigation) {
|
|
47
47
|
const {firstContentfulPaint} = data.processedNavigation.timings;
|
|
48
48
|
const metricData = ComputedMetric.getMetricComputationInput(data);
|
|
49
|
-
const interactiveTimeMs = (await
|
|
49
|
+
const interactiveTimeMs = (await Interactive.request(metricData, context)).timing;
|
|
50
50
|
|
|
51
51
|
return {
|
|
52
52
|
timing: calculateSumOfBlockingTime(
|
|
@@ -67,7 +67,8 @@ class TotalBlockingTime extends ComputedMetric {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
const TotalBlockingTimeComputed = makeComputedArtifact(
|
|
71
71
|
TotalBlockingTime,
|
|
72
72
|
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
73
73
|
);
|
|
74
|
+
export {TotalBlockingTimeComputed as TotalBlockingTime};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
8
|
-
import
|
|
8
|
+
import {JSBundles} from './js-bundles.js';
|
|
9
9
|
|
|
10
10
|
const RELATIVE_SIZE_THRESHOLD = 0.1;
|
|
11
11
|
const ABSOLUTE_SIZE_THRESHOLD_BYTES = 1024 * 0.5;
|
|
@@ -77,7 +77,7 @@ class ModuleDuplication {
|
|
|
77
77
|
* @param {LH.Artifacts.ComputedContext} context
|
|
78
78
|
*/
|
|
79
79
|
static async compute_(artifacts, context) {
|
|
80
|
-
const bundles = await
|
|
80
|
+
const bundles = await JSBundles.request(artifacts, context);
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* @typedef SourceData
|
|
@@ -133,4 +133,6 @@ class ModuleDuplication {
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
const ModuleDuplicationComputed =
|
|
137
|
+
makeComputedArtifact(ModuleDuplication, ['Scripts', 'SourceMaps']);
|
|
138
|
+
export {ModuleDuplicationComputed as ModuleDuplication};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
8
8
|
import {NetworkAnalyzer} from '../lib/dependency-graph/simulator/network-analyzer.js';
|
|
9
|
-
import NetworkRecords from './network-records.js';
|
|
9
|
+
import {NetworkRecords} from './network-records.js';
|
|
10
10
|
|
|
11
11
|
class NetworkAnalysis {
|
|
12
12
|
/**
|
|
@@ -60,4 +60,5 @@ class NetworkAnalysis {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
const NetworkAnalysisComputed = makeComputedArtifact(NetworkAnalysis, null);
|
|
64
|
+
export {NetworkAnalysisComputed as NetworkAnalysis};
|
|
@@ -9,13 +9,21 @@ import {NetworkNode} from '../lib/dependency-graph/network-node.js';
|
|
|
9
9
|
import {CPUNode} from '../lib/dependency-graph/cpu-node.js';
|
|
10
10
|
import {TraceProcessor} from '../lib/tracehouse/trace-processor.js';
|
|
11
11
|
import {NetworkRequest} from '../lib/network-request.js';
|
|
12
|
-
import ProcessedTrace from './processed-trace.js';
|
|
13
|
-
import NetworkRecords from './network-records.js';
|
|
12
|
+
import {ProcessedTrace} from './processed-trace.js';
|
|
13
|
+
import {NetworkRecords} from './network-records.js';
|
|
14
14
|
import {NetworkAnalyzer} from '../lib/dependency-graph/simulator/network-analyzer.js';
|
|
15
15
|
|
|
16
16
|
/** @typedef {import('../lib/dependency-graph/base-node.js').Node} Node */
|
|
17
17
|
/** @typedef {Omit<LH.Artifacts['URL'], 'initialUrl'|'finalUrl'>} URLArtifact */
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* @typedef {Object} NetworkNodeOutput
|
|
21
|
+
* @property {Array<NetworkNode>} nodes
|
|
22
|
+
* @property {Map<string, NetworkNode>} idToNodeMap
|
|
23
|
+
* @property {Map<string, Array<NetworkNode>>} urlToNodeMap
|
|
24
|
+
* @property {Map<string, NetworkNode|null>} frameIdToNodeMap
|
|
25
|
+
*/
|
|
26
|
+
|
|
19
27
|
// Shorter tasks have negligible impact on simulation results.
|
|
20
28
|
const SIGNIFICANT_DUR_THRESHOLD_MS = 10;
|
|
21
29
|
|
|
@@ -503,12 +511,6 @@ class PageDependencyGraph {
|
|
|
503
511
|
}
|
|
504
512
|
}
|
|
505
513
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
* @typedef {Object} NetworkNodeOutput
|
|
510
|
-
* @property {Array<NetworkNode>} nodes
|
|
511
|
-
* @property {Map<string, NetworkNode>} idToNodeMap
|
|
512
|
-
* @property {Map<string, Array<NetworkNode>>} urlToNodeMap
|
|
513
|
-
* @property {Map<string, NetworkNode|null>} frameIdToNodeMap
|
|
514
|
-
*/
|
|
514
|
+
const PageDependencyGraphComputed =
|
|
515
|
+
makeComputedArtifact(PageDependencyGraph, ['devtoolsLog', 'trace', 'URL']);
|
|
516
|
+
export {PageDependencyGraphComputed as PageDependencyGraph};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
8
|
-
import NetworkRecords from './network-records.js';
|
|
8
|
+
import {NetworkRecords} from './network-records.js';
|
|
9
9
|
import {NetworkRequest} from '../lib/network-request.js';
|
|
10
10
|
import {Budget} from '../config/budget.js';
|
|
11
11
|
import {Util} from '../util.cjs';
|
|
@@ -109,4 +109,6 @@ class ResourceSummary {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
const ResourceSummaryComputed =
|
|
113
|
+
makeComputedArtifact(ResourceSummary, ['URL', 'devtoolsLog', 'budgets']);
|
|
114
|
+
export {ResourceSummaryComputed as ResourceSummary};
|
|
@@ -8,7 +8,7 @@ import speedline from 'speedline-core';
|
|
|
8
8
|
|
|
9
9
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
10
10
|
import {LighthouseError} from '../lib/lh-error.js';
|
|
11
|
-
import ProcessedTrace from './processed-trace.js';
|
|
11
|
+
import {ProcessedTrace} from './processed-trace.js';
|
|
12
12
|
|
|
13
13
|
class Speedline {
|
|
14
14
|
/**
|
|
@@ -51,4 +51,5 @@ class Speedline {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
const SpeedlineComputed = makeComputedArtifact(Speedline, null);
|
|
55
|
+
export {SpeedlineComputed as Speedline};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
8
8
|
import {ByteEfficiencyAudit} from '../audits/byte-efficiency/byte-efficiency-audit.js';
|
|
9
|
-
import NetworkRecords from './network-records.js';
|
|
9
|
+
import {NetworkRecords} from './network-records.js';
|
|
10
10
|
|
|
11
11
|
const PREVIEW_LENGTH = 100;
|
|
12
12
|
|
|
@@ -149,4 +149,5 @@ class UnusedCSS {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
const UnusedCSSComputed = makeComputedArtifact(UnusedCSS, ['CSSUsage', 'devtoolsLog']);
|
|
153
|
+
export {UnusedCSSComputed as UnusedCSS};
|
|
@@ -148,7 +148,8 @@ class UnusedJavascriptSummary {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
const UnusedJavascriptSummaryComputed = makeComputedArtifact(
|
|
152
152
|
UnusedJavascriptSummary,
|
|
153
153
|
['bundle', 'scriptCoverage', 'scriptId']
|
|
154
154
|
);
|
|
155
|
+
export {UnusedJavascriptSummaryComputed as UnusedJavascriptSummary};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
8
|
-
import ProcessedTrace from './processed-trace.js';
|
|
8
|
+
import {ProcessedTrace} from './processed-trace.js';
|
|
9
9
|
|
|
10
10
|
/** @typedef {{name: string, isMark: true, args: LH.TraceEvent['args'], startTime: number}} MarkEvent */
|
|
11
11
|
/** @typedef {{name: string, isMark: false, args: LH.TraceEvent['args'], startTime: number, endTime: number, duration: number}} MeasureEvent */
|
|
@@ -79,4 +79,5 @@ class UserTimings {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
const UserTimingsComputed = makeComputedArtifact(UserTimings, null);
|
|
83
|
+
export {UserTimingsComputed as UserTimings};
|
|
@@ -45,7 +45,8 @@ class ViewportMeta {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
const ViewportMetaComputed = makeComputedArtifact(ViewportMeta, null);
|
|
49
|
+
export {ViewportMetaComputed as ViewportMeta};
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* @typedef {object} ViewportMetaResult
|
|
@@ -23,7 +23,7 @@ import UrlUtils from '../../lib/url-utils.js';
|
|
|
23
23
|
import {getPageLoadError} from '../../lib/navigation-error.js';
|
|
24
24
|
import Trace from '../../gather/gatherers/trace.js';
|
|
25
25
|
import DevtoolsLog from '../../gather/gatherers/devtools-log.js';
|
|
26
|
-
import NetworkRecords from '../../computed/network-records.js';
|
|
26
|
+
import {NetworkRecords} from '../../computed/network-records.js';
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* @typedef NavigationContext
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import log from 'lighthouse-logger';
|
|
8
8
|
|
|
9
|
-
import NetworkRecords from '../computed/network-records.js';
|
|
9
|
+
import {NetworkRecords} from '../computed/network-records.js';
|
|
10
10
|
import {getPageLoadError} from '../lib/navigation-error.js';
|
|
11
11
|
import * as emulation from '../lib/emulation.js';
|
|
12
12
|
import * as constants from '../config/constants.js';
|
|
@@ -16,7 +16,7 @@ import FRGatherer from '../../../fraggle-rock/gather/base-gatherer.js';
|
|
|
16
16
|
import UrlUtils from '../../../lib/url-utils.js';
|
|
17
17
|
import {NetworkRequest} from '../../../lib/network-request.js';
|
|
18
18
|
import {Sentry} from '../../../lib/sentry.js';
|
|
19
|
-
import NetworkRecords from '../../../computed/network-records.js';
|
|
19
|
+
import {NetworkRecords} from '../../../computed/network-records.js';
|
|
20
20
|
import DevtoolsLog from '../devtools-log.js';
|
|
21
21
|
|
|
22
22
|
// Image encoding can be slow and we don't want to spend forever on it.
|
|
@@ -19,7 +19,7 @@ import {Sentry} from '../../../lib/sentry.js';
|
|
|
19
19
|
import {NetworkRequest} from '../../../lib/network-request.js';
|
|
20
20
|
import DevtoolsLog from '../devtools-log.js';
|
|
21
21
|
import {fetchResponseBodyFromCache} from '../../driver/network.js';
|
|
22
|
-
import NetworkRecords from '../../../computed/network-records.js';
|
|
22
|
+
import {NetworkRecords} from '../../../computed/network-records.js';
|
|
23
23
|
|
|
24
24
|
const CHROME_EXTENSION_PROTOCOL = 'chrome-extension:';
|
|
25
25
|
const compressionHeaders = [
|