lighthouse 10.1.1 → 10.2.0-dev.20230504
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/cli-flags.d.ts +1 -1
- package/cli/test/smokehouse/lighthouse-runners/cli.d.ts +1 -1
- package/cli/test/smokehouse/report-assert.d.ts +1 -1
- package/core/audits/accessibility/accesskeys.d.ts +1 -1
- package/core/audits/accessibility/accesskeys.js +1 -1
- package/core/audits/accessibility/aria-allowed-attr.d.ts +1 -1
- package/core/audits/accessibility/aria-allowed-attr.js +1 -1
- package/core/audits/accessibility/aria-command-name.d.ts +1 -1
- package/core/audits/accessibility/aria-command-name.js +1 -1
- package/core/audits/accessibility/aria-hidden-body.d.ts +1 -1
- package/core/audits/accessibility/aria-hidden-body.js +1 -1
- package/core/audits/accessibility/aria-hidden-focus.d.ts +1 -1
- package/core/audits/accessibility/aria-hidden-focus.js +1 -1
- package/core/audits/accessibility/aria-input-field-name.d.ts +1 -1
- package/core/audits/accessibility/aria-input-field-name.js +1 -1
- package/core/audits/accessibility/aria-meter-name.d.ts +1 -1
- package/core/audits/accessibility/aria-meter-name.js +1 -1
- package/core/audits/accessibility/aria-progressbar-name.d.ts +1 -1
- package/core/audits/accessibility/aria-progressbar-name.js +1 -1
- package/core/audits/accessibility/aria-required-attr.d.ts +1 -1
- package/core/audits/accessibility/aria-required-attr.js +1 -1
- package/core/audits/accessibility/aria-required-children.d.ts +1 -1
- package/core/audits/accessibility/aria-required-children.js +1 -1
- package/core/audits/accessibility/aria-required-parent.d.ts +1 -1
- package/core/audits/accessibility/aria-required-parent.js +1 -1
- package/core/audits/accessibility/aria-roles.d.ts +1 -1
- package/core/audits/accessibility/aria-roles.js +1 -1
- package/core/audits/accessibility/aria-toggle-field-name.d.ts +1 -1
- package/core/audits/accessibility/aria-toggle-field-name.js +1 -1
- package/core/audits/accessibility/aria-tooltip-name.d.ts +1 -1
- package/core/audits/accessibility/aria-tooltip-name.js +1 -1
- package/core/audits/accessibility/aria-treeitem-name.d.ts +1 -1
- package/core/audits/accessibility/aria-treeitem-name.js +1 -1
- package/core/audits/accessibility/aria-valid-attr-value.d.ts +1 -1
- package/core/audits/accessibility/aria-valid-attr-value.js +1 -1
- package/core/audits/accessibility/aria-valid-attr.d.ts +1 -1
- package/core/audits/accessibility/aria-valid-attr.js +1 -1
- package/core/audits/accessibility/axe-audit.d.ts +1 -1
- package/core/audits/accessibility/button-name.d.ts +1 -1
- package/core/audits/accessibility/button-name.js +1 -1
- package/core/audits/accessibility/bypass.d.ts +1 -1
- package/core/audits/accessibility/bypass.js +1 -1
- package/core/audits/accessibility/color-contrast.d.ts +1 -1
- package/core/audits/accessibility/color-contrast.js +1 -1
- package/core/audits/accessibility/definition-list.d.ts +1 -1
- package/core/audits/accessibility/definition-list.js +1 -1
- package/core/audits/accessibility/dlitem.d.ts +1 -1
- package/core/audits/accessibility/dlitem.js +1 -1
- package/core/audits/accessibility/document-title.d.ts +1 -1
- package/core/audits/accessibility/document-title.js +1 -1
- package/core/audits/accessibility/duplicate-id-active.d.ts +1 -1
- package/core/audits/accessibility/duplicate-id-active.js +1 -1
- package/core/audits/accessibility/duplicate-id-aria.d.ts +1 -1
- package/core/audits/accessibility/duplicate-id-aria.js +1 -1
- package/core/audits/accessibility/form-field-multiple-labels.d.ts +1 -1
- package/core/audits/accessibility/form-field-multiple-labels.js +1 -1
- package/core/audits/accessibility/frame-title.d.ts +1 -1
- package/core/audits/accessibility/frame-title.js +1 -1
- package/core/audits/accessibility/heading-order.d.ts +1 -1
- package/core/audits/accessibility/heading-order.js +1 -1
- package/core/audits/accessibility/html-has-lang.d.ts +1 -1
- package/core/audits/accessibility/html-has-lang.js +1 -1
- package/core/audits/accessibility/html-lang-valid.d.ts +1 -1
- package/core/audits/accessibility/html-lang-valid.js +1 -1
- package/core/audits/accessibility/image-alt.d.ts +1 -1
- package/core/audits/accessibility/image-alt.js +1 -1
- package/core/audits/accessibility/input-image-alt.d.ts +1 -1
- package/core/audits/accessibility/input-image-alt.js +1 -1
- package/core/audits/accessibility/label.d.ts +1 -1
- package/core/audits/accessibility/label.js +1 -1
- package/core/audits/accessibility/link-name.d.ts +1 -1
- package/core/audits/accessibility/link-name.js +1 -1
- package/core/audits/accessibility/list.d.ts +1 -1
- package/core/audits/accessibility/list.js +1 -1
- package/core/audits/accessibility/listitem.d.ts +1 -1
- package/core/audits/accessibility/listitem.js +1 -1
- package/core/audits/accessibility/manual/custom-controls-labels.d.ts +1 -1
- package/core/audits/accessibility/manual/custom-controls-roles.d.ts +1 -1
- package/core/audits/accessibility/manual/focus-traps.d.ts +1 -1
- package/core/audits/accessibility/manual/focusable-controls.d.ts +1 -1
- package/core/audits/accessibility/manual/interactive-element-affordance.d.ts +1 -1
- package/core/audits/accessibility/manual/logical-tab-order.d.ts +1 -1
- package/core/audits/accessibility/manual/managed-focus.d.ts +1 -1
- package/core/audits/accessibility/manual/offscreen-content-hidden.d.ts +1 -1
- package/core/audits/accessibility/manual/use-landmarks.d.ts +1 -1
- package/core/audits/accessibility/manual/visual-order-follows-dom.d.ts +1 -1
- package/core/audits/accessibility/meta-refresh.d.ts +1 -1
- package/core/audits/accessibility/meta-refresh.js +1 -1
- package/core/audits/accessibility/meta-viewport.d.ts +1 -1
- package/core/audits/accessibility/meta-viewport.js +1 -1
- package/core/audits/accessibility/object-alt.d.ts +1 -1
- package/core/audits/accessibility/object-alt.js +1 -1
- package/core/audits/accessibility/tabindex.d.ts +1 -1
- package/core/audits/accessibility/tabindex.js +1 -1
- package/core/audits/accessibility/td-headers-attr.d.ts +1 -1
- package/core/audits/accessibility/td-headers-attr.js +1 -1
- package/core/audits/accessibility/th-has-data-cells.d.ts +1 -1
- package/core/audits/accessibility/th-has-data-cells.js +1 -1
- package/core/audits/accessibility/valid-lang.d.ts +1 -1
- package/core/audits/accessibility/valid-lang.js +1 -1
- package/core/audits/accessibility/video-caption.d.ts +1 -1
- package/core/audits/accessibility/video-caption.js +1 -1
- package/core/audits/audit.d.ts +1 -1
- package/core/audits/autocomplete.d.ts +1 -1
- package/core/audits/bf-cache.d.ts +1 -1
- package/core/audits/bootup-time.d.ts +1 -1
- package/core/audits/byte-efficiency/byte-efficiency-audit.d.ts +1 -1
- package/core/audits/byte-efficiency/duplicated-javascript.d.ts +1 -1
- package/core/audits/byte-efficiency/efficient-animated-content.d.ts +2 -2
- package/core/audits/byte-efficiency/legacy-javascript.d.ts +2 -2
- package/core/audits/byte-efficiency/modern-image-formats.d.ts +1 -1
- package/core/audits/byte-efficiency/offscreen-images.d.ts +2 -2
- package/core/audits/byte-efficiency/render-blocking-resources.d.ts +1 -1
- package/core/audits/byte-efficiency/total-byte-weight.d.ts +1 -1
- package/core/audits/byte-efficiency/unminified-css.d.ts +1 -1
- package/core/audits/byte-efficiency/unminified-javascript.d.ts +1 -1
- package/core/audits/byte-efficiency/unused-css-rules.d.ts +1 -1
- package/core/audits/byte-efficiency/unused-javascript.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +3 -3
- package/core/audits/byte-efficiency/uses-optimized-images.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-responsive-images-snapshot.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-responsive-images.d.ts +2 -2
- package/core/audits/byte-efficiency/uses-text-compression.d.ts +1 -1
- package/core/audits/content-width.d.ts +1 -1
- package/core/audits/critical-request-chains.d.ts +1 -1
- package/core/audits/csp-xss.d.ts +1 -1
- package/core/audits/deprecations.d.ts +1 -1
- package/core/audits/diagnostics.d.ts +1 -1
- package/core/audits/dobetterweb/charset.d.ts +1 -1
- package/core/audits/dobetterweb/doctype.d.ts +1 -1
- package/core/audits/dobetterweb/dom-size.d.ts +1 -1
- package/core/audits/dobetterweb/geolocation-on-start.d.ts +1 -1
- package/core/audits/dobetterweb/inspector-issues.d.ts +1 -1
- package/core/audits/dobetterweb/js-libraries.d.ts +1 -1
- package/core/audits/dobetterweb/no-document-write.d.ts +1 -1
- package/core/audits/dobetterweb/notification-on-start.d.ts +1 -1
- package/core/audits/dobetterweb/paste-preventing-inputs.d.ts +1 -1
- package/core/audits/dobetterweb/uses-http2.d.ts +3 -3
- package/core/audits/dobetterweb/uses-passive-event-listeners.d.ts +1 -1
- package/core/audits/errors-in-console.d.ts +1 -1
- package/core/audits/final-screenshot.d.ts +1 -1
- package/core/audits/font-display.d.ts +1 -1
- package/core/audits/image-aspect-ratio.d.ts +1 -1
- package/core/audits/image-size-responsive.d.ts +1 -1
- package/core/audits/installable-manifest.d.ts +1 -1
- package/core/audits/is-on-https.d.ts +1 -1
- package/core/audits/largest-contentful-paint-element.d.ts +17 -3
- package/core/audits/largest-contentful-paint-element.js +77 -4
- package/core/audits/layout-shift-elements.d.ts +1 -1
- package/core/audits/lcp-lazy-loaded.d.ts +1 -1
- package/core/audits/long-tasks.d.ts +1 -1
- package/core/audits/main-thread-tasks.d.ts +1 -1
- package/core/audits/mainthread-work-breakdown.d.ts +1 -1
- package/core/audits/manual/manual-audit.d.ts +1 -1
- package/core/audits/manual/pwa-cross-browser.d.ts +1 -1
- package/core/audits/manual/pwa-each-page-has-url.d.ts +1 -1
- package/core/audits/manual/pwa-page-transitions.d.ts +1 -1
- package/core/audits/maskable-icon.d.ts +1 -1
- package/core/audits/metrics/cumulative-layout-shift.d.ts +1 -1
- package/core/audits/metrics/experimental-interaction-to-next-paint.d.ts +1 -1
- package/core/audits/metrics/first-contentful-paint-3g.d.ts +1 -1
- package/core/audits/metrics/first-contentful-paint.d.ts +1 -1
- package/core/audits/metrics/first-meaningful-paint.d.ts +1 -1
- package/core/audits/metrics/interactive.d.ts +1 -1
- package/core/audits/metrics/largest-contentful-paint.d.ts +1 -1
- package/core/audits/metrics/max-potential-fid.d.ts +1 -1
- package/core/audits/metrics/speed-index.d.ts +1 -1
- package/core/audits/metrics/total-blocking-time.d.ts +1 -1
- package/core/audits/metrics.d.ts +1 -1
- package/core/audits/multi-check-audit.d.ts +1 -1
- package/core/audits/network-requests.d.ts +1 -1
- package/core/audits/network-requests.js +1 -0
- package/core/audits/network-rtt.d.ts +1 -1
- package/core/audits/network-server-latency.d.ts +1 -1
- package/core/audits/no-unload-listeners.d.ts +1 -1
- package/core/audits/non-composited-animations.d.ts +1 -1
- package/core/audits/performance-budget.d.ts +2 -2
- package/core/audits/predictive-perf.d.ts +1 -1
- package/core/audits/predictive-perf.js +10 -3
- package/core/audits/preload-fonts.d.ts +1 -1
- package/core/audits/prioritize-lcp-image.d.ts +2 -13
- package/core/audits/prioritize-lcp-image.js +3 -55
- package/core/audits/redirects.d.ts +2 -2
- package/core/audits/resource-summary.d.ts +1 -1
- package/core/audits/screenshot-thumbnails.d.ts +2 -2
- package/core/audits/script-treemap-data.d.ts +1 -1
- package/core/audits/seo/canonical.d.ts +1 -1
- package/core/audits/seo/crawlable-anchors.d.ts +1 -1
- package/core/audits/seo/font-size.d.ts +1 -1
- package/core/audits/seo/hreflang.d.ts +1 -1
- package/core/audits/seo/http-status-code.d.ts +1 -1
- package/core/audits/seo/is-crawlable.d.ts +1 -1
- package/core/audits/seo/link-text.d.ts +1 -1
- package/core/audits/seo/manual/structured-data.d.ts +1 -1
- package/core/audits/seo/meta-description.d.ts +1 -1
- package/core/audits/seo/plugins.d.ts +1 -1
- package/core/audits/seo/robots-txt.d.ts +1 -1
- package/core/audits/seo/tap-targets.d.ts +1 -1
- package/core/audits/server-response-time.d.ts +1 -1
- package/core/audits/service-worker.d.ts +1 -1
- package/core/audits/splash-screen.d.ts +2 -2
- package/core/audits/themed-omnibox.d.ts +2 -2
- package/core/audits/third-party-facades.d.ts +2 -2
- package/core/audits/third-party-summary.d.ts +2 -2
- package/core/audits/timing-budget.d.ts +3 -3
- package/core/audits/unsized-images.d.ts +1 -1
- package/core/audits/user-timings.d.ts +1 -1
- package/core/audits/uses-rel-preconnect.d.ts +1 -1
- package/core/audits/uses-rel-preload.d.ts +2 -2
- package/core/audits/valid-source-maps.d.ts +2 -2
- package/core/audits/viewport.d.ts +1 -1
- package/core/audits/violation-audit.d.ts +1 -1
- package/core/audits/work-during-interaction.d.ts +2 -2
- package/core/computed/critical-request-chains.d.ts +1 -1
- package/core/computed/document-urls.d.ts +32 -0
- package/core/computed/document-urls.js +53 -0
- package/core/computed/entity-classification.js +0 -1
- package/core/computed/lcp-image-record.d.ts +26 -0
- package/core/computed/lcp-image-record.js +74 -0
- package/core/computed/load-simulator.d.ts +2 -2
- package/core/computed/metrics/cumulative-layout-shift.d.ts +1 -1
- package/core/computed/metrics/first-contentful-paint-all-frames.d.ts +1 -1
- package/core/computed/metrics/first-contentful-paint.d.ts +7 -1
- package/core/computed/metrics/first-meaningful-paint.d.ts +7 -1
- package/core/computed/metrics/interactive.d.ts +7 -1
- package/core/computed/metrics/lantern-first-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lantern-first-meaningful-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-metric.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 +7 -1
- package/core/computed/metrics/lcp-breakdown.d.ts +23 -0
- package/core/computed/metrics/lcp-breakdown.js +58 -0
- package/core/computed/metrics/max-potential-fid.d.ts +7 -1
- package/core/computed/metrics/metric.d.ts +2 -2
- package/core/computed/metrics/metric.js +1 -1
- package/core/computed/metrics/navigation-metric.d.ts +3 -3
- package/core/computed/metrics/navigation-metric.js +1 -1
- package/core/computed/metrics/responsiveness.d.ts +1 -1
- package/core/computed/metrics/speed-index.d.ts +7 -1
- package/core/computed/metrics/time-to-first-byte.d.ts +16 -0
- package/core/computed/metrics/time-to-first-byte.js +60 -0
- package/core/computed/metrics/timing-summary.js +10 -0
- package/core/computed/metrics/total-blocking-time.d.ts +7 -1
- package/core/computed/network-records.d.ts +1 -1
- package/core/computed/page-dependency-graph.d.ts +4 -13
- package/core/computed/page-dependency-graph.js +2 -33
- package/core/computed/processed-navigation.d.ts +1 -1
- package/core/computed/resource-summary.d.ts +4 -4
- package/core/config/default-config.d.ts +1 -1
- package/core/config/desktop-config.d.ts +1 -1
- package/core/gather/base-gatherer.d.ts +1 -1
- package/core/gather/driver/execution-context.d.ts +1 -1
- package/core/gather/driver/network-monitor.d.ts +2 -2
- package/core/gather/driver/target-manager.d.ts +2 -1
- package/core/gather/driver/target-manager.js +5 -3
- package/core/gather/driver/wait-for-condition.js +12 -0
- package/core/gather/driver.d.ts +3 -3
- package/core/gather/fetcher.d.ts +1 -1
- package/core/gather/gatherers/accessibility.d.ts +1 -1
- package/core/gather/gatherers/anchor-elements.d.ts +1 -1
- package/core/gather/gatherers/bf-cache-failures.d.ts +1 -1
- package/core/gather/gatherers/cache-contents.d.ts +1 -1
- package/core/gather/gatherers/console-messages.d.ts +1 -1
- package/core/gather/gatherers/css-usage.d.ts +1 -1
- package/core/gather/gatherers/devtools-log-compat.d.ts +1 -1
- package/core/gather/gatherers/devtools-log.d.ts +1 -1
- package/core/gather/gatherers/dobetterweb/doctype.d.ts +1 -1
- package/core/gather/gatherers/dobetterweb/domstats.d.ts +1 -1
- package/core/gather/gatherers/dobetterweb/optimized-images.d.ts +2 -2
- package/core/gather/gatherers/dobetterweb/optimized-images.js +2 -2
- package/core/gather/gatherers/dobetterweb/response-compression.d.ts +2 -2
- package/core/gather/gatherers/dobetterweb/response-compression.js +1 -2
- package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.d.ts +1 -1
- package/core/gather/gatherers/full-page-screenshot.d.ts +1 -1
- package/core/gather/gatherers/global-listeners.d.ts +1 -1
- package/core/gather/gatherers/iframe-elements.d.ts +1 -1
- package/core/gather/gatherers/image-elements.d.ts +1 -1
- package/core/gather/gatherers/inputs.d.ts +1 -1
- package/core/gather/gatherers/inspector-issues.d.ts +1 -1
- package/core/gather/gatherers/installability-errors.d.ts +1 -1
- package/core/gather/gatherers/js-usage.d.ts +1 -1
- package/core/gather/gatherers/link-elements.d.ts +1 -1
- package/core/gather/gatherers/main-document-content.d.ts +1 -1
- package/core/gather/gatherers/meta-elements.d.ts +1 -1
- package/core/gather/gatherers/network-user-agent.d.ts +1 -1
- package/core/gather/gatherers/script-elements.d.ts +2 -2
- package/core/gather/gatherers/script-elements.js +1 -2
- package/core/gather/gatherers/scripts.d.ts +1 -3
- package/core/gather/gatherers/scripts.js +0 -3
- package/core/gather/gatherers/seo/embedded-content.d.ts +1 -1
- package/core/gather/gatherers/seo/font-size.d.ts +1 -1
- package/core/gather/gatherers/seo/robots-txt.d.ts +1 -1
- package/core/gather/gatherers/seo/tap-targets.d.ts +1 -1
- package/core/gather/gatherers/service-worker.d.ts +1 -1
- package/core/gather/gatherers/source-maps.d.ts +1 -1
- package/core/gather/gatherers/stacks.d.ts +1 -1
- package/core/gather/gatherers/trace-compat.d.ts +1 -1
- package/core/gather/gatherers/trace-elements.d.ts +2 -2
- package/core/gather/gatherers/trace.d.ts +1 -1
- package/core/gather/gatherers/viewport-dimensions.d.ts +1 -1
- package/core/gather/gatherers/web-app-manifest.d.ts +1 -1
- package/core/gather/navigation-runner.d.ts +3 -3
- package/core/gather/navigation-runner.js +1 -1
- package/core/gather/runner-helpers.js +18 -4
- package/core/index.cjs +28 -0
- package/core/index.d.ts +2 -2
- package/core/legacy/gather/connections/connection.d.ts +3 -1
- package/core/legacy/gather/connections/connection.js +15 -0
- package/core/legacy/gather/connections/cri.d.ts +2 -2
- package/core/legacy/gather/connections/raw.d.ts +1 -1
- package/core/legacy/gather/driver.d.ts +3 -3
- package/core/legacy/gather/gather-runner.js +1 -1
- package/core/lib/dependency-graph/cpu-node.d.ts +2 -2
- package/core/lib/dependency-graph/network-node.d.ts +3 -3
- package/core/lib/dependency-graph/simulator/connection-pool.d.ts +2 -2
- package/core/lib/dependency-graph/simulator/dns-cache.d.ts +1 -1
- package/core/lib/dependency-graph/simulator/simulator.d.ts +5 -5
- package/core/lib/lh-trace-processor.d.ts +1 -1
- package/core/lib/navigation-error.d.ts +2 -2
- package/core/lib/network-recorder.d.ts +17 -11
- package/core/lib/network-recorder.js +24 -31
- package/core/lib/network-request.d.ts +7 -8
- package/core/lib/network-request.js +8 -6
- package/core/lib/stack-packs.js +9 -1
- package/core/lib/tracehouse/main-thread-tasks.d.ts +1 -1
- package/core/lib/tracehouse/task-summary.d.ts +1 -1
- package/core/lib/url-utils.js +1 -0
- package/core/runner.d.ts +2 -2
- package/core/runner.js +8 -2
- package/core/scoring.d.ts +1 -1
- package/core/user-flow.d.ts +1 -1
- package/dist/report/bundle.esm.js +3 -1
- package/dist/report/flow.js +3 -3
- package/dist/report/standalone.js +5 -5
- package/package.json +9 -8
- package/report/README.md +1 -1
- package/report/assets/styles.css +0 -4
- package/report/renderer/components.js +1 -1
- package/report/renderer/performance-category-renderer.d.ts +1 -1
- package/report/renderer/pwa-category-renderer.d.ts +1 -1
- package/report/renderer/report-globals.d.ts +1 -1
- package/report/renderer/report-renderer.d.ts +1 -1
- package/report/renderer/report-ui-features.d.ts +1 -1
- package/report/renderer/topbar-features.d.ts +1 -1
- package/shared/localization/i18n-module.d.ts +2 -2
- package/shared/localization/locales/ar-XB.json +113 -53
- package/shared/localization/locales/ar.json +113 -53
- package/shared/localization/locales/bg.json +113 -53
- package/shared/localization/locales/ca.json +115 -55
- package/shared/localization/locales/cs.json +113 -53
- package/shared/localization/locales/da.json +114 -54
- package/shared/localization/locales/de.json +113 -53
- package/shared/localization/locales/el.json +113 -53
- package/shared/localization/locales/en-GB.json +107 -47
- package/shared/localization/locales/en-US.json +92 -44
- package/shared/localization/locales/en-XA.json +113 -53
- package/shared/localization/locales/en-XL.json +92 -44
- package/shared/localization/locales/es-419.json +113 -53
- package/shared/localization/locales/es.json +114 -54
- package/shared/localization/locales/fi.json +113 -53
- package/shared/localization/locales/fil.json +113 -53
- package/shared/localization/locales/fr.json +113 -53
- package/shared/localization/locales/he.json +114 -54
- package/shared/localization/locales/hi.json +116 -56
- package/shared/localization/locales/hr.json +113 -53
- package/shared/localization/locales/hu.json +113 -53
- package/shared/localization/locales/id.json +113 -53
- package/shared/localization/locales/it.json +114 -54
- package/shared/localization/locales/ja.json +116 -56
- package/shared/localization/locales/ko.json +113 -53
- package/shared/localization/locales/lt.json +113 -53
- package/shared/localization/locales/lv.json +113 -53
- package/shared/localization/locales/nl.json +117 -57
- package/shared/localization/locales/no.json +114 -54
- package/shared/localization/locales/pl.json +125 -65
- package/shared/localization/locales/pt-PT.json +117 -57
- package/shared/localization/locales/pt.json +113 -53
- package/shared/localization/locales/ro.json +113 -53
- package/shared/localization/locales/ru.json +113 -53
- package/shared/localization/locales/sk.json +112 -52
- package/shared/localization/locales/sl.json +113 -53
- package/shared/localization/locales/sr-Latn.json +113 -53
- package/shared/localization/locales/sr.json +113 -53
- package/shared/localization/locales/sv.json +113 -53
- package/shared/localization/locales/ta.json +113 -53
- package/shared/localization/locales/te.json +113 -53
- package/shared/localization/locales/th.json +113 -53
- package/shared/localization/locales/tr.json +113 -53
- package/shared/localization/locales/uk.json +115 -55
- package/shared/localization/locales/vi.json +113 -53
- package/shared/localization/locales/zh-HK.json +113 -53
- package/shared/localization/locales/zh-TW.json +113 -53
- package/shared/localization/locales/zh.json +113 -53
- package/shared/util.js +2 -0
- package/types/artifacts.d.ts +4 -0
- package/types/externs.d.ts +1 -1
- package/types/internal/test.d.ts +1 -1
- package/types/protocol.d.ts +3 -0
|
@@ -5,11 +5,17 @@ declare const FirstMeaningfulPaintComputed: typeof FirstMeaningfulPaint & {
|
|
|
5
5
|
}>) => Promise<import("../../index.js").Artifacts.Metric | import("../../index.js").Artifacts.LanternMetric>;
|
|
6
6
|
};
|
|
7
7
|
declare class FirstMeaningfulPaint extends NavigationMetric {
|
|
8
|
+
/**
|
|
9
|
+
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
10
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
11
|
+
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
12
|
+
*/
|
|
13
|
+
static computeSimulatedMetric(data: LH.Artifacts.NavigationMetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
8
14
|
/**
|
|
9
15
|
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
10
16
|
* @return {Promise<LH.Artifacts.Metric>}
|
|
11
17
|
*/
|
|
12
18
|
static computeObservedMetric(data: LH.Artifacts.NavigationMetricComputationData): Promise<LH.Artifacts.Metric>;
|
|
13
19
|
}
|
|
14
|
-
import { NavigationMetric } from
|
|
20
|
+
import { NavigationMetric } from './navigation-metric.js';
|
|
15
21
|
//# sourceMappingURL=first-meaningful-paint.d.ts.map
|
|
@@ -51,11 +51,17 @@ declare class Interactive extends NavigationMetric {
|
|
|
51
51
|
cpuQuietPeriods: Array<TimePeriod>;
|
|
52
52
|
networkQuietPeriods: Array<TimePeriod>;
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
56
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
57
|
+
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
58
|
+
*/
|
|
59
|
+
static computeSimulatedMetric(data: LH.Artifacts.NavigationMetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
54
60
|
/**
|
|
55
61
|
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
56
62
|
* @return {Promise<LH.Artifacts.Metric>}
|
|
57
63
|
*/
|
|
58
64
|
static computeObservedMetric(data: LH.Artifacts.NavigationMetricComputationData): Promise<LH.Artifacts.Metric>;
|
|
59
65
|
}
|
|
60
|
-
import { NavigationMetric } from
|
|
66
|
+
import { NavigationMetric } from './navigation-metric.js';
|
|
61
67
|
//# sourceMappingURL=interactive.d.ts.map
|
|
@@ -44,5 +44,5 @@ declare class LanternFirstContentfulPaint extends LanternMetric {
|
|
|
44
44
|
*/
|
|
45
45
|
static getFirstPaintBasedGraph(dependencyGraph: Node, paintTs: number, blockingResourcesFilter: (arg0: NetworkNode) => boolean, extraBlockingCpuNodesToIncludeFilter?: ((arg0: CPUNode) => boolean) | undefined): Node;
|
|
46
46
|
}
|
|
47
|
-
import { LanternMetric } from
|
|
47
|
+
import { LanternMetric } from './lantern-metric.js';
|
|
48
48
|
//# sourceMappingURL=lantern-first-contentful-paint.d.ts.map
|
|
@@ -8,5 +8,5 @@ declare const LanternFirstMeaningfulPaintComputed: typeof LanternFirstMeaningful
|
|
|
8
8
|
/** @typedef {import('../../lib/dependency-graph/base-node.js').Node} Node */
|
|
9
9
|
declare class LanternFirstMeaningfulPaint extends LanternMetric {
|
|
10
10
|
}
|
|
11
|
-
import { LanternMetric } from
|
|
11
|
+
import { LanternMetric } from './lantern-metric.js';
|
|
12
12
|
//# sourceMappingURL=lantern-first-meaningful-paint.d.ts.map
|
|
@@ -27,5 +27,5 @@ declare class LanternInteractive extends LanternMetric {
|
|
|
27
27
|
*/
|
|
28
28
|
static getLastLongTaskEndTime(nodeTimings: LH.Gatherer.Simulation.Result['nodeTimings'], duration?: number): number;
|
|
29
29
|
}
|
|
30
|
-
import { LanternMetric } from
|
|
30
|
+
import { LanternMetric } from './lantern-metric.js';
|
|
31
31
|
//# sourceMappingURL=lantern-interactive.d.ts.map
|
|
@@ -21,5 +21,5 @@ declare class LanternLargestContentfulPaint extends LanternMetric {
|
|
|
21
21
|
*/
|
|
22
22
|
static getEstimateFromSimulation(simulationResult: LH.Gatherer.Simulation.Result): LH.Gatherer.Simulation.Result;
|
|
23
23
|
}
|
|
24
|
-
import { LanternMetric } from
|
|
24
|
+
import { LanternMetric } from './lantern-metric.js';
|
|
25
25
|
//# sourceMappingURL=lantern-largest-contentful-paint.d.ts.map
|
|
@@ -74,5 +74,5 @@ export class LanternMetric {
|
|
|
74
74
|
*/
|
|
75
75
|
static compute_(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
76
76
|
}
|
|
77
|
-
import { ProcessedNavigation } from
|
|
77
|
+
import { ProcessedNavigation } from '../processed-navigation.js';
|
|
78
78
|
//# sourceMappingURL=lantern-metric.d.ts.map
|
|
@@ -34,5 +34,5 @@ declare class LanternSpeedIndex extends LanternMetric {
|
|
|
34
34
|
*/
|
|
35
35
|
static computeLayoutBasedSpeedIndex(nodeTimings: LH.Gatherer.Simulation.Result['nodeTimings'], fcpTimeInMs: number): number;
|
|
36
36
|
}
|
|
37
|
-
import { LanternMetric } from
|
|
37
|
+
import { LanternMetric } from './lantern-metric.js';
|
|
38
38
|
//# sourceMappingURL=lantern-speed-index.d.ts.map
|
|
@@ -27,5 +27,5 @@ declare class LanternTotalBlockingTime extends LanternMetric {
|
|
|
27
27
|
duration: number;
|
|
28
28
|
}[];
|
|
29
29
|
}
|
|
30
|
-
import { LanternMetric } from
|
|
30
|
+
import { LanternMetric } from './lantern-metric.js';
|
|
31
31
|
//# sourceMappingURL=lantern-total-blocking-time.d.ts.map
|
|
@@ -16,5 +16,5 @@ declare class LargestContentfulPaintAllFrames extends NavigationMetric {
|
|
|
16
16
|
*/
|
|
17
17
|
static computeObservedMetric(data: LH.Artifacts.NavigationMetricComputationData): Promise<LH.Artifacts.Metric>;
|
|
18
18
|
}
|
|
19
|
-
import { NavigationMetric } from
|
|
19
|
+
import { NavigationMetric } from './navigation-metric.js';
|
|
20
20
|
//# sourceMappingURL=largest-contentful-paint-all-frames.d.ts.map
|
|
@@ -5,11 +5,17 @@ declare const LargestContentfulPaintComputed: typeof LargestContentfulPaint & {
|
|
|
5
5
|
}>) => Promise<import("../../index.js").Artifacts.Metric | import("../../index.js").Artifacts.LanternMetric>;
|
|
6
6
|
};
|
|
7
7
|
declare class LargestContentfulPaint extends NavigationMetric {
|
|
8
|
+
/**
|
|
9
|
+
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
10
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
11
|
+
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
12
|
+
*/
|
|
13
|
+
static computeSimulatedMetric(data: LH.Artifacts.NavigationMetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
8
14
|
/**
|
|
9
15
|
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
10
16
|
* @return {Promise<LH.Artifacts.Metric>}
|
|
11
17
|
*/
|
|
12
18
|
static computeObservedMetric(data: LH.Artifacts.NavigationMetricComputationData): Promise<LH.Artifacts.Metric>;
|
|
13
19
|
}
|
|
14
|
-
import { NavigationMetric } from
|
|
20
|
+
import { NavigationMetric } from './navigation-metric.js';
|
|
15
21
|
//# sourceMappingURL=largest-contentful-paint.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { LCPBreakdownComputed as LCPBreakdown };
|
|
2
|
+
declare const LCPBreakdownComputed: typeof LCPBreakdown & {
|
|
3
|
+
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
4
|
+
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
5
|
+
}>) => Promise<{
|
|
6
|
+
ttfb: number;
|
|
7
|
+
loadStart?: number | undefined;
|
|
8
|
+
loadEnd?: number | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
declare class LCPBreakdown {
|
|
12
|
+
/**
|
|
13
|
+
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
14
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
15
|
+
* @return {Promise<{ttfb: number, loadStart?: number, loadEnd?: number}>}
|
|
16
|
+
*/
|
|
17
|
+
static compute_(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext): Promise<{
|
|
18
|
+
ttfb: number;
|
|
19
|
+
loadStart?: number | undefined;
|
|
20
|
+
loadEnd?: number | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=lcp-breakdown.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright 2023 The Lighthouse Authors. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
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
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
+
import {LighthouseError} from '../../lib/lh-error.js';
|
|
9
|
+
import {LargestContentfulPaint} from './largest-contentful-paint.js';
|
|
10
|
+
import {ProcessedNavigation} from '../processed-navigation.js';
|
|
11
|
+
import {TimeToFirstByte} from './time-to-first-byte.js';
|
|
12
|
+
import {LCPImageRecord} from '../lcp-image-record.js';
|
|
13
|
+
|
|
14
|
+
class LCPBreakdown {
|
|
15
|
+
/**
|
|
16
|
+
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
17
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
18
|
+
* @return {Promise<{ttfb: number, loadStart?: number, loadEnd?: number}>}
|
|
19
|
+
*/
|
|
20
|
+
static async compute_(data, context) {
|
|
21
|
+
const processedNavigation = await ProcessedNavigation.request(data.trace, context);
|
|
22
|
+
const observedLcp = processedNavigation.timings.largestContentfulPaint;
|
|
23
|
+
if (observedLcp === undefined) {
|
|
24
|
+
throw new LighthouseError(LighthouseError.errors.NO_LCP);
|
|
25
|
+
}
|
|
26
|
+
const timeOrigin = processedNavigation.timestamps.timeOrigin / 1000;
|
|
27
|
+
|
|
28
|
+
const {timing: ttfb} = await TimeToFirstByte.request(data, context);
|
|
29
|
+
|
|
30
|
+
const lcpRecord = await LCPImageRecord.request(data, context);
|
|
31
|
+
if (!lcpRecord) {
|
|
32
|
+
return {ttfb};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Official LCP^tm. Will be lantern result if simulated, otherwise same as observedLcp.
|
|
36
|
+
const {timing: metricLcp} = await LargestContentfulPaint.request(data, context);
|
|
37
|
+
const throttleRatio = metricLcp / observedLcp;
|
|
38
|
+
|
|
39
|
+
const unclampedLoadStart = (lcpRecord.networkRequestTime - timeOrigin) * throttleRatio;
|
|
40
|
+
const loadStart = Math.max(ttfb, Math.min(unclampedLoadStart, metricLcp));
|
|
41
|
+
|
|
42
|
+
const unclampedLoadEnd = (lcpRecord.networkEndTime - timeOrigin) * throttleRatio;
|
|
43
|
+
const loadEnd = Math.max(loadStart, Math.min(unclampedLoadEnd, metricLcp));
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
ttfb,
|
|
47
|
+
loadStart,
|
|
48
|
+
loadEnd,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const LCPBreakdownComputed = makeComputedArtifact(
|
|
54
|
+
LCPBreakdown,
|
|
55
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
56
|
+
);
|
|
57
|
+
export {LCPBreakdownComputed as LCPBreakdown};
|
|
58
|
+
|
|
@@ -5,11 +5,17 @@ declare const MaxPotentialFIDComputed: typeof MaxPotentialFID & {
|
|
|
5
5
|
}>) => Promise<import("../../index.js").Artifacts.Metric | import("../../index.js").Artifacts.LanternMetric>;
|
|
6
6
|
};
|
|
7
7
|
declare class MaxPotentialFID extends NavigationMetric {
|
|
8
|
+
/**
|
|
9
|
+
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
10
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
11
|
+
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
12
|
+
*/
|
|
13
|
+
static computeSimulatedMetric(data: LH.Artifacts.NavigationMetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
8
14
|
/**
|
|
9
15
|
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
10
16
|
* @return {Promise<LH.Artifacts.Metric>}
|
|
11
17
|
*/
|
|
12
18
|
static computeObservedMetric(data: LH.Artifacts.NavigationMetricComputationData): Promise<LH.Artifacts.Metric>;
|
|
13
19
|
}
|
|
14
|
-
import { NavigationMetric } from
|
|
20
|
+
import { NavigationMetric } from './navigation-metric.js';
|
|
15
21
|
//# sourceMappingURL=max-potential-fid.d.ts.map
|
|
@@ -19,9 +19,9 @@ declare class Metric {
|
|
|
19
19
|
/**
|
|
20
20
|
* @param {LH.Artifacts.MetricComputationData} data
|
|
21
21
|
* @param {LH.Artifacts.ComputedContext} context
|
|
22
|
-
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
22
|
+
* @return {Promise<LH.Artifacts.LanternMetric|LH.Artifacts.Metric>}
|
|
23
23
|
*/
|
|
24
|
-
static computeSimulatedMetric(data: LH.Artifacts.MetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
24
|
+
static computeSimulatedMetric(data: LH.Artifacts.MetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric | LH.Artifacts.Metric>;
|
|
25
25
|
/**
|
|
26
26
|
* @param {LH.Artifacts.MetricComputationData} data
|
|
27
27
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -40,7 +40,7 @@ class Metric {
|
|
|
40
40
|
/**
|
|
41
41
|
* @param {LH.Artifacts.MetricComputationData} data
|
|
42
42
|
* @param {LH.Artifacts.ComputedContext} context
|
|
43
|
-
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
43
|
+
* @return {Promise<LH.Artifacts.LanternMetric|LH.Artifacts.Metric>}
|
|
44
44
|
*/
|
|
45
45
|
static computeSimulatedMetric(data, context) { // eslint-disable-line no-unused-vars
|
|
46
46
|
throw new Error('Unimplemented');
|
|
@@ -2,9 +2,9 @@ export class NavigationMetric extends Metric {
|
|
|
2
2
|
/**
|
|
3
3
|
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
4
4
|
* @param {LH.Artifacts.ComputedContext} context
|
|
5
|
-
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
5
|
+
* @return {Promise<LH.Artifacts.LanternMetric|LH.Artifacts.Metric>}
|
|
6
6
|
*/
|
|
7
|
-
static computeSimulatedMetric(data: LH.Artifacts.NavigationMetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
7
|
+
static computeSimulatedMetric(data: LH.Artifacts.NavigationMetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric | LH.Artifacts.Metric>;
|
|
8
8
|
/**
|
|
9
9
|
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
10
10
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -12,5 +12,5 @@ export class NavigationMetric extends Metric {
|
|
|
12
12
|
*/
|
|
13
13
|
static computeObservedMetric(data: LH.Artifacts.NavigationMetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.Metric>;
|
|
14
14
|
}
|
|
15
|
-
import Metric from
|
|
15
|
+
import Metric from './metric.js';
|
|
16
16
|
//# sourceMappingURL=navigation-metric.d.ts.map
|
|
@@ -14,7 +14,7 @@ class NavigationMetric extends Metric {
|
|
|
14
14
|
/**
|
|
15
15
|
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
16
16
|
* @param {LH.Artifacts.ComputedContext} context
|
|
17
|
-
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
17
|
+
* @return {Promise<LH.Artifacts.LanternMetric|LH.Artifacts.Metric>}
|
|
18
18
|
*/
|
|
19
19
|
static computeSimulatedMetric(data, context) { // eslint-disable-line no-unused-vars
|
|
20
20
|
throw new Error('Unimplemented');
|
|
@@ -83,5 +83,5 @@ declare class Responsiveness {
|
|
|
83
83
|
settings: LH.Audit.Context['settings'];
|
|
84
84
|
}, context: LH.Artifacts.ComputedContext): Promise<EventTimingEvent | FallbackTimingEvent | null>;
|
|
85
85
|
}
|
|
86
|
-
import { ProcessedTrace } from
|
|
86
|
+
import { ProcessedTrace } from '../processed-trace.js';
|
|
87
87
|
//# sourceMappingURL=responsiveness.d.ts.map
|
|
@@ -5,6 +5,12 @@ declare const SpeedIndexComputed: typeof SpeedIndex & {
|
|
|
5
5
|
}>) => Promise<import("../../index.js").Artifacts.Metric | import("../../index.js").Artifacts.LanternMetric>;
|
|
6
6
|
};
|
|
7
7
|
declare class SpeedIndex extends NavigationMetric {
|
|
8
|
+
/**
|
|
9
|
+
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
10
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
11
|
+
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
12
|
+
*/
|
|
13
|
+
static computeSimulatedMetric(data: LH.Artifacts.NavigationMetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
8
14
|
}
|
|
9
|
-
import { NavigationMetric } from
|
|
15
|
+
import { NavigationMetric } from './navigation-metric.js';
|
|
10
16
|
//# sourceMappingURL=speed-index.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { TimeToFirstByteComputed as TimeToFirstByte };
|
|
2
|
+
declare const TimeToFirstByteComputed: typeof TimeToFirstByte & {
|
|
3
|
+
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
4
|
+
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
5
|
+
}>) => Promise<import("../../index.js").Artifacts.Metric | import("../../index.js").Artifacts.LanternMetric>;
|
|
6
|
+
};
|
|
7
|
+
declare class TimeToFirstByte extends NavigationMetric {
|
|
8
|
+
/**
|
|
9
|
+
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
10
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
11
|
+
* @return {Promise<LH.Artifacts.Metric>}
|
|
12
|
+
*/
|
|
13
|
+
static computeSimulatedMetric(data: LH.Artifacts.NavigationMetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.Metric>;
|
|
14
|
+
}
|
|
15
|
+
import { NavigationMetric } from './navigation-metric.js';
|
|
16
|
+
//# sourceMappingURL=time-to-first-byte.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright 2023 The Lighthouse Authors. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
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
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
+
import {NavigationMetric} from './navigation-metric.js';
|
|
9
|
+
import {MainResource} from '../main-resource.js';
|
|
10
|
+
import {NetworkAnalysis} from '../network-analysis.js';
|
|
11
|
+
|
|
12
|
+
class TimeToFirstByte extends NavigationMetric {
|
|
13
|
+
/**
|
|
14
|
+
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
15
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
16
|
+
* @return {Promise<LH.Artifacts.Metric>}
|
|
17
|
+
*/
|
|
18
|
+
static async computeSimulatedMetric(data, context) {
|
|
19
|
+
const mainResource = await MainResource.request(data, context);
|
|
20
|
+
const networkAnalysis = await NetworkAnalysis.request(data.devtoolsLog, context);
|
|
21
|
+
|
|
22
|
+
const observedTTFB = (await this.computeObservedMetric(data, context)).timing;
|
|
23
|
+
const observedResponseTime =
|
|
24
|
+
networkAnalysis.serverResponseTimeByOrigin.get(mainResource.parsedURL.securityOrigin);
|
|
25
|
+
if (observedResponseTime === undefined) throw new Error('No response time for origin');
|
|
26
|
+
|
|
27
|
+
// Estimate when the connection is not warm.
|
|
28
|
+
// TTFB = DNS + (SSL)? + TCP handshake + 1 RT for request + server response time
|
|
29
|
+
let roundTrips = 3;
|
|
30
|
+
if (mainResource.parsedURL.scheme === 'https') roundTrips += 1;
|
|
31
|
+
const estimatedTTFB = data.settings.throttling.rttMs * roundTrips + observedResponseTime;
|
|
32
|
+
|
|
33
|
+
const timing = Math.max(observedTTFB, estimatedTTFB);
|
|
34
|
+
return {timing};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @param {LH.Artifacts.NavigationMetricComputationData} data
|
|
39
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
40
|
+
* @return {Promise<LH.Artifacts.Metric>}
|
|
41
|
+
*/
|
|
42
|
+
static async computeObservedMetric(data, context) {
|
|
43
|
+
const {processedNavigation} = data;
|
|
44
|
+
const timeOriginTs = processedNavigation.timestamps.timeOrigin;
|
|
45
|
+
const mainResource = await MainResource.request(data, context);
|
|
46
|
+
|
|
47
|
+
// Technically TTFB is the start of the response headers not the end.
|
|
48
|
+
// That signal isn't available to us so we use header end time as a best guess.
|
|
49
|
+
const timestamp = mainResource.responseHeadersEndTime * 1000;
|
|
50
|
+
const timing = (timestamp - timeOriginTs) / 1000;
|
|
51
|
+
|
|
52
|
+
return {timing, timestamp};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const TimeToFirstByteComputed = makeComputedArtifact(
|
|
57
|
+
TimeToFirstByte,
|
|
58
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
59
|
+
);
|
|
60
|
+
export {TimeToFirstByteComputed as TimeToFirstByte};
|
|
@@ -18,6 +18,8 @@ import {SpeedIndex} from './speed-index.js';
|
|
|
18
18
|
import {MaxPotentialFID} from './max-potential-fid.js';
|
|
19
19
|
import {TotalBlockingTime} from './total-blocking-time.js';
|
|
20
20
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
21
|
+
import {TimeToFirstByte} from './time-to-first-byte.js';
|
|
22
|
+
import {LCPBreakdown} from './lcp-breakdown.js';
|
|
21
23
|
|
|
22
24
|
class TimingSummary {
|
|
23
25
|
/**
|
|
@@ -57,6 +59,8 @@ class TimingSummary {
|
|
|
57
59
|
const maxPotentialFID = await requestOrUndefined(MaxPotentialFID, metricComputationData);
|
|
58
60
|
const speedIndex = await requestOrUndefined(SpeedIndex, metricComputationData);
|
|
59
61
|
const totalBlockingTime = await requestOrUndefined(TotalBlockingTime, metricComputationData);
|
|
62
|
+
const lcpBreakdown = await requestOrUndefined(LCPBreakdown, metricComputationData);
|
|
63
|
+
const ttfb = await requestOrUndefined(TimeToFirstByte, metricComputationData);
|
|
60
64
|
|
|
61
65
|
const {
|
|
62
66
|
cumulativeLayoutShift,
|
|
@@ -87,6 +91,12 @@ class TimingSummary {
|
|
|
87
91
|
cumulativeLayoutShiftMainFrame,
|
|
88
92
|
totalCumulativeLayoutShift,
|
|
89
93
|
|
|
94
|
+
lcpLoadStart: lcpBreakdown?.loadStart,
|
|
95
|
+
lcpLoadEnd: lcpBreakdown?.loadEnd,
|
|
96
|
+
|
|
97
|
+
timeToFirstByte: ttfb?.timing,
|
|
98
|
+
timeToFirstByteTs: ttfb?.timestamp,
|
|
99
|
+
|
|
90
100
|
// Include all timestamps of interest from the processed trace
|
|
91
101
|
observedTimeOrigin: processedTrace.timings.timeOrigin,
|
|
92
102
|
observedTimeOriginTs: processedTrace.timestamps.timeOrigin,
|
|
@@ -18,6 +18,12 @@ declare const TotalBlockingTimeComputed: typeof TotalBlockingTime & {
|
|
|
18
18
|
* to smaller improvements to main thread responsiveness.
|
|
19
19
|
*/
|
|
20
20
|
declare class TotalBlockingTime extends ComputedMetric {
|
|
21
|
+
/**
|
|
22
|
+
* @param {LH.Artifacts.MetricComputationData} data
|
|
23
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
24
|
+
* @return {Promise<LH.Artifacts.LanternMetric>}
|
|
25
|
+
*/
|
|
26
|
+
static computeSimulatedMetric(data: LH.Artifacts.MetricComputationData, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
21
27
|
}
|
|
22
|
-
import ComputedMetric from
|
|
28
|
+
import ComputedMetric from './metric.js';
|
|
23
29
|
//# sourceMappingURL=total-blocking-time.d.ts.map
|
|
@@ -11,5 +11,5 @@ declare class NetworkRecords {
|
|
|
11
11
|
*/
|
|
12
12
|
static compute_(devtoolsLog: LH.DevtoolsLog): Promise<Array<LH.Artifacts.NetworkRequest>>;
|
|
13
13
|
}
|
|
14
|
-
import * as LH from
|
|
14
|
+
import * as LH from '../../types/lh.js';
|
|
15
15
|
//# sourceMappingURL=network-records.d.ts.map
|
|
@@ -16,7 +16,7 @@ declare const PageDependencyGraphComputed: typeof PageDependencyGraph & {
|
|
|
16
16
|
computedCache: Map<string, import("../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
17
17
|
}>) => Promise<import("../lib/dependency-graph/base-node.js").Node>;
|
|
18
18
|
};
|
|
19
|
-
import { NetworkNode } from
|
|
19
|
+
import { NetworkNode } from '../lib/dependency-graph/network-node.js';
|
|
20
20
|
declare class PageDependencyGraph {
|
|
21
21
|
/**
|
|
22
22
|
* @param {LH.Artifacts.NetworkRequest} record
|
|
@@ -62,15 +62,6 @@ declare class PageDependencyGraph {
|
|
|
62
62
|
* @param {Node} rootNode
|
|
63
63
|
*/
|
|
64
64
|
static printGraph(rootNode: Node, widthInCharacters?: number): void;
|
|
65
|
-
/**
|
|
66
|
-
* Recalculate `artifacts.URL` for clients that don't provide it.
|
|
67
|
-
*
|
|
68
|
-
* @param {LH.DevtoolsLog} devtoolsLog
|
|
69
|
-
* @param {LH.Artifacts.NetworkRequest[]} networkRecords
|
|
70
|
-
* @param {LH.Artifacts.ProcessedTrace} processedTrace
|
|
71
|
-
* @return {URLArtifact}
|
|
72
|
-
*/
|
|
73
|
-
static getDocumentUrls(devtoolsLog: import("../index.js").DevtoolsLog, networkRecords: LH.Artifacts.NetworkRequest[], processedTrace: LH.Artifacts.ProcessedTrace): URLArtifact;
|
|
74
65
|
/**
|
|
75
66
|
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, URL: LH.Artifacts['URL']}} data
|
|
76
67
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -82,7 +73,7 @@ declare class PageDependencyGraph {
|
|
|
82
73
|
URL: LH.Artifacts['URL'];
|
|
83
74
|
}, context: LH.Artifacts.ComputedContext): Promise<Node>;
|
|
84
75
|
}
|
|
85
|
-
import { NetworkRequest } from
|
|
86
|
-
import { ProcessedTrace } from
|
|
87
|
-
import { CPUNode } from
|
|
76
|
+
import { NetworkRequest } from '../lib/network-request.js';
|
|
77
|
+
import { ProcessedTrace } from './processed-trace.js';
|
|
78
|
+
import { CPUNode } from '../lib/dependency-graph/cpu-node.js';
|
|
88
79
|
//# sourceMappingURL=page-dependency-graph.d.ts.map
|
|
@@ -12,6 +12,7 @@ import {NetworkRequest} from '../lib/network-request.js';
|
|
|
12
12
|
import {ProcessedTrace} from './processed-trace.js';
|
|
13
13
|
import {NetworkRecords} from './network-records.js';
|
|
14
14
|
import {NetworkAnalyzer} from '../lib/dependency-graph/simulator/network-analyzer.js';
|
|
15
|
+
import {DocumentUrls} from './document-urls.js';
|
|
15
16
|
|
|
16
17
|
/** @typedef {import('../lib/dependency-graph/base-node.js').Node} Node */
|
|
17
18
|
/** @typedef {Omit<LH.Artifacts['URL'], 'finalDisplayedUrl'>} URLArtifact */
|
|
@@ -459,37 +460,6 @@ class PageDependencyGraph {
|
|
|
459
460
|
});
|
|
460
461
|
}
|
|
461
462
|
|
|
462
|
-
/**
|
|
463
|
-
* Recalculate `artifacts.URL` for clients that don't provide it.
|
|
464
|
-
*
|
|
465
|
-
* @param {LH.DevtoolsLog} devtoolsLog
|
|
466
|
-
* @param {LH.Artifacts.NetworkRequest[]} networkRecords
|
|
467
|
-
* @param {LH.Artifacts.ProcessedTrace} processedTrace
|
|
468
|
-
* @return {URLArtifact}
|
|
469
|
-
*/
|
|
470
|
-
static getDocumentUrls(devtoolsLog, networkRecords, processedTrace) {
|
|
471
|
-
const mainFrameId = processedTrace.mainFrameInfo.frameId;
|
|
472
|
-
|
|
473
|
-
/** @type {string|undefined} */
|
|
474
|
-
let requestedUrl;
|
|
475
|
-
/** @type {string|undefined} */
|
|
476
|
-
let mainDocumentUrl;
|
|
477
|
-
for (const event of devtoolsLog) {
|
|
478
|
-
if (event.method === 'Page.frameNavigated' && event.params.frame.id === mainFrameId) {
|
|
479
|
-
const {url} = event.params.frame;
|
|
480
|
-
// Only set requestedUrl on the first main frame navigation.
|
|
481
|
-
if (!requestedUrl) requestedUrl = url;
|
|
482
|
-
mainDocumentUrl = url;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
if (!requestedUrl || !mainDocumentUrl) throw new Error('No main frame navigations found');
|
|
486
|
-
|
|
487
|
-
const initialRequest = NetworkAnalyzer.findResourceForUrl(networkRecords, requestedUrl);
|
|
488
|
-
if (initialRequest?.redirects?.length) requestedUrl = initialRequest.redirects[0].url;
|
|
489
|
-
|
|
490
|
-
return {requestedUrl, mainDocumentUrl};
|
|
491
|
-
}
|
|
492
|
-
|
|
493
463
|
/**
|
|
494
464
|
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, URL: LH.Artifacts['URL']}} data
|
|
495
465
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -504,8 +474,7 @@ class PageDependencyGraph {
|
|
|
504
474
|
|
|
505
475
|
// COMPAT: Backport for pre-10.0 clients that don't pass the URL artifact here (e.g. pubads).
|
|
506
476
|
// Calculates the URL artifact from the processed trace and DT log.
|
|
507
|
-
const URL = data.URL ||
|
|
508
|
-
PageDependencyGraph.getDocumentUrls(devtoolsLog, networkRecords, processedTrace);
|
|
477
|
+
const URL = data.URL || await DocumentUrls.request(data, context);
|
|
509
478
|
|
|
510
479
|
return PageDependencyGraph.createGraph(processedTrace, networkRecords, URL);
|
|
511
480
|
}
|
|
@@ -17,5 +17,5 @@ declare class ProcessedNavigation {
|
|
|
17
17
|
*/
|
|
18
18
|
static compute_(traceOrProcessedTrace: LH.Trace | LH.Artifacts.ProcessedTrace, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.ProcessedNavigation>;
|
|
19
19
|
}
|
|
20
|
-
import { ProcessedTrace } from
|
|
20
|
+
import { ProcessedTrace } from './processed-trace.js';
|
|
21
21
|
//# sourceMappingURL=processed-navigation.d.ts.map
|
|
@@ -39,8 +39,8 @@ declare class ResourceSummary {
|
|
|
39
39
|
budgets: LH.Util.ImmutableObject<LH.Budget[] | null>;
|
|
40
40
|
}, context: LH.Artifacts.ComputedContext): Promise<Record<LH.Budget.ResourceType, ResourceEntry>>;
|
|
41
41
|
}
|
|
42
|
-
import { Util } from
|
|
43
|
-
import { Budget } from
|
|
44
|
-
import { NetworkRequest } from
|
|
45
|
-
import { EntityClassification } from
|
|
42
|
+
import { Util } from '../../shared/util.js';
|
|
43
|
+
import { Budget } from '../config/budget.js';
|
|
44
|
+
import { NetworkRequest } from '../lib/network-request.js';
|
|
45
|
+
import { EntityClassification } from './entity-classification.js';
|
|
46
46
|
//# sourceMappingURL=resource-summary.d.ts.map
|
|
@@ -68,5 +68,5 @@ declare class FRGatherer implements LH.Gatherer.GathererInstance, LH.Gatherer.FR
|
|
|
68
68
|
*/
|
|
69
69
|
afterPass(passContext: LH.Gatherer.PassContext, loadData: LH.Gatherer.LoadData): Promise<LH.Gatherer.PhaseResultNonPromise>;
|
|
70
70
|
}
|
|
71
|
-
import * as LH from
|
|
71
|
+
import * as LH from '../../types/lh.js';
|
|
72
72
|
//# sourceMappingURL=base-gatherer.d.ts.map
|
|
@@ -76,7 +76,7 @@ export class NetworkMonitor extends NetworkMonitor_base {
|
|
|
76
76
|
*/
|
|
77
77
|
_emitNetworkStatus(): void;
|
|
78
78
|
}
|
|
79
|
-
import { NetworkRecorder } from
|
|
80
|
-
import { NetworkRequest } from
|
|
79
|
+
import { NetworkRecorder } from '../../lib/network-recorder.js';
|
|
80
|
+
import { NetworkRequest } from '../../lib/network-request.js';
|
|
81
81
|
export {};
|
|
82
82
|
//# sourceMappingURL=network-monitor.d.ts.map
|
|
@@ -45,9 +45,10 @@ export class TargetManager extends TargetManager_base {
|
|
|
45
45
|
/**
|
|
46
46
|
* Returns a listener for all protocol events from session, and augments the
|
|
47
47
|
* event with the sessionId.
|
|
48
|
+
* @param {LH.Protocol.TargetType} targetType
|
|
48
49
|
* @param {string} sessionId
|
|
49
50
|
*/
|
|
50
|
-
_getProtocolEventListener(sessionId: string): <EventName extends keyof import("puppeteer-core").ProtocolMapping.Events>(method: EventName, params: import("../../../types/protocol.js").default.RawEventMessageRecord[EventName]["params"]) => void;
|
|
51
|
+
_getProtocolEventListener(targetType: LH.Protocol.TargetType, sessionId: string): <EventName extends keyof import("puppeteer-core").ProtocolMapping.Events>(method: EventName, params: import("../../../types/protocol.js").default.RawEventMessageRecord[EventName]["params"]) => void;
|
|
51
52
|
/**
|
|
52
53
|
* @return {Promise<void>}
|
|
53
54
|
*/
|