lighthouse 12.5.1 → 12.6.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/run.js +1 -1
- package/cli/test/smokehouse/config/exclusions.js +2 -0
- package/cli/test/smokehouse/lib/concurrent-mapper.d.ts +3 -3
- package/core/audits/audit.d.ts +1 -1
- package/core/audits/audit.js +3 -2
- package/core/audits/bootup-time.d.ts +1 -1
- package/core/audits/bootup-time.js +3 -3
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +1 -1
- package/core/audits/byte-efficiency/duplicated-javascript.js +1 -1
- package/core/audits/byte-efficiency/efficient-animated-content.js +1 -1
- package/core/audits/byte-efficiency/legacy-javascript.js +2 -3
- package/core/audits/byte-efficiency/modern-image-formats.js +1 -1
- package/core/audits/byte-efficiency/offscreen-images.js +4 -4
- package/core/audits/byte-efficiency/render-blocking-resources.js +4 -4
- package/core/audits/byte-efficiency/total-byte-weight.d.ts +1 -1
- package/core/audits/byte-efficiency/total-byte-weight.js +2 -2
- package/core/audits/byte-efficiency/unminified-css.js +1 -1
- package/core/audits/byte-efficiency/unminified-javascript.js +1 -1
- package/core/audits/byte-efficiency/unused-css-rules.js +2 -2
- package/core/audits/byte-efficiency/unused-javascript.js +1 -1
- package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-long-cache-ttl.js +2 -2
- package/core/audits/byte-efficiency/uses-optimized-images.js +2 -2
- package/core/audits/byte-efficiency/uses-responsive-images.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-responsive-images.js +1 -1
- package/core/audits/byte-efficiency/uses-text-compression.js +1 -1
- package/core/audits/clickjacking-mitigation.js +2 -2
- package/core/audits/critical-request-chains.js +3 -3
- package/core/audits/csp-xss.js +2 -2
- package/core/audits/diagnostics.js +3 -3
- package/core/audits/dobetterweb/charset.js +2 -2
- package/core/audits/dobetterweb/doctype.js +2 -2
- package/core/audits/dobetterweb/dom-size.d.ts +1 -1
- package/core/audits/dobetterweb/dom-size.js +3 -3
- package/core/audits/dobetterweb/uses-http2.js +2 -2
- package/core/audits/final-screenshot.js +2 -2
- package/core/audits/font-display.js +2 -2
- package/core/audits/has-hsts.js +2 -2
- package/core/audits/image-size-responsive.d.ts +3 -2
- package/core/audits/image-size-responsive.js +30 -4
- package/core/audits/insights/{use-cache-insight.d.ts → cache-insight.d.ts} +3 -3
- package/core/audits/insights/{use-cache-insight.js → cache-insight.js} +15 -13
- package/core/audits/insights/cls-culprits-insight.js +3 -3
- package/core/audits/insights/document-latency-insight.js +1 -1
- package/core/audits/insights/dom-size-insight.js +1 -1
- package/core/audits/insights/duplicated-javascript-insight.d.ts +13 -0
- package/core/audits/insights/duplicated-javascript-insight.js +36 -9
- package/core/audits/insights/font-display-insight.js +1 -1
- package/core/audits/insights/forced-reflow-insight.js +1 -1
- package/core/audits/insights/image-delivery-insight.js +1 -1
- package/core/audits/insights/insight-audit.d.ts +11 -9
- package/core/audits/insights/insight-audit.js +37 -35
- package/core/audits/insights/interaction-to-next-paint-insight.js +3 -6
- package/core/audits/insights/lcp-discovery-insight.js +6 -3
- package/core/audits/insights/lcp-phases-insight.js +3 -6
- package/core/audits/insights/legacy-javascript-insight.d.ts +23 -0
- package/core/audits/insights/legacy-javascript-insight.js +101 -0
- package/core/audits/insights/modern-http-insight.d.ts +11 -0
- package/core/audits/insights/modern-http-insight.js +53 -0
- package/core/audits/insights/network-dependency-tree-insight.d.ts +5 -0
- package/core/audits/insights/network-dependency-tree-insight.js +35 -13
- package/core/audits/insights/render-blocking-insight.js +1 -1
- package/core/audits/insights/slow-css-selector-insight.js +3 -1
- package/core/audits/insights/third-parties-insight.d.ts +3 -3
- package/core/audits/insights/third-parties-insight.js +28 -23
- package/core/audits/insights/viewport-insight.js +1 -1
- package/core/audits/is-on-https.js +2 -2
- package/core/audits/largest-contentful-paint-element.js +3 -3
- package/core/audits/layout-shifts.js +4 -4
- package/core/audits/lcp-lazy-loaded.js +1 -1
- package/core/audits/long-tasks.d.ts +1 -1
- package/core/audits/long-tasks.js +3 -3
- package/core/audits/main-thread-tasks.js +2 -2
- package/core/audits/mainthread-work-breakdown.d.ts +1 -1
- package/core/audits/mainthread-work-breakdown.js +2 -2
- package/core/audits/manual/manual-audit.d.ts +1 -1
- package/core/audits/metrics/cumulative-layout-shift.d.ts +1 -1
- package/core/audits/metrics/cumulative-layout-shift.js +2 -2
- package/core/audits/metrics/first-contentful-paint.js +3 -3
- package/core/audits/metrics/first-meaningful-paint.js +1 -1
- package/core/audits/metrics/interaction-to-next-paint.d.ts +1 -1
- package/core/audits/metrics/interaction-to-next-paint.js +2 -2
- package/core/audits/metrics/interactive.js +3 -3
- package/core/audits/metrics/largest-contentful-paint.js +3 -3
- package/core/audits/metrics/max-potential-fid.d.ts +1 -1
- package/core/audits/metrics/max-potential-fid.js +3 -3
- package/core/audits/metrics/speed-index.js +3 -3
- package/core/audits/metrics/total-blocking-time.js +3 -3
- package/core/audits/metrics.js +3 -3
- package/core/audits/network-requests.js +2 -2
- package/core/audits/network-rtt.js +2 -2
- package/core/audits/network-server-latency.js +2 -2
- package/core/audits/origin-isolation.js +2 -2
- package/core/audits/predictive-perf.js +3 -3
- package/core/audits/preload-fonts.js +2 -2
- package/core/audits/prioritize-lcp-image.js +3 -3
- package/core/audits/redirects.js +3 -3
- package/core/audits/resource-summary.js +2 -2
- package/core/audits/screenshot-thumbnails.js +2 -2
- package/core/audits/script-treemap-data.js +32 -2
- package/core/audits/seo/canonical.js +2 -2
- package/core/audits/seo/http-status-code.js +2 -2
- package/core/audits/seo/is-crawlable.js +2 -2
- package/core/audits/server-response-time.js +2 -2
- package/core/audits/third-party-cookies.js +1 -1
- package/core/audits/third-party-facades.js +2 -2
- package/core/audits/third-party-summary.js +2 -2
- package/core/audits/user-timings.d.ts +1 -1
- package/core/audits/user-timings.js +2 -2
- package/core/audits/uses-rel-preconnect.js +3 -3
- package/core/audits/uses-rel-preload.js +3 -3
- package/core/audits/valid-source-maps.js +2 -2
- package/core/audits/work-during-interaction.js +3 -3
- package/core/computed/critical-request-chains.d.ts +1 -1
- package/core/computed/document-urls.d.ts +4 -1
- package/core/computed/entity-classification.d.ts +1 -1
- package/core/computed/image-records.d.ts +1 -1
- package/core/computed/js-bundles.d.ts +1 -1
- package/core/computed/lcp-image-record.d.ts +1 -1
- package/core/computed/load-simulator.d.ts +1 -1
- package/core/computed/main-resource.d.ts +1 -1
- package/core/computed/main-thread-tasks.d.ts +1 -1
- package/core/computed/metrics/cumulative-layout-shift.d.ts +10 -1
- package/core/computed/metrics/first-contentful-paint-all-frames.d.ts +1 -1
- package/core/computed/metrics/first-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/interactive.d.ts +1 -1
- package/core/computed/metrics/lantern-first-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lantern-interactive.d.ts +1 -1
- package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lantern-max-potential-fid.d.ts +1 -1
- package/core/computed/metrics/lantern-speed-index.d.ts +1 -1
- package/core/computed/metrics/lantern-total-blocking-time.d.ts +1 -1
- package/core/computed/metrics/largest-contentful-paint-all-frames.d.ts +1 -1
- package/core/computed/metrics/largest-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lcp-breakdown.d.ts +5 -1
- package/core/computed/metrics/max-potential-fid.d.ts +1 -1
- package/core/computed/metrics/responsiveness.d.ts +1 -1
- package/core/computed/metrics/speed-index.d.ts +1 -1
- package/core/computed/metrics/time-to-first-byte.d.ts +1 -1
- package/core/computed/metrics/timing-summary.d.ts +4 -1
- package/core/computed/metrics/total-blocking-time.d.ts +1 -1
- package/core/computed/module-duplication.d.ts +5 -1
- package/core/computed/navigation-insights.d.ts +1 -1
- package/core/computed/network-analysis.d.ts +1 -1
- package/core/computed/network-records.d.ts +1 -1
- package/core/computed/page-dependency-graph.d.ts +1 -1
- package/core/computed/processed-navigation.d.ts +1 -1
- package/core/computed/processed-trace.d.ts +1 -1
- package/core/computed/resource-summary.d.ts +1 -1
- package/core/computed/screenshots.d.ts +4 -1
- package/core/computed/speedline.d.ts +1 -1
- package/core/computed/tbt-impact-tasks.d.ts +1 -1
- package/core/computed/trace-engine-result.d.ts +1 -1
- package/core/computed/unused-css.d.ts +1 -1
- package/core/computed/unused-javascript-summary.d.ts +1 -1
- package/core/computed/user-timings.d.ts +1 -1
- package/core/computed/viewport-meta.d.ts +1 -1
- package/core/config/default-config.js +11 -6
- package/core/config/experimental-config.js +3 -2
- package/core/gather/driver/network-monitor.d.ts +1 -1
- package/core/gather/driver/network.d.ts +1 -1
- package/core/gather/driver.d.ts +1 -1
- package/core/gather/gatherers/devtools-log.d.ts +1 -1
- package/core/gather/gatherers/dobetterweb/optimized-images.js +3 -10
- package/core/gather/gatherers/trace-elements.d.ts +3 -4
- package/core/gather/gatherers/trace-elements.js +6 -8
- package/core/gather/gatherers/trace.js +0 -3
- package/core/gather/navigation-runner.d.ts +1 -1
- package/core/gather/snapshot-runner.d.ts +1 -1
- package/core/gather/timespan-runner.d.ts +1 -1
- package/core/index.d.ts +6 -6
- package/core/lib/asset-saver.d.ts +1 -1
- package/core/lib/asset-saver.js +1 -1
- package/core/lib/bf-cache-strings.js +2 -0
- package/core/lib/deprecations-strings.d.ts +71 -76
- package/core/lib/deprecations-strings.js +22 -25
- package/core/lib/i18n/README.md +1 -1
- package/core/lib/i18n/i18n.d.ts +1 -1
- package/core/lib/i18n/i18n.js +4 -4
- package/core/lib/legacy-javascript/legacy-javascript.js +4 -11
- package/core/lib/legacy-javascript/package.json +14 -0
- package/core/lib/page-functions.d.ts +1 -1
- package/core/lib/stack-packs.js +1 -1
- package/core/lib/tracehouse/cpu-profile-model.d.ts +1 -1
- package/core/lib/tracehouse/main-thread-tasks.d.ts +3 -3
- package/core/lib/tracehouse/main-thread-tasks.js +8 -0
- package/core/lib/tracehouse/trace-processor.d.ts +1 -1
- package/core/lib/traces/metric-trace-events.d.ts +2 -2
- package/core/runner.js +2 -1
- package/core/scoring.d.ts +539 -3
- package/core/user-flow.d.ts +6 -6
- package/dist/report/bundle.esm.js +89 -19
- package/dist/report/flow.js +92 -22
- package/dist/report/standalone.js +89 -19
- package/flow-report/src/i18n/i18n.d.ts +6 -2
- package/package.json +17 -16
- package/readme.md +1 -1
- package/report/README.md +1 -1
- package/report/assets/styles.css +76 -9
- package/report/assets/templates.html +3 -1
- package/report/clients/standalone.js +6 -4
- package/report/renderer/category-renderer.d.ts +2 -2
- package/report/renderer/components.js +3 -9
- package/report/renderer/crc-details-renderer.d.ts +13 -31
- package/report/renderer/crc-details-renderer.js +49 -47
- package/report/renderer/details-renderer.d.ts +1 -1
- package/report/renderer/details-renderer.js +6 -0
- package/report/renderer/dom.js +7 -0
- package/report/renderer/features-util.d.ts +1 -1
- package/report/renderer/performance-category-renderer.d.ts +28 -2
- package/report/renderer/performance-category-renderer.js +121 -3
- package/report/renderer/report-utils.d.ts +3 -1
- package/report/renderer/report-utils.js +11 -4
- package/report/renderer/topbar-features.js +1 -9
- package/shared/localization/format.d.ts +1 -1
- package/shared/localization/locales/ar-XB.json +66 -6
- package/shared/localization/locales/ar.json +66 -6
- package/shared/localization/locales/bg.json +66 -6
- package/shared/localization/locales/ca.json +66 -6
- package/shared/localization/locales/cs.json +66 -6
- package/shared/localization/locales/da.json +66 -6
- package/shared/localization/locales/de.json +66 -6
- package/shared/localization/locales/el.json +66 -6
- package/shared/localization/locales/en-GB.json +66 -6
- package/shared/localization/locales/en-US.json +87 -36
- package/shared/localization/locales/en-XA.json +0 -6
- package/shared/localization/locales/en-XL.json +87 -36
- package/shared/localization/locales/es-419.json +66 -6
- package/shared/localization/locales/es.json +67 -7
- package/shared/localization/locales/fi.json +66 -6
- package/shared/localization/locales/fil.json +66 -6
- package/shared/localization/locales/fr.json +66 -6
- package/shared/localization/locales/he.json +66 -6
- package/shared/localization/locales/hi.json +66 -6
- package/shared/localization/locales/hr.json +66 -6
- package/shared/localization/locales/hu.json +66 -6
- package/shared/localization/locales/id.json +66 -6
- package/shared/localization/locales/it.json +67 -7
- package/shared/localization/locales/ja.json +66 -6
- package/shared/localization/locales/ko.json +66 -6
- package/shared/localization/locales/lt.json +66 -6
- package/shared/localization/locales/lv.json +66 -6
- package/shared/localization/locales/nl.json +66 -6
- package/shared/localization/locales/no.json +66 -6
- package/shared/localization/locales/pl.json +66 -6
- package/shared/localization/locales/pt-PT.json +66 -6
- package/shared/localization/locales/pt.json +67 -7
- package/shared/localization/locales/ro.json +66 -6
- package/shared/localization/locales/ru.json +66 -6
- package/shared/localization/locales/sk.json +66 -6
- package/shared/localization/locales/sl.json +66 -6
- package/shared/localization/locales/sr-Latn.json +66 -6
- package/shared/localization/locales/sr.json +66 -6
- package/shared/localization/locales/sv.json +66 -6
- package/shared/localization/locales/ta.json +69 -9
- package/shared/localization/locales/te.json +66 -6
- package/shared/localization/locales/th.json +66 -6
- package/shared/localization/locales/tr.json +66 -6
- package/shared/localization/locales/uk.json +66 -6
- package/shared/localization/locales/vi.json +66 -6
- package/shared/localization/locales/zh-HK.json +67 -7
- package/shared/localization/locales/zh-TW.json +67 -7
- package/shared/localization/locales/zh.json +66 -6
- package/tsconfig-base.json +1 -1
- package/tsconfig.json +1 -0
- package/types/artifacts.d.ts +0 -2
- package/types/internal/node.d.ts +0 -16
- package/types/lhr/audit-details.d.ts +33 -1
- package/types/lhr/treemap.d.ts +5 -1
package/core/lib/i18n/i18n.js
CHANGED
|
@@ -24,9 +24,9 @@ const UIStrings = {
|
|
|
24
24
|
/** Used to show the duration in seconds that something lasted. The {timeInMs} placeholder will be replaced with the time duration, shown in seconds (e.g. 5.2 s) */
|
|
25
25
|
seconds: '{timeInMs, number, seconds}\xa0s',
|
|
26
26
|
/** Label shown per-audit to show how many bytes smaller the page could be if the user implemented the suggestions. The `{wastedBytes}` placeholder will be replaced with the number of bytes, shown in kibibytes (e.g. 148 KiB) */
|
|
27
|
-
displayValueByteSavings: '
|
|
27
|
+
displayValueByteSavings: 'Est savings of {wastedBytes, number, bytes}\xa0KiB',
|
|
28
28
|
/** Label shown per-audit to show how many milliseconds faster the page load could be if the user implemented the suggestions. The `{wastedMs}` placeholder will be replaced with the time duration, shown in milliseconds (e.g. 140 ms) */
|
|
29
|
-
displayValueMsSavings: '
|
|
29
|
+
displayValueMsSavings: 'Est savings of {wastedMs, number, milliseconds}\xa0ms',
|
|
30
30
|
/** Label shown per-audit to show how many HTML elements did not pass the audit. The `{# elements found}` placeholder will be replaced with the number of failing HTML elements. */
|
|
31
31
|
displayValueElementsFound: `{nodeCount, plural, =1 {1 element found} other {# elements found}}`,
|
|
32
32
|
/** Label for a column in a data table; entries will be the URL of a web resource */
|
|
@@ -40,9 +40,9 @@ const UIStrings = {
|
|
|
40
40
|
/** Label for a column in a data table; entries will be the time to live value of the cache header on a web resource. */
|
|
41
41
|
columnCacheTTL: 'Cache TTL',
|
|
42
42
|
/** Label for a column in a data table; entries will be the number of kilobytes the user could reduce their page by if they implemented the suggestions. */
|
|
43
|
-
columnWastedBytes: '
|
|
43
|
+
columnWastedBytes: 'Est Savings',
|
|
44
44
|
/** Label for a column in a data table; entries will be the number of milliseconds the user could reduce page load by if they implemented the suggestions. */
|
|
45
|
-
columnWastedMs: '
|
|
45
|
+
columnWastedMs: 'Est Savings',
|
|
46
46
|
/** Label for a table column that displays how much time each row spent blocking other work on the main thread, entries will be the number of milliseconds spent. */
|
|
47
47
|
columnBlockingTime: 'Main-Thread Blocking Time',
|
|
48
48
|
/** Label for a column in a data table; entries will be the number of milliseconds spent during a particular activity. */
|
|
@@ -15,21 +15,14 @@
|
|
|
15
15
|
/** @typedef {{name: string, line: number, column: number}} PatternMatchResult */
|
|
16
16
|
/** @typedef {{matches: PatternMatchResult[], estimatedByteSavings: number}} Result */
|
|
17
17
|
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
import {LH_ROOT} from '../../../shared/root.js';
|
|
21
|
-
|
|
22
|
-
const polyfillModuleDataJson = fs.readFileSync(
|
|
23
|
-
`${LH_ROOT}/core/lib/legacy-javascript/polyfill-module-data.json`, 'utf-8');
|
|
18
|
+
import polyfillModuleData_ from './polyfill-module-data.json' with { type: 'json' };
|
|
19
|
+
import graph_ from './polyfill-graph-data.json' with { type: 'json' };
|
|
24
20
|
|
|
25
21
|
/** @type {import('../../scripts/legacy-javascript/create-polyfill-module-data.js').PolyfillModuleData} */
|
|
26
|
-
const polyfillModuleData =
|
|
27
|
-
|
|
28
|
-
const graphJson = fs.readFileSync(
|
|
29
|
-
`${LH_ROOT}/core/lib/legacy-javascript/polyfill-graph-data.json`, 'utf-8');
|
|
22
|
+
const polyfillModuleData = polyfillModuleData_;
|
|
30
23
|
|
|
31
24
|
/** @type {import('../../scripts/legacy-javascript/create-polyfill-size-estimation.js').PolyfillSizeEstimator} */
|
|
32
|
-
const graph =
|
|
25
|
+
const graph = graph_;
|
|
33
26
|
|
|
34
27
|
/**
|
|
35
28
|
* Takes a list of patterns (consisting of a name identifier and a RegExp expression string)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "legacy-javascript",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"description": "Identify legacy polyfills and code transforms",
|
|
6
|
+
"main": "./legacy-javascript.js",
|
|
7
|
+
"repository": "GoogleChrome/lighthouse",
|
|
8
|
+
"author": "Google LLC",
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/GoogleChrome/lighthouse/issues"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/GoogleChrome/lighthouse#readme"
|
|
14
|
+
}
|
|
@@ -43,7 +43,7 @@ export type ParseSelector<T extends string> = import("typed-query-selector/parse
|
|
|
43
43
|
* @param {string|Error} [err] The error to convert
|
|
44
44
|
* @return {{__failedInBrowser: boolean, name: string, message: string, stack: string|undefined}}
|
|
45
45
|
*/
|
|
46
|
-
declare function wrapRuntimeEvalErrorInBrowser(err?: string | Error
|
|
46
|
+
declare function wrapRuntimeEvalErrorInBrowser(err?: string | Error): {
|
|
47
47
|
__failedInBrowser: boolean;
|
|
48
48
|
name: string;
|
|
49
49
|
message: string;
|
package/core/lib/stack-packs.js
CHANGED
|
@@ -223,6 +223,6 @@ export class CpuProfileModel {
|
|
|
223
223
|
* @param {Array<LH.Artifacts.TaskNode>} [knownTaskNodes]
|
|
224
224
|
* @return {Array<LH.TraceEvent>}
|
|
225
225
|
*/
|
|
226
|
-
synthesizeTraceEvents(knownTaskNodes?:
|
|
226
|
+
synthesizeTraceEvents(knownTaskNodes?: Array<LH.Artifacts.TaskNode>): Array<LH.TraceEvent>;
|
|
227
227
|
}
|
|
228
228
|
//# sourceMappingURL=cpu-profile-model.d.ts.map
|
|
@@ -59,7 +59,7 @@ export class MainThreadTasks {
|
|
|
59
59
|
* @param {LH.TraceEvent} [endEvent]
|
|
60
60
|
* @return {TaskNode}
|
|
61
61
|
*/
|
|
62
|
-
static _createNewTaskNode(event: LH.TraceEvent, endEvent?: LH.TraceEvent
|
|
62
|
+
static _createNewTaskNode(event: LH.TraceEvent, endEvent?: LH.TraceEvent): TaskNode;
|
|
63
63
|
/**
|
|
64
64
|
*
|
|
65
65
|
* @param {TaskNode} currentTask
|
|
@@ -132,7 +132,7 @@ export class MainThreadTasks {
|
|
|
132
132
|
* @param {TaskNode} task
|
|
133
133
|
* @param {TaskGroup} [parentGroup]
|
|
134
134
|
*/
|
|
135
|
-
static _computeRecursiveTaskGroup(task: TaskNode, parentGroup?:
|
|
135
|
+
static _computeRecursiveTaskGroup(task: TaskNode, parentGroup?: TaskGroup): void;
|
|
136
136
|
/**
|
|
137
137
|
* @param {LH.TraceEvent[]} mainThreadEvents
|
|
138
138
|
* @param {Array<{id: string, url: string}>} frames
|
|
@@ -143,7 +143,7 @@ export class MainThreadTasks {
|
|
|
143
143
|
static getMainThreadTasks(mainThreadEvents: LH.TraceEvent[], frames: Array<{
|
|
144
144
|
id: string;
|
|
145
145
|
url: string;
|
|
146
|
-
}>, traceEndTs: number, traceStartTs?: number
|
|
146
|
+
}>, traceEndTs: number, traceStartTs?: number): TaskNode[];
|
|
147
147
|
/**
|
|
148
148
|
* Prints an artistic rendering of the task tree for easier debugability.
|
|
149
149
|
*
|
|
@@ -267,6 +267,14 @@ class MainThreadTasks {
|
|
|
267
267
|
// It's less than 1ms, we'll let it slide by increasing the duration of the parent.
|
|
268
268
|
currentTask.endTime = nextTask.endTime;
|
|
269
269
|
currentTask.duration += timeDelta;
|
|
270
|
+
|
|
271
|
+
// Recursively extend parent endTimes, as needed.
|
|
272
|
+
let cur = currentTask.parent;
|
|
273
|
+
while (cur && cur.endTime < nextTask.endTime) {
|
|
274
|
+
cur.duration += nextTask.endTime - cur.endTime;
|
|
275
|
+
cur.endTime = nextTask.endTime;
|
|
276
|
+
cur = cur.parent;
|
|
277
|
+
}
|
|
270
278
|
} else if (nextTask.unbounded) {
|
|
271
279
|
// It's ending at traceEndTs, it means we were missing the end event. We'll truncate it to the parent.
|
|
272
280
|
nextTask.endTime = currentTask.endTime;
|
|
@@ -220,7 +220,7 @@ export class TraceProcessor {
|
|
|
220
220
|
*/
|
|
221
221
|
static processTrace(trace: LH.Trace, options?: {
|
|
222
222
|
timeOriginDeterminationMethod?: TimeOriginDeterminationMethod;
|
|
223
|
-
}
|
|
223
|
+
}): LH.Artifacts.ProcessedTrace;
|
|
224
224
|
/**
|
|
225
225
|
* Finds key navigation trace events and computes timings of events in milliseconds since the time
|
|
226
226
|
* origin in addition to the standard microsecond monotonic timestamps.
|
|
@@ -3,11 +3,11 @@ export class MetricTraceEvents {
|
|
|
3
3
|
* Returns simplified representation of all metrics
|
|
4
4
|
* @return {Array<{id: string, name: string, tsKey: keyof LH.Artifacts.TimingSummary}>} metrics to consider
|
|
5
5
|
*/
|
|
6
|
-
static get metricsDefinitions(): {
|
|
6
|
+
static get metricsDefinitions(): Array<{
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
9
|
tsKey: keyof LH.Artifacts.TimingSummary;
|
|
10
|
-
}
|
|
10
|
+
}>;
|
|
11
11
|
/**
|
|
12
12
|
* @param {Array<LH.TraceEvent>} traceEvents
|
|
13
13
|
* @param {LH.Result['audits']} auditResults
|
package/core/runner.js
CHANGED
|
@@ -147,8 +147,9 @@ class Runner {
|
|
|
147
147
|
* @param {LH.Artifacts.ComputedContext} context
|
|
148
148
|
*/
|
|
149
149
|
static async getEntityClassification(artifacts, context) {
|
|
150
|
-
const devtoolsLog = artifacts.
|
|
150
|
+
const devtoolsLog = artifacts.DevtoolsLog;
|
|
151
151
|
if (!devtoolsLog) return;
|
|
152
|
+
|
|
152
153
|
const classifiedEntities = await EntityClassification.request(
|
|
153
154
|
{URL: artifacts.URL, devtoolsLog}, context);
|
|
154
155
|
|