@paulirish/trace_engine 0.0.50 → 0.0.52
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/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +1 -1
- package/core/platform/Constructor.d.ts +2 -2
- package/core/platform/Constructor.js.map +1 -1
- package/core/platform/StringUtilities.d.ts +2 -5
- package/core/platform/StringUtilities.js +4 -4
- package/core/platform/StringUtilities.js.map +1 -1
- package/core/platform/TypescriptUtilities.d.ts +1 -1
- package/core/platform/TypescriptUtilities.js +1 -1
- package/core/platform/TypescriptUtilities.js.map +1 -1
- package/core/platform/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/core/platform/platform-tsconfig.json +3 -4
- package/core/platform/platform.d.ts +1 -2
- package/core/platform/platform.js +1 -2
- package/core/platform/platform.js.map +1 -1
- package/generated/protocol.d.ts +306 -62
- package/locales/af.json +63 -3
- package/locales/am.json +63 -3
- package/locales/ar.json +63 -3
- package/locales/as.json +63 -3
- package/locales/az.json +63 -3
- package/locales/be.json +64 -4
- package/locales/bg.json +62 -2
- package/locales/bn.json +63 -3
- package/locales/bs.json +63 -3
- package/locales/ca.json +62 -2
- package/locales/cs.json +62 -2
- package/locales/cy.json +63 -3
- package/locales/da.json +63 -3
- package/locales/de.json +63 -3
- package/locales/el.json +62 -2
- package/locales/en-GB.json +63 -3
- package/locales/en-US.json +58 -22
- package/locales/en-XL.json +58 -22
- package/locales/es-419.json +63 -3
- package/locales/es.json +64 -4
- package/locales/et.json +64 -4
- package/locales/eu.json +79 -19
- package/locales/fa.json +62 -2
- package/locales/fi.json +63 -3
- package/locales/fil.json +63 -3
- package/locales/fr-CA.json +63 -3
- package/locales/fr.json +63 -3
- package/locales/gl.json +62 -2
- package/locales/gu.json +63 -3
- package/locales/he.json +63 -3
- package/locales/hi.json +62 -2
- package/locales/hr.json +63 -3
- package/locales/hu.json +62 -2
- package/locales/hy.json +63 -3
- package/locales/id.json +62 -2
- package/locales/is.json +64 -4
- package/locales/it.json +64 -4
- package/locales/ja.json +63 -3
- package/locales/ka.json +63 -3
- package/locales/kk.json +62 -2
- package/locales/km.json +62 -2
- package/locales/kn.json +63 -3
- package/locales/ko.json +63 -3
- package/locales/ky.json +63 -3
- package/locales/lo.json +63 -3
- package/locales/lt.json +62 -2
- package/locales/lv.json +62 -2
- package/locales/mk.json +62 -2
- package/locales/ml.json +63 -3
- package/locales/mn.json +63 -3
- package/locales/mr.json +64 -4
- package/locales/ms.json +63 -3
- package/locales/my.json +63 -3
- package/locales/ne.json +64 -4
- package/locales/nl.json +63 -3
- package/locales/no.json +62 -2
- package/locales/or.json +63 -3
- package/locales/pa.json +62 -2
- package/locales/pl.json +62 -2
- package/locales/pt-PT.json +62 -2
- package/locales/pt.json +63 -3
- package/locales/ro.json +63 -3
- package/locales/ru.json +63 -3
- package/locales/si.json +63 -3
- package/locales/sk.json +63 -3
- package/locales/sl.json +62 -2
- package/locales/sq.json +63 -3
- package/locales/sr-Latn.json +62 -2
- package/locales/sr.json +62 -2
- package/locales/sv.json +62 -2
- package/locales/sw.json +63 -3
- package/locales/ta.json +66 -6
- package/locales/te.json +63 -3
- package/locales/th.json +63 -3
- package/locales/tr.json +63 -3
- package/locales/uk.json +63 -3
- package/locales/ur.json +64 -4
- package/locales/uz.json +62 -2
- package/locales/vi.json +62 -2
- package/locales/zh-HK.json +63 -3
- package/locales/zh-TW.json +63 -3
- package/locales/zh.json +62 -2
- package/locales/zu.json +63 -3
- package/models/cpu_profile/CPUProfileDataModel.d.ts +8 -0
- package/models/cpu_profile/CPUProfileDataModel.js.map +1 -1
- package/models/cpu_profile/cpu_profile-tsconfig.json +3 -3
- package/models/cpu_profile/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/Processor.d.ts +1 -1
- package/models/trace/Processor.js +94 -74
- package/models/trace/Processor.js.map +1 -1
- package/models/trace/TracingManager.js.map +1 -1
- package/models/trace/bundle-tsconfig.json +1 -1
- package/models/trace/devtools_entrypoint-bundle-typescript-tsconfig.json +21 -3
- package/models/trace/extras/ScriptDuplication.d.ts +15 -16
- package/models/trace/extras/ScriptDuplication.js +63 -79
- package/models/trace/extras/ScriptDuplication.js.map +1 -1
- package/models/trace/extras/StackTraceForEvent.js +80 -47
- package/models/trace/extras/StackTraceForEvent.js.map +1 -1
- package/models/trace/extras/ThirdParties.d.ts +14 -20
- package/models/trace/extras/ThirdParties.js +97 -130
- package/models/trace/extras/ThirdParties.js.map +1 -1
- package/models/trace/extras/TraceTree.d.ts +15 -3
- package/models/trace/extras/TraceTree.js +36 -8
- package/models/trace/extras/TraceTree.js.map +1 -1
- package/models/trace/extras/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/extras/extras-tsconfig.json +3 -3
- package/models/trace/extras/extras.d.ts +1029 -844
- package/models/trace/extras/extras.js +1029 -844
- package/models/trace/handlers/AsyncJSCallsHandler.d.ts +5 -0
- package/models/trace/handlers/AsyncJSCallsHandler.js +48 -13
- package/models/trace/handlers/AsyncJSCallsHandler.js.map +1 -1
- package/models/trace/handlers/InvalidationsHandler.js +1 -0
- package/models/trace/handlers/InvalidationsHandler.js.map +1 -1
- package/models/trace/handlers/ModelHandlers.d.ts +0 -1
- package/models/trace/handlers/ModelHandlers.js +0 -1
- package/models/trace/handlers/ModelHandlers.js.map +1 -1
- package/models/trace/handlers/NetworkRequestsHandler.js +1 -1
- package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -1
- package/models/trace/handlers/RendererHandler.d.ts +1 -1
- package/models/trace/handlers/RendererHandler.js +2 -2
- package/models/trace/handlers/RendererHandler.js.map +1 -1
- package/models/trace/handlers/ScreenshotsHandler.js +4 -1
- package/models/trace/handlers/ScreenshotsHandler.js.map +1 -1
- package/models/trace/handlers/ScriptsHandler.d.ts +12 -0
- package/models/trace/handlers/ScriptsHandler.js +99 -1
- package/models/trace/handlers/ScriptsHandler.js.map +1 -1
- package/models/trace/handlers/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/handlers/handlers-tsconfig.json +3 -4
- package/models/trace/handlers/helpers.js +9 -0
- package/models/trace/handlers/helpers.js.map +1 -1
- package/models/trace/helpers/Network.d.ts +5 -0
- package/models/trace/helpers/Network.js +17 -0
- package/models/trace/helpers/Network.js.map +1 -1
- package/models/trace/helpers/SamplesIntegrator.js +19 -23
- package/models/trace/helpers/SamplesIntegrator.js.map +1 -1
- package/models/trace/helpers/SyntheticEvents.d.ts +0 -1
- package/models/trace/helpers/SyntheticEvents.js +0 -4
- package/models/trace/helpers/SyntheticEvents.js.map +1 -1
- package/models/trace/helpers/Trace.d.ts +2 -1
- package/models/trace/helpers/Trace.js +101 -1
- package/models/trace/helpers/Trace.js.map +1 -1
- package/models/trace/helpers/TreeHelpers.d.ts +2 -5
- package/models/trace/helpers/TreeHelpers.js +0 -4
- package/models/trace/helpers/TreeHelpers.js.map +1 -1
- package/models/trace/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/helpers/helpers-tsconfig.json +3 -3
- package/models/trace/insights/CLSCulprits.d.ts +6 -1
- package/models/trace/insights/CLSCulprits.js +11 -2
- package/models/trace/insights/CLSCulprits.js.map +1 -1
- package/models/trace/insights/{UseCache.d.ts → Cache.d.ts} +2 -3
- package/models/trace/insights/{UseCache.js → Cache.js} +12 -6
- package/models/trace/insights/Cache.js.map +1 -0
- package/models/trace/insights/Common.d.ts +21 -2
- package/models/trace/insights/Common.js +89 -2
- package/models/trace/insights/Common.js.map +1 -1
- package/models/trace/insights/DocumentLatency.js +3 -8
- package/models/trace/insights/DocumentLatency.js.map +1 -1
- package/models/trace/insights/DuplicatedJavaScript.d.ts +7 -4
- package/models/trace/insights/DuplicatedJavaScript.js +31 -5
- package/models/trace/insights/DuplicatedJavaScript.js.map +1 -1
- package/models/trace/insights/ForcedReflow.d.ts +5 -1
- package/models/trace/insights/ForcedReflow.js +6 -2
- package/models/trace/insights/ForcedReflow.js.map +1 -1
- package/models/trace/insights/ImageDelivery.d.ts +0 -1
- package/models/trace/insights/ImageDelivery.js +1 -1
- package/models/trace/insights/ImageDelivery.js.map +1 -1
- package/models/trace/insights/InteractionToNextPaint.d.ts +1 -0
- package/models/trace/insights/InteractionToNextPaint.js +3 -0
- package/models/trace/insights/InteractionToNextPaint.js.map +1 -1
- package/models/trace/insights/LegacyJavaScript.d.ts +32 -0
- package/models/trace/insights/LegacyJavaScript.js +80 -0
- package/models/trace/insights/LegacyJavaScript.js.map +1 -0
- package/models/trace/insights/Models.d.ts +3 -1
- package/models/trace/insights/Models.js +3 -1
- package/models/trace/insights/Models.js.map +1 -1
- package/models/trace/insights/ModernHTTP.d.ts +51 -0
- package/models/trace/insights/ModernHTTP.js +187 -0
- package/models/trace/insights/ModernHTTP.js.map +1 -0
- package/models/trace/insights/NetworkDependencyTree.js +1 -1
- package/models/trace/insights/NetworkDependencyTree.js.map +1 -1
- package/models/trace/insights/ThirdParties.d.ts +1 -5
- package/models/trace/insights/ThirdParties.js +8 -21
- package/models/trace/insights/ThirdParties.js.map +1 -1
- package/models/trace/insights/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/insights/insights-tsconfig.json +9 -4
- package/models/trace/insights/types.d.ts +10 -0
- package/models/trace/insights/types.js.map +1 -1
- package/models/trace/lantern/core/core-tsconfig.json +3 -3
- package/models/trace/lantern/core/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/lantern/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/lantern/graph/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/lantern/graph/graph-tsconfig.json +3 -3
- package/models/trace/lantern/lantern-tsconfig.json +3 -3
- package/models/trace/lantern/metrics/Metric.d.ts +4 -4
- package/models/trace/lantern/metrics/Metric.js +4 -6
- package/models/trace/lantern/metrics/Metric.js.map +1 -1
- package/models/trace/lantern/metrics/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/lantern/metrics/metrics-tsconfig.json +3 -3
- package/models/trace/lantern/simulation/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/lantern/simulation/simulation-tsconfig.json +3 -3
- package/models/trace/lantern/types/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/lantern/types/types-tsconfig.json +3 -3
- package/models/trace/trace-tsconfig.json +3 -3
- package/models/trace/types/Configuration.d.ts +2 -0
- package/models/trace/types/Configuration.js.map +1 -1
- package/models/trace/types/TraceEvents.d.ts +30 -54
- package/models/trace/types/TraceEvents.js +8 -23
- package/models/trace/types/TraceEvents.js.map +1 -1
- package/models/trace/types/devtools_entrypoint-bundle-typescript-tsconfig.json +3 -3
- package/models/trace/types/types-tsconfig.json +3 -3
- package/package.json +3 -2
- package/test/test-trace-engine.mjs +19 -17
- package/third_party/legacy-javascript/legacy-javascript.d.ts +1 -0
- package/third_party/legacy-javascript/legacy-javascript.js +1 -0
- package/core/platform/ServerTiming.d.ts +0 -31
- package/core/platform/ServerTiming.js +0 -212
- package/core/platform/ServerTiming.js.map +0 -1
- package/models/trace/handlers/ServerTimingsHandler.d.ts +0 -9
- package/models/trace/handlers/ServerTimingsHandler.js +0 -106
- package/models/trace/handlers/ServerTimingsHandler.js.map +0 -1
- package/models/trace/insights/UseCache.js.map +0 -1
|
@@ -60,6 +60,15 @@ export type InsightModel<UIStrings extends Record<string, string> = Record<strin
|
|
|
60
60
|
relatedEvents?: RelatedEventsMap | Types.Events.Event[];
|
|
61
61
|
warnings?: InsightWarning[];
|
|
62
62
|
metricSavings?: MetricSavings;
|
|
63
|
+
/**
|
|
64
|
+
* An estimate for the number of bytes that this insight deems to have been wasted.
|
|
65
|
+
* Bytes are in terms of transfer size: for each component of savings related to an
|
|
66
|
+
* individual request, the insight will estimate its impact on transfer size by using
|
|
67
|
+
* the compression ratio of the resource.
|
|
68
|
+
*
|
|
69
|
+
* This field is only displayed for informational purposes.
|
|
70
|
+
*/
|
|
71
|
+
wastedBytes?: number;
|
|
63
72
|
frameId?: string;
|
|
64
73
|
/**
|
|
65
74
|
* If this insight is attached to a navigation, this stores its ID.
|
|
@@ -107,6 +116,7 @@ export declare const enum InsightKeys {
|
|
|
107
116
|
FORCED_REFLOW = "ForcedReflow",
|
|
108
117
|
IMAGE_DELIVERY = "ImageDelivery",
|
|
109
118
|
LCP_DISCOVERY = "LCPDiscovery",
|
|
119
|
+
LEGACY_JAVASCRIPT = "LegacyJavaScript",
|
|
110
120
|
NETWORK_DEPENDENCY_TREE = "NetworkDependencyTree",
|
|
111
121
|
RENDER_BLOCKING = "RenderBlocking",
|
|
112
122
|
SLOW_CSS_SELECTOR = "SlowCSSSelector",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/insights/types.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAmC7B,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,uEAAuE;IACvE,6DAA2C,CAAA;IAC3C,yCAAuB,CAAA;AACzB,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAYD,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,8BAAW,CAAA;IACX,8BAAW,CAAA;IACX,8BAAW,CAAA;AACb,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B","sourcesContent":["// Copyright 2024 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../../core/common/common.js';\nimport type * as Lantern from '../lantern/lantern.js';\nimport type * as Types from '../types/types.js';\n\nimport type * as Models from './Models.js';\n\n/**\n * Context for the portion of the trace an insight should look at.\n */\nexport type InsightSetContext = InsightSetContextWithoutNavigation|InsightSetContextWithNavigation;\n\nexport interface InsightSetContextWithoutNavigation {\n bounds: Types.Timing.TraceWindowMicro;\n frameId: string;\n navigation?: never;\n}\n\nexport interface InsightSetContextWithNavigation {\n bounds: Types.Timing.TraceWindowMicro;\n frameId: string;\n navigation: Types.Events.NavigationStart;\n navigationId: string;\n lantern?: LanternContext;\n}\n\nexport interface LanternContext {\n graph: Lantern.Graph.Node<Types.Events.SyntheticNetworkRequest>;\n simulator: Lantern.Simulation.Simulator<Types.Events.SyntheticNetworkRequest>;\n metrics: Record<string, Lantern.Metrics.MetricResult>;\n}\n\nexport type InsightModelsType = typeof Models;\n\nexport enum InsightWarning {\n NO_FP = 'NO_FP',\n NO_LCP = 'NO_LCP',\n // No network request could be identified as the primary HTML document.\n NO_DOCUMENT_REQUEST = 'NO_DOCUMENT_REQUEST',\n NO_LAYOUT = 'NO_LAYOUT',\n}\n\nexport interface MetricSavings {\n /* eslint-disable @typescript-eslint/naming-convention */\n FCP?: Types.Timing.Milli;\n LCP?: Types.Timing.Milli;\n TBT?: Types.Timing.Milli;\n CLS?: number;\n INP?: Types.Timing.Milli;\n /* eslint-enable @typescript-eslint/naming-convention */\n}\n\nexport enum InsightCategory {\n ALL = 'All',\n INP = 'INP',\n LCP = 'LCP',\n CLS = 'CLS',\n}\n\nexport type RelatedEventsMap = Map<Types.Events.Event, string[]>;\n\nexport type Checklist<Keys extends string> = Record<Keys, {label: Common.UIString.LocalizedString, value: boolean}>;\n\nexport type InsightModel<UIStrings extends Record<string, string> = Record<string, string>,\n ExtraDetail extends Record<string, unknown> = Record<string, unknown>> =\n ExtraDetail&{\n /** Used internally to identify the type of a model, not shown visibly to users **/\n insightKey: keyof InsightModelsType,\n /** Not used within DevTools - this is for external consumers (like Lighthouse). */\n strings: UIStrings,\n title: Common.UIString.LocalizedString,\n description: Common.UIString.LocalizedString,\n category: InsightCategory,\n state: 'pass' | 'fail' | 'informative',\n relatedEvents?: RelatedEventsMap | Types.Events.Event[],\n warnings?: InsightWarning[],\n metricSavings?: MetricSavings,\n frameId?: string,\n /**\n * If this insight is attached to a navigation, this stores its ID.\n */\n navigationId?: string,\n };\n\nexport type PartialInsightModel<T> =\n Omit<T, 'strings'|'title'|'description'|'category'|'state'|'insightKey'|'navigationId'|'frameId'>;\n\n/**\n * Contains insights for a specific navigation. If a trace began after a navigation already started,\n * this could instead represent the duration from the beginning of the trace up to the first recorded\n * navigation (or the end of the trace).\n */\nexport interface InsightSet {\n /** If for a navigation, this is the navigationId. Else it is Trace.Types.Events.NO_NAVIGATION. */\n id: Types.Events.NavigationId;\n /** The URL to show in the accordion list. */\n url: URL;\n frameId: string;\n bounds: Types.Timing.TraceWindowMicro;\n model: InsightModels;\n navigation?: Types.Events.NavigationStart;\n}\n\n/**\n * Contains insights for a specific insight set.\n */\nexport type InsightModels = {\n [I in keyof InsightModelsType]: ReturnType<InsightModelsType[I]['generateInsight']>;\n};\n\n/**\n * Contains insights for the entire trace. Insights are mostly grouped by `navigationId`, with one exception:\n *\n * If the analyzed trace started after the navigation, and has meaningful work with that span, there is no\n * navigation to map it to. In this case `Types.Events.NO_NAVIGATION` is used for the key.\n */\nexport type TraceInsightSets = Map<Types.Events.NavigationId, InsightSet>;\n\nexport const enum InsightKeys {\n LCP_PHASES = 'LCPPhases',\n INTERACTION_TO_NEXT_PAINT = 'InteractionToNextPaint',\n CLS_CULPRITS = 'CLSCulprits',\n THIRD_PARTIES = 'ThirdParties',\n DOCUMENT_LATENCY = 'DocumentLatency',\n DOM_SIZE = 'DOMSize',\n DUPLICATE_JAVASCRIPT = 'DuplicatedJavaScript',\n FONT_DISPLAY = 'FontDisplay',\n FORCED_REFLOW = 'ForcedReflow',\n IMAGE_DELIVERY = 'ImageDelivery',\n LCP_DISCOVERY = 'LCPDiscovery',\n NETWORK_DEPENDENCY_TREE = 'NetworkDependencyTree',\n RENDER_BLOCKING = 'RenderBlocking',\n SLOW_CSS_SELECTOR = 'SlowCSSSelector',\n VIEWPORT = 'Viewport',\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/insights/types.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAmC7B,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,uEAAuE;IACvE,6DAA2C,CAAA;IAC3C,yCAAuB,CAAA;AACzB,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAYD,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,8BAAW,CAAA;IACX,8BAAW,CAAA;IACX,8BAAW,CAAA;AACb,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B","sourcesContent":["// Copyright 2024 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../../core/common/common.js';\nimport type * as Lantern from '../lantern/lantern.js';\nimport type * as Types from '../types/types.js';\n\nimport type * as Models from './Models.js';\n\n/**\n * Context for the portion of the trace an insight should look at.\n */\nexport type InsightSetContext = InsightSetContextWithoutNavigation|InsightSetContextWithNavigation;\n\nexport interface InsightSetContextWithoutNavigation {\n bounds: Types.Timing.TraceWindowMicro;\n frameId: string;\n navigation?: never;\n}\n\nexport interface InsightSetContextWithNavigation {\n bounds: Types.Timing.TraceWindowMicro;\n frameId: string;\n navigation: Types.Events.NavigationStart;\n navigationId: string;\n lantern?: LanternContext;\n}\n\nexport interface LanternContext {\n graph: Lantern.Graph.Node<Types.Events.SyntheticNetworkRequest>;\n simulator: Lantern.Simulation.Simulator<Types.Events.SyntheticNetworkRequest>;\n metrics: Record<string, Lantern.Metrics.MetricResult>;\n}\n\nexport type InsightModelsType = typeof Models;\n\nexport enum InsightWarning {\n NO_FP = 'NO_FP',\n NO_LCP = 'NO_LCP',\n // No network request could be identified as the primary HTML document.\n NO_DOCUMENT_REQUEST = 'NO_DOCUMENT_REQUEST',\n NO_LAYOUT = 'NO_LAYOUT',\n}\n\nexport interface MetricSavings {\n /* eslint-disable @typescript-eslint/naming-convention */\n FCP?: Types.Timing.Milli;\n LCP?: Types.Timing.Milli;\n TBT?: Types.Timing.Milli;\n CLS?: number;\n INP?: Types.Timing.Milli;\n /* eslint-enable @typescript-eslint/naming-convention */\n}\n\nexport enum InsightCategory {\n ALL = 'All',\n INP = 'INP',\n LCP = 'LCP',\n CLS = 'CLS',\n}\n\nexport type RelatedEventsMap = Map<Types.Events.Event, string[]>;\n\nexport type Checklist<Keys extends string> = Record<Keys, {label: Common.UIString.LocalizedString, value: boolean}>;\n\nexport type InsightModel<UIStrings extends Record<string, string> = Record<string, string>,\n ExtraDetail extends Record<string, unknown> = Record<string, unknown>> =\n ExtraDetail&{\n /** Used internally to identify the type of a model, not shown visibly to users **/\n insightKey: keyof InsightModelsType,\n /** Not used within DevTools - this is for external consumers (like Lighthouse). */\n strings: UIStrings,\n title: Common.UIString.LocalizedString,\n description: Common.UIString.LocalizedString,\n category: InsightCategory,\n state: 'pass' | 'fail' | 'informative',\n relatedEvents?: RelatedEventsMap | Types.Events.Event[],\n warnings?: InsightWarning[],\n metricSavings?: MetricSavings,\n /**\n * An estimate for the number of bytes that this insight deems to have been wasted.\n * Bytes are in terms of transfer size: for each component of savings related to an\n * individual request, the insight will estimate its impact on transfer size by using\n * the compression ratio of the resource.\n *\n * This field is only displayed for informational purposes.\n */\n wastedBytes?: number,\n frameId?: string,\n /**\n * If this insight is attached to a navigation, this stores its ID.\n */\n navigationId?: string,\n };\n\nexport type PartialInsightModel<T> =\n Omit<T, 'strings'|'title'|'description'|'category'|'state'|'insightKey'|'navigationId'|'frameId'>;\n\n/**\n * Contains insights for a specific navigation. If a trace began after a navigation already started,\n * this could instead represent the duration from the beginning of the trace up to the first recorded\n * navigation (or the end of the trace).\n */\nexport interface InsightSet {\n /** If for a navigation, this is the navigationId. Else it is Trace.Types.Events.NO_NAVIGATION. */\n id: Types.Events.NavigationId;\n /** The URL to show in the accordion list. */\n url: URL;\n frameId: string;\n bounds: Types.Timing.TraceWindowMicro;\n model: InsightModels;\n navigation?: Types.Events.NavigationStart;\n}\n\n/**\n * Contains insights for a specific insight set.\n */\nexport type InsightModels = {\n [I in keyof InsightModelsType]: ReturnType<InsightModelsType[I]['generateInsight']>;\n};\n\n/**\n * Contains insights for the entire trace. Insights are mostly grouped by `navigationId`, with one exception:\n *\n * If the analyzed trace started after the navigation, and has meaningful work with that span, there is no\n * navigation to map it to. In this case `Types.Events.NO_NAVIGATION` is used for the key.\n */\nexport type TraceInsightSets = Map<Types.Events.NavigationId, InsightSet>;\n\nexport const enum InsightKeys {\n LCP_PHASES = 'LCPPhases',\n INTERACTION_TO_NEXT_PAINT = 'InteractionToNextPaint',\n CLS_CULPRITS = 'CLSCulprits',\n THIRD_PARTIES = 'ThirdParties',\n DOCUMENT_LATENCY = 'DocumentLatency',\n DOM_SIZE = 'DOMSize',\n DUPLICATE_JAVASCRIPT = 'DuplicatedJavaScript',\n FONT_DISPLAY = 'FontDisplay',\n FORCED_REFLOW = 'ForcedReflow',\n IMAGE_DELIVERY = 'ImageDelivery',\n LCP_DISCOVERY = 'LCPDiscovery',\n LEGACY_JAVASCRIPT = 'LegacyJavaScript',\n NETWORK_DEPENDENCY_TREE = 'NetworkDependencyTree',\n RENDER_BLOCKING = 'RenderBlocking',\n SLOW_CSS_SELECTOR = 'SlowCSSSelector',\n VIEWPORT = 'Viewport',\n}\n"]}
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/core",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -33,8 +34,7 @@
|
|
|
33
34
|
"../../../../../../../../front_end/models/trace/lantern/core/NetworkAnalyzer.ts",
|
|
34
35
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
35
36
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
36
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
37
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
38
38
|
],
|
|
39
39
|
"references": [
|
|
40
40
|
{
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/core",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -32,8 +33,7 @@
|
|
|
32
33
|
"../../../../../../../../front_end/models/trace/lantern/core/core.ts",
|
|
33
34
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
35
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
36
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"references": [
|
|
39
39
|
{
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../front_end/models/trace/lantern",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -32,8 +33,7 @@
|
|
|
32
33
|
"../../../../../../../front_end/models/trace/lantern/lantern.ts",
|
|
33
34
|
"../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
35
|
"../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
|
-
"../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
|
-
"../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
36
|
+
"../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"references": [
|
|
39
39
|
{
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/graph",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -32,8 +33,7 @@
|
|
|
32
33
|
"../../../../../../../../front_end/models/trace/lantern/graph/graph.ts",
|
|
33
34
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
35
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
36
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"references": [
|
|
39
39
|
{
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/graph",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -35,8 +36,7 @@
|
|
|
35
36
|
"../../../../../../../../front_end/models/trace/lantern/graph/PageDependencyGraph.ts",
|
|
36
37
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
37
38
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
38
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
39
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
39
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
40
40
|
],
|
|
41
41
|
"references": [
|
|
42
42
|
{
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../front_end/models/trace/lantern",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -31,8 +32,7 @@
|
|
|
31
32
|
"files": [
|
|
32
33
|
"../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
33
34
|
"../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
34
|
-
"../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
35
|
-
"../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
35
|
+
"../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
36
|
],
|
|
37
37
|
"references": [
|
|
38
38
|
{
|
|
@@ -35,10 +35,10 @@ declare class Metric {
|
|
|
35
35
|
* from the simulator. In this case, we need to adjust the coefficients as the target throttling
|
|
36
36
|
* settings change.
|
|
37
37
|
*/
|
|
38
|
-
static getScaledCoefficients(
|
|
39
|
-
static getOptimisticGraph(
|
|
40
|
-
static getPessimisticGraph(
|
|
41
|
-
static getEstimateFromSimulation(simulationResult: Simulation.Result,
|
|
38
|
+
static getScaledCoefficients(_rttMs: number): MetricCoefficients;
|
|
39
|
+
static getOptimisticGraph(_dependencyGraph: Graph.Node, _processedNavigation: Types.Simulation.ProcessedNavigation): Graph.Node;
|
|
40
|
+
static getPessimisticGraph(_dependencyGraph: Graph.Node, _processedNavigation: Types.Simulation.ProcessedNavigation): Graph.Node;
|
|
41
|
+
static getEstimateFromSimulation(simulationResult: Simulation.Result, _extras: Extras): Simulation.Result;
|
|
42
42
|
static compute(data: MetricComputationDataInput, extras?: Omit<Extras, 'optimistic'>): MetricResult;
|
|
43
43
|
}
|
|
44
44
|
export { Metric };
|
|
@@ -22,26 +22,24 @@ class Metric {
|
|
|
22
22
|
static get coefficients() {
|
|
23
23
|
throw new Core.LanternError('coefficients unimplemented!');
|
|
24
24
|
}
|
|
25
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
26
25
|
/**
|
|
27
26
|
* Returns the coefficients, scaled by the throttling settings if needed by the metric.
|
|
28
27
|
* Some lantern metrics (speed-index) use components in their estimate that are not
|
|
29
28
|
* from the simulator. In this case, we need to adjust the coefficients as the target throttling
|
|
30
29
|
* settings change.
|
|
31
30
|
*/
|
|
32
|
-
static getScaledCoefficients(
|
|
31
|
+
static getScaledCoefficients(_rttMs) {
|
|
33
32
|
return this.coefficients;
|
|
34
33
|
}
|
|
35
|
-
static getOptimisticGraph(
|
|
34
|
+
static getOptimisticGraph(_dependencyGraph, _processedNavigation) {
|
|
36
35
|
throw new Core.LanternError('Optimistic graph unimplemented!');
|
|
37
36
|
}
|
|
38
|
-
static getPessimisticGraph(
|
|
37
|
+
static getPessimisticGraph(_dependencyGraph, _processedNavigation) {
|
|
39
38
|
throw new Core.LanternError('Pessmistic graph unimplemented!');
|
|
40
39
|
}
|
|
41
|
-
static getEstimateFromSimulation(simulationResult,
|
|
40
|
+
static getEstimateFromSimulation(simulationResult, _extras) {
|
|
42
41
|
return simulationResult;
|
|
43
42
|
}
|
|
44
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
45
43
|
static compute(data, extras) {
|
|
46
44
|
const { simulator, graph, processedNavigation } = data;
|
|
47
45
|
const metricName = this.name.replace('Lantern', '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Metric.js","sourceRoot":"","sources":["../../../../../../../../front_end/models/trace/lantern/metrics/Metric.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAiC3C,MAAM,MAAM;IACV,MAAM,CAAC,aAAa,CAAC,eAA2B,EAAE,yBAAgE;QAEhH,MAAM,UAAU,GAAG,IAAI,GAAG,EAAU,CAAC;QAErC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBAC/C,OAAO;YACT,CAAC;YACD,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,QAAQ,EAAE,CAAC;gBAC3C,OAAO;YACT,CAAC;YACD,IAAI,yBAAyB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;gBACtC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACnC,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,MAAM,KAAK,YAAY;QACrB,MAAM,IAAI,IAAI,CAAC,YAAY,CAAC,6BAA6B,CAAC,CAAC;IAC7D,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"Metric.js","sourceRoot":"","sources":["../../../../../../../../front_end/models/trace/lantern/metrics/Metric.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAiC3C,MAAM,MAAM;IACV,MAAM,CAAC,aAAa,CAAC,eAA2B,EAAE,yBAAgE;QAEhH,MAAM,UAAU,GAAG,IAAI,GAAG,EAAU,CAAC;QAErC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBAC/C,OAAO;YACT,CAAC;YACD,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,QAAQ,EAAE,CAAC;gBAC3C,OAAO;YACT,CAAC;YACD,IAAI,yBAAyB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;gBACtC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACnC,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,MAAM,KAAK,YAAY;QACrB,MAAM,IAAI,IAAI,CAAC,YAAY,CAAC,6BAA6B,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,qBAAqB,CAAC,MAAc;QACzC,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,kBAAkB,CAAC,gBAA4B,EAAE,oBAA0D;QAEhH,MAAM,IAAI,IAAI,CAAC,YAAY,CAAC,iCAAiC,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,CAAC,mBAAmB,CAAC,gBAA4B,EAAE,oBAA0D;QAEjH,MAAM,IAAI,IAAI,CAAC,YAAY,CAAC,iCAAiC,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,CAAC,yBAAyB,CAAC,gBAAmC,EAAE,OAAe;QACnF,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,IAAgC,EAAE,MAAmC;QAClF,MAAM,EAAC,SAAS,EAAE,KAAK,EAAE,mBAAmB,EAAC,GAAG,IAAI,CAAC;QAErD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QACpD,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;QAC5E,MAAM,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;QAE9E,IAAI,eAAe,GAAG,EAAC,KAAK,EAAE,aAAa,UAAU,EAAE,EAAC,CAAC;QACzD,MAAM,oBAAoB,GAAG,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;QAElF,eAAe,GAAG,EAAC,KAAK,EAAE,cAAc,UAAU,EAAE,EAAC,CAAC;QACtD,MAAM,qBAAqB,GAAG,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;QAEpF,MAAM,kBAAkB,GAAG,IAAI,CAAC,yBAAyB,CACrD,oBAAoB,EACpB,EAAC,GAAG,MAAM,EAAE,UAAU,EAAE,IAAI,EAAC,CAChC,CAAC;QAEF,MAAM,mBAAmB,GAAG,IAAI,CAAC,yBAAyB,CACtD,qBAAqB,EACrB,EAAC,GAAG,MAAM,EAAE,UAAU,EAAE,KAAK,EAAC,CACjC,CAAC;QAEF,MAAM,YAAY,GAAG,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAC/D,oGAAoG;QACpG,MAAM,mBAAmB,GAAG,YAAY,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7G,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,GAAG,mBAAmB;YACvD,YAAY,CAAC,UAAU,GAAG,kBAAkB,CAAC,QAAQ,GAAG,YAAY,CAAC,WAAW,GAAG,mBAAmB,CAAC,QAAQ,CAAC;QAEpH,OAAO;YACL,MAAM;YACN,kBAAkB;YAClB,mBAAmB;YACnB,eAAe;YACf,gBAAgB;SACjB,CAAC;IACJ,CAAC;CACF;AAED,OAAO,EAAC,MAAM,EAAC,CAAC","sourcesContent":["// Copyright 2024 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Core from '../core/core.js';\nimport * as Graph from '../graph/graph.js';\nimport type * as Simulation from '../simulation/simulation.js';\nimport type * as Types from '../types/types.js';\n\nexport interface MetricComputationDataInput {\n simulator: Simulation.Simulator;\n graph: Graph.Node<unknown>;\n processedNavigation: Types.Simulation.ProcessedNavigation;\n}\n\nexport interface MetricCoefficients {\n intercept: number;\n optimistic: number;\n pessimistic: number;\n}\n\nexport interface MetricResult<T = Types.AnyNetworkObject> {\n timing: number;\n timestamp?: never;\n optimisticEstimate: Simulation.Result<T>;\n pessimisticEstimate: Simulation.Result<T>;\n optimisticGraph: Graph.Node<T>;\n pessimisticGraph: Graph.Node;\n}\n\nexport interface Extras {\n optimistic: boolean;\n fcpResult?: MetricResult;\n lcpResult?: MetricResult;\n interactiveResult?: MetricResult;\n observedSpeedIndex?: number;\n}\n\nclass Metric {\n static getScriptUrls(dependencyGraph: Graph.Node, treatNodeAsRenderBlocking?: (node: Graph.NetworkNode) => boolean):\n Set<string> {\n const scriptUrls = new Set<string>();\n\n dependencyGraph.traverse(node => {\n if (node.type !== Graph.BaseNode.types.NETWORK) {\n return;\n }\n if (node.request.resourceType !== 'Script') {\n return;\n }\n if (treatNodeAsRenderBlocking?.(node)) {\n scriptUrls.add(node.request.url);\n }\n });\n\n return scriptUrls;\n }\n\n static get coefficients(): MetricCoefficients {\n throw new Core.LanternError('coefficients unimplemented!');\n }\n\n /**\n * Returns the coefficients, scaled by the throttling settings if needed by the metric.\n * Some lantern metrics (speed-index) use components in their estimate that are not\n * from the simulator. In this case, we need to adjust the coefficients as the target throttling\n * settings change.\n */\n static getScaledCoefficients(_rttMs: number): MetricCoefficients {\n return this.coefficients;\n }\n\n static getOptimisticGraph(_dependencyGraph: Graph.Node, _processedNavigation: Types.Simulation.ProcessedNavigation):\n Graph.Node {\n throw new Core.LanternError('Optimistic graph unimplemented!');\n }\n\n static getPessimisticGraph(_dependencyGraph: Graph.Node, _processedNavigation: Types.Simulation.ProcessedNavigation):\n Graph.Node {\n throw new Core.LanternError('Pessmistic graph unimplemented!');\n }\n\n static getEstimateFromSimulation(simulationResult: Simulation.Result, _extras: Extras): Simulation.Result {\n return simulationResult;\n }\n\n static compute(data: MetricComputationDataInput, extras?: Omit<Extras, 'optimistic'>): MetricResult {\n const {simulator, graph, processedNavigation} = data;\n\n const metricName = this.name.replace('Lantern', '');\n const optimisticGraph = this.getOptimisticGraph(graph, processedNavigation);\n const pessimisticGraph = this.getPessimisticGraph(graph, processedNavigation);\n\n let simulateOptions = {label: `optimistic${metricName}`};\n const optimisticSimulation = simulator.simulate(optimisticGraph, simulateOptions);\n\n simulateOptions = {label: `pessimistic${metricName}`};\n const pessimisticSimulation = simulator.simulate(pessimisticGraph, simulateOptions);\n\n const optimisticEstimate = this.getEstimateFromSimulation(\n optimisticSimulation,\n {...extras, optimistic: true},\n );\n\n const pessimisticEstimate = this.getEstimateFromSimulation(\n pessimisticSimulation,\n {...extras, optimistic: false},\n );\n\n const coefficients = this.getScaledCoefficients(simulator.rtt);\n // Estimates under 1s don't really follow the normal curve fit, minimize the impact of the intercept\n const interceptMultiplier = coefficients.intercept > 0 ? Math.min(1, optimisticEstimate.timeInMs / 1000) : 1;\n const timing = coefficients.intercept * interceptMultiplier +\n coefficients.optimistic * optimisticEstimate.timeInMs + coefficients.pessimistic * pessimisticEstimate.timeInMs;\n\n return {\n timing,\n optimisticEstimate,\n pessimisticEstimate,\n optimisticGraph,\n pessimisticGraph,\n };\n }\n}\n\nexport {Metric};\n"]}
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/metrics",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -32,8 +33,7 @@
|
|
|
32
33
|
"../../../../../../../../front_end/models/trace/lantern/metrics/metrics.ts",
|
|
33
34
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
35
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
36
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"references": [
|
|
39
39
|
{
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/metrics",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -39,8 +40,7 @@
|
|
|
39
40
|
"../../../../../../../../front_end/models/trace/lantern/metrics/TotalBlockingTime.ts",
|
|
40
41
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
41
42
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
42
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
43
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
43
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
44
44
|
],
|
|
45
45
|
"references": [
|
|
46
46
|
{
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/simulation",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -32,8 +33,7 @@
|
|
|
32
33
|
"../../../../../../../../front_end/models/trace/lantern/simulation/simulation.ts",
|
|
33
34
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
35
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
36
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"references": [
|
|
39
39
|
{
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/simulation",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -37,8 +38,7 @@
|
|
|
37
38
|
"../../../../../../../../front_end/models/trace/lantern/simulation/TCPConnection.ts",
|
|
38
39
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
39
40
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
40
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
41
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
41
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
42
42
|
],
|
|
43
43
|
"references": [
|
|
44
44
|
{
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/types",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -32,8 +33,7 @@
|
|
|
32
33
|
"../../../../../../../../front_end/models/trace/lantern/types/types.ts",
|
|
33
34
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
35
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
36
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"references": [
|
|
39
39
|
{
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/types",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -32,8 +33,7 @@
|
|
|
32
33
|
"../../../../../../../../front_end/models/trace/lantern/types/Lantern.ts",
|
|
33
34
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
35
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
36
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"references": [
|
|
39
39
|
{
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
|
-
"noUnusedLocals":
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../front_end/models/trace",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -35,8 +36,7 @@
|
|
|
35
36
|
"../../../../../../front_end/models/trace/TracingManager.ts",
|
|
36
37
|
"../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
37
38
|
"../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
38
|
-
"../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
39
|
-
"../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
39
|
+
"../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
40
40
|
],
|
|
41
41
|
"references": [
|
|
42
42
|
{
|
|
@@ -65,4 +65,6 @@ export interface ResolveSourceMapParams {
|
|
|
65
65
|
scriptUrl: Platform.DevToolsPath.UrlString;
|
|
66
66
|
sourceMapUrl: Platform.DevToolsPath.UrlString;
|
|
67
67
|
frame: Protocol.Page.FrameId;
|
|
68
|
+
/** Set only if the raw source map was found on the provided metadata. Never set for source maps from data urls. */
|
|
69
|
+
cachedRawSourceMap?: any;
|
|
68
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Configuration.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAwC7B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAkB,EAAE,CAAC,CAAC;IAC5C,uBAAuB,EAAE,KAAK;IAC9B,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,KAAK;IAChB,6BAA6B,EAAE,EAAE;CAClC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAqB;IACpD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Platform from '../../../core/platform/platform.js';\nimport type * as SDK from '../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport type * as Lantern from '../lantern/lantern.js';\n\nimport type * as File from './File.js';\n\nexport interface Configuration {\n /**\n * Include V8 RCS functions in the JS stacks\n */\n includeRuntimeCallStats: boolean;\n /**\n * Show all events: disable the default filtering which hides and excludes some events.\n */\n showAllEvents: boolean;\n /**\n * Extra detail for RPP developers (eg Trace Event json in Summary, and individual JS Sample events)\n */\n debugMode: boolean;\n /**\n * How many invalidation events will be stored for a layout (or similar) event.\n * On large sites with a lot of DOM there can be thousands of invalidations\n * associated with any given event. It is not useful to show the user 1000s of\n * invalidations in the UI, but it is also expensive for us to hold onto them\n * all, and it helps prevents OOM issues when running in NodeJS\n * [https://github.com/GoogleChrome/lighthouse/issues/16111].\n * Therefore, instead, we store only the latest 20 per event. We do also store\n * the total count, so we can show that, but we'll only ever hold on to the\n * last 20 invalidations (in DESC trace order - so the latest 20 in the trace file)\n *\n * If you set this to 0, we will skip the Invalidations processing entirely.\n * 0 effectively disables the InvalidationsHandler and it will not even\n * attempt to gather or track invalidations.\n */\n maxInvalidationEventsPerEvent: number;\n}\n\nexport const defaults = (): Configuration => ({\n includeRuntimeCallStats: false,\n showAllEvents: false,\n debugMode: false,\n maxInvalidationEventsPerEvent: 20,\n});\n\n/**\n * Generates a key that can be used to represent this config in a cache. This is\n * used mainly in tests, where we want to avoid re-parsing a file if we have\n * already processed it with the same configuration.\n */\nexport function configToCacheKey(config: Configuration): string {\n return JSON.stringify(config);\n}\n\nexport interface ParseOptions {\n /**\n * If the trace was just recorded on the current page, rather than an imported file.\n * TODO(paulirish): Maybe remove. This is currently unused by the Processor and Handlers\n * @default false\n */\n isFreshRecording?: boolean;\n /**\n * If the trace is a CPU Profile rather than a Chrome tracing trace.\n * @default false\n */\n isCPUProfile?: boolean;\n metadata?: File.MetaData;\n resolveSourceMap?: (params: ResolveSourceMapParams) => Promise<SDK.SourceMap.SourceMap|null>;\n logger?: {\n start: (id: string) => void,\n end: (id: string) => void,\n };\n lanternSettings?: Omit<Lantern.Types.Simulation.Settings, 'networkAnalysis'>;\n}\n\nexport interface ResolveSourceMapParams {\n scriptId: string;\n scriptUrl: Platform.DevToolsPath.UrlString;\n sourceMapUrl: Platform.DevToolsPath.UrlString;\n frame: Protocol.Page.FrameId;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Configuration.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAwC7B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAkB,EAAE,CAAC,CAAC;IAC5C,uBAAuB,EAAE,KAAK;IAC9B,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,KAAK;IAChB,6BAA6B,EAAE,EAAE;CAClC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAqB;IACpD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Platform from '../../../core/platform/platform.js';\nimport type * as SDK from '../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport type * as Lantern from '../lantern/lantern.js';\n\nimport type * as File from './File.js';\n\nexport interface Configuration {\n /**\n * Include V8 RCS functions in the JS stacks\n */\n includeRuntimeCallStats: boolean;\n /**\n * Show all events: disable the default filtering which hides and excludes some events.\n */\n showAllEvents: boolean;\n /**\n * Extra detail for RPP developers (eg Trace Event json in Summary, and individual JS Sample events)\n */\n debugMode: boolean;\n /**\n * How many invalidation events will be stored for a layout (or similar) event.\n * On large sites with a lot of DOM there can be thousands of invalidations\n * associated with any given event. It is not useful to show the user 1000s of\n * invalidations in the UI, but it is also expensive for us to hold onto them\n * all, and it helps prevents OOM issues when running in NodeJS\n * [https://github.com/GoogleChrome/lighthouse/issues/16111].\n * Therefore, instead, we store only the latest 20 per event. We do also store\n * the total count, so we can show that, but we'll only ever hold on to the\n * last 20 invalidations (in DESC trace order - so the latest 20 in the trace file)\n *\n * If you set this to 0, we will skip the Invalidations processing entirely.\n * 0 effectively disables the InvalidationsHandler and it will not even\n * attempt to gather or track invalidations.\n */\n maxInvalidationEventsPerEvent: number;\n}\n\nexport const defaults = (): Configuration => ({\n includeRuntimeCallStats: false,\n showAllEvents: false,\n debugMode: false,\n maxInvalidationEventsPerEvent: 20,\n});\n\n/**\n * Generates a key that can be used to represent this config in a cache. This is\n * used mainly in tests, where we want to avoid re-parsing a file if we have\n * already processed it with the same configuration.\n */\nexport function configToCacheKey(config: Configuration): string {\n return JSON.stringify(config);\n}\n\nexport interface ParseOptions {\n /**\n * If the trace was just recorded on the current page, rather than an imported file.\n * TODO(paulirish): Maybe remove. This is currently unused by the Processor and Handlers\n * @default false\n */\n isFreshRecording?: boolean;\n /**\n * If the trace is a CPU Profile rather than a Chrome tracing trace.\n * @default false\n */\n isCPUProfile?: boolean;\n metadata?: File.MetaData;\n resolveSourceMap?: (params: ResolveSourceMapParams) => Promise<SDK.SourceMap.SourceMap|null>;\n logger?: {\n start: (id: string) => void,\n end: (id: string) => void,\n };\n lanternSettings?: Omit<Lantern.Types.Simulation.Settings, 'networkAnalysis'>;\n}\n\nexport interface ResolveSourceMapParams {\n scriptId: string;\n scriptUrl: Platform.DevToolsPath.UrlString;\n sourceMapUrl: Platform.DevToolsPath.UrlString;\n frame: Protocol.Page.FrameId;\n /** Set only if the raw source map was found on the provided metadata. Never set for source maps from data urls. */\n cachedRawSourceMap?: SDK.SourceMap.SourceMapV3;\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as Platform from '../../../core/platform/platform.js';
|
|
1
2
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
2
3
|
import type { Micro, Milli, Seconds, TraceWindowMicro } from './Timing.js';
|
|
3
4
|
export declare const enum Phase {
|
|
@@ -312,7 +313,6 @@ export interface SyntheticNetworkRequest extends Complete, SyntheticBased<Phase.
|
|
|
312
313
|
initiator?: Initiator;
|
|
313
314
|
requestMethod?: string;
|
|
314
315
|
timing?: ResourceReceiveResponseTimingData;
|
|
315
|
-
syntheticServerTimings?: SyntheticServerTiming[];
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
318
|
cat: 'loading';
|
|
@@ -1131,7 +1131,7 @@ export interface ConsoleTimeEnd extends PairableAsyncEnd {
|
|
|
1131
1131
|
export type ConsoleTime = ConsoleTimeBegin | ConsoleTimeEnd;
|
|
1132
1132
|
export interface ConsoleTimeStamp extends Event {
|
|
1133
1133
|
cat: 'devtools.timeline';
|
|
1134
|
-
name: Name.
|
|
1134
|
+
name: Name.TIME_STAMP;
|
|
1135
1135
|
ph: Phase.INSTANT;
|
|
1136
1136
|
args: Args & {
|
|
1137
1137
|
data?: ArgsData & {
|
|
@@ -1237,14 +1237,18 @@ declare const enum FrameType {
|
|
|
1237
1237
|
FORKED = "FORKED",
|
|
1238
1238
|
BACKFILL = "BACKFILL"
|
|
1239
1239
|
}
|
|
1240
|
+
export interface OldChromeFrameReporterArgs {
|
|
1241
|
+
chrome_frame_reporter: ChromeFrameReporter;
|
|
1242
|
+
}
|
|
1243
|
+
export interface NewChromeFrameReporterArgs {
|
|
1244
|
+
frame_reporter: ChromeFrameReporter;
|
|
1245
|
+
}
|
|
1240
1246
|
export interface PipelineReporter extends Event {
|
|
1241
1247
|
id2?: {
|
|
1242
1248
|
local?: string;
|
|
1243
1249
|
};
|
|
1244
1250
|
ph: Phase.ASYNC_NESTABLE_START | Phase.ASYNC_NESTABLE_END;
|
|
1245
|
-
args: Args &
|
|
1246
|
-
chrome_frame_reporter: ChromeFrameReporter;
|
|
1247
|
-
};
|
|
1251
|
+
args: Args & (OldChromeFrameReporterArgs | NewChromeFrameReporterArgs);
|
|
1248
1252
|
}
|
|
1249
1253
|
export declare function isPipelineReporter(event: Event): event is PipelineReporter;
|
|
1250
1254
|
export interface SyntheticBased<Ph extends Phase = Phase, T extends Event = Event> extends Event {
|
|
@@ -1305,25 +1309,6 @@ export interface SyntheticProfileCall extends Event {
|
|
|
1305
1309
|
sampleIndex: number;
|
|
1306
1310
|
profileId: ProfileID;
|
|
1307
1311
|
}
|
|
1308
|
-
/**
|
|
1309
|
-
* A synthetic event created from the Server-Timing header of network
|
|
1310
|
-
* request. In order to create these synthetic events, the corresponding
|
|
1311
|
-
* metric (timing) in the header must contain a "start" param, which
|
|
1312
|
-
* corresponds to the timestamp of the metric in the server. The
|
|
1313
|
-
* ServerTimingsHandler implements a heuristic to estimate the offset
|
|
1314
|
-
* between the client clock and the server clock so that the server
|
|
1315
|
-
* timestamp can be translated to the tracing clock.
|
|
1316
|
-
*/
|
|
1317
|
-
export interface SyntheticServerTiming<T extends Phase = Phase.COMPLETE> extends SyntheticBased<T> {
|
|
1318
|
-
rawSourceEvent: ResourceSendRequest;
|
|
1319
|
-
cat: 'devtools.server-timing';
|
|
1320
|
-
args: Args & {
|
|
1321
|
-
data: ArgsData & {
|
|
1322
|
-
desc?: string;
|
|
1323
|
-
origin: string;
|
|
1324
|
-
};
|
|
1325
|
-
};
|
|
1326
|
-
}
|
|
1327
1312
|
/**
|
|
1328
1313
|
* A JS Sample reflects a single sample from the V8 CPU Profile
|
|
1329
1314
|
*/
|
|
@@ -1531,35 +1516,17 @@ export interface DebuggerAsyncTaskRun extends Event {
|
|
|
1531
1516
|
name: Name.DEBUGGER_ASYNC_TASK_RUN;
|
|
1532
1517
|
}
|
|
1533
1518
|
export declare function isDebuggerAsyncTaskRun(event: Event): event is DebuggerAsyncTaskRun;
|
|
1534
|
-
|
|
1535
|
-
#private;
|
|
1536
|
-
}
|
|
1537
|
-
export type ProfileID = string & ProfileIdTag;
|
|
1519
|
+
export type ProfileID = Platform.Brand.Brand<string, 'profileIdTag'>;
|
|
1538
1520
|
export declare function ProfileID(value: string): ProfileID;
|
|
1539
|
-
|
|
1540
|
-
#private;
|
|
1541
|
-
}
|
|
1542
|
-
export type CallFrameID = number & CallFrameIdTag;
|
|
1521
|
+
export type CallFrameID = Platform.Brand.Brand<number, 'callFrameIdTag'>;
|
|
1543
1522
|
export declare function CallFrameID(value: number): CallFrameID;
|
|
1544
|
-
|
|
1545
|
-
#private;
|
|
1546
|
-
}
|
|
1547
|
-
export type SampleIndex = number & SampleIndexTag;
|
|
1523
|
+
export type SampleIndex = Platform.Brand.Brand<number, 'sampleIndexTag'>;
|
|
1548
1524
|
export declare function SampleIndex(value: number): SampleIndex;
|
|
1549
|
-
|
|
1550
|
-
#private;
|
|
1551
|
-
}
|
|
1552
|
-
export type ProcessID = number & ProcessIdTag;
|
|
1525
|
+
export type ProcessID = Platform.Brand.Brand<number, 'processIdTag'>;
|
|
1553
1526
|
export declare function ProcessID(value: number): ProcessID;
|
|
1554
|
-
|
|
1555
|
-
#private;
|
|
1556
|
-
}
|
|
1557
|
-
export type ThreadID = number & ThreadIdTag;
|
|
1527
|
+
export type ThreadID = Platform.Brand.Brand<number, 'threadIdTag'>;
|
|
1558
1528
|
export declare function ThreadID(value: number): ThreadID;
|
|
1559
|
-
|
|
1560
|
-
#private;
|
|
1561
|
-
}
|
|
1562
|
-
export type WorkerId = string & WorkerIdTag;
|
|
1529
|
+
export type WorkerId = Platform.Brand.Brand<string, 'workerIdTag'>;
|
|
1563
1530
|
export declare function WorkerId(value: string): WorkerId;
|
|
1564
1531
|
export declare function isComplete(event: Event): event is Complete;
|
|
1565
1532
|
export declare function isBegin(event: Event): event is Begin;
|
|
@@ -1648,6 +1615,7 @@ export interface Paint extends Complete {
|
|
|
1648
1615
|
frame: string;
|
|
1649
1616
|
layerId: number;
|
|
1650
1617
|
nodeId?: Protocol.DOM.BackendNodeId;
|
|
1618
|
+
nodeName?: string;
|
|
1651
1619
|
};
|
|
1652
1620
|
};
|
|
1653
1621
|
}
|
|
@@ -1668,6 +1636,7 @@ export interface PaintImage extends Complete {
|
|
|
1668
1636
|
srcHeight: number;
|
|
1669
1637
|
srcWidth: number;
|
|
1670
1638
|
nodeId?: Protocol.DOM.BackendNodeId;
|
|
1639
|
+
nodeName?: string;
|
|
1671
1640
|
frame?: string;
|
|
1672
1641
|
};
|
|
1673
1642
|
};
|
|
@@ -1950,7 +1919,6 @@ export interface FunctionCall extends Complete {
|
|
|
1950
1919
|
};
|
|
1951
1920
|
}
|
|
1952
1921
|
export declare function isFunctionCall(event: Event): event is FunctionCall;
|
|
1953
|
-
export declare function isSyntheticServerTiming(event: Event): event is SyntheticServerTiming;
|
|
1954
1922
|
export interface SchedulePostTaskCallback extends Instant {
|
|
1955
1923
|
name: Name.SCHEDULE_POST_TASK_CALLBACK;
|
|
1956
1924
|
args: Args & {
|
|
@@ -2135,7 +2103,7 @@ export declare const enum Name {
|
|
|
2135
2103
|
CONSOLE_TIME = "ConsoleTime",
|
|
2136
2104
|
USER_TIMING = "UserTiming",
|
|
2137
2105
|
INTERACTIVE_TIME = "InteractiveTime",
|
|
2138
|
-
|
|
2106
|
+
TIME_STAMP = "TimeStamp",
|
|
2139
2107
|
BEGIN_FRAME = "BeginFrame",
|
|
2140
2108
|
NEEDS_BEGIN_FRAME_CHANGED = "NeedsBeginFrameChanged",
|
|
2141
2109
|
BEGIN_MAIN_THREAD_FRAME = "BeginMainThreadFrame",
|
|
@@ -2257,10 +2225,6 @@ export interface V8SourceRundownEvent extends Event {
|
|
|
2257
2225
|
isolate: string;
|
|
2258
2226
|
executionContextId: Protocol.Runtime.ExecutionContextId;
|
|
2259
2227
|
scriptId: number;
|
|
2260
|
-
startLine: number;
|
|
2261
|
-
startColumn: number;
|
|
2262
|
-
endLine: number;
|
|
2263
|
-
endColumn: number;
|
|
2264
2228
|
hash: string;
|
|
2265
2229
|
isModule: boolean;
|
|
2266
2230
|
hasSourceUrl: boolean;
|
|
@@ -2298,4 +2262,16 @@ export interface V8SourceRundownSourcesLargeScriptCatchupEvent extends Event {
|
|
|
2298
2262
|
};
|
|
2299
2263
|
}
|
|
2300
2264
|
export declare function isV8SourceRundownSourcesLargeScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesLargeScriptCatchupEvent;
|
|
2265
|
+
export interface V8SourceRundownSourcesStubScriptCatchupEvent extends Event {
|
|
2266
|
+
cat: 'disabled-by-default-devtools.v8-source-rundown-sources';
|
|
2267
|
+
name: 'StubScriptCatchup';
|
|
2268
|
+
args: Args & {
|
|
2269
|
+
data: {
|
|
2270
|
+
isolate: string;
|
|
2271
|
+
scriptId: number;
|
|
2272
|
+
};
|
|
2273
|
+
};
|
|
2274
|
+
}
|
|
2275
|
+
export declare function isV8SourceRundownSourcesStubScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesStubScriptCatchupEvent;
|
|
2276
|
+
export declare function isAnyScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesScriptCatchupEvent | V8SourceRundownSourcesLargeScriptCatchupEvent | V8SourceRundownSourcesStubScriptCatchupEvent;
|
|
2301
2277
|
export {};
|