devtools-tracing 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +14 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +28854 -0
- package/package.json +10 -8
- package/generate.ts +0 -649
- package/index.ts +0 -17
- package/lib/extension-api/ExtensionAPI.d.ts +0 -357
- package/lib/front_end/core/common/App.ts +0 -7
- package/lib/front_end/core/common/AppProvider.ts +0 -32
- package/lib/front_end/core/common/Base64.ts +0 -47
- package/lib/front_end/core/common/CharacterIdMap.ts +0 -30
- package/lib/front_end/core/common/Color.ts +0 -2506
- package/lib/front_end/core/common/ColorConverter.ts +0 -402
- package/lib/front_end/core/common/ColorUtils.ts +0 -252
- package/lib/front_end/core/common/Console.ts +0 -114
- package/lib/front_end/core/common/Debouncer.ts +0 -15
- package/lib/front_end/core/common/EventTarget.ts +0 -52
- package/lib/front_end/core/common/Gzip.ts +0 -74
- package/lib/front_end/core/common/JavaScriptMetaData.ts +0 -29
- package/lib/front_end/core/common/Lazy.ts +0 -31
- package/lib/front_end/core/common/Linkifier.ts +0 -55
- package/lib/front_end/core/common/MapWithDefault.ts +0 -26
- package/lib/front_end/core/common/Mutex.ts +0 -55
- package/lib/front_end/core/common/Object.ts +0 -145
- package/lib/front_end/core/common/ParsedURL.ts +0 -554
- package/lib/front_end/core/common/Progress.ts +0 -180
- package/lib/front_end/core/common/QueryParamHandler.ts +0 -7
- package/lib/front_end/core/common/ResolverBase.ts +0 -85
- package/lib/front_end/core/common/ResourceType.ts +0 -588
- package/lib/front_end/core/common/ReturnToPanel.ts +0 -17
- package/lib/front_end/core/common/Revealer.ts +0 -192
- package/lib/front_end/core/common/Runnable.ts +0 -41
- package/lib/front_end/core/common/SegmentedRange.ts +0 -87
- package/lib/front_end/core/common/SettingRegistration.ts +0 -339
- package/lib/front_end/core/common/Settings.ts +0 -1497
- package/lib/front_end/core/common/SimpleHistoryManager.ts +0 -124
- package/lib/front_end/core/common/StringOutputStream.ts +0 -26
- package/lib/front_end/core/common/TextDictionary.ts +0 -48
- package/lib/front_end/core/common/Throttler.ts +0 -99
- package/lib/front_end/core/common/Trie.ts +0 -152
- package/lib/front_end/core/common/Worker.ts +0 -60
- package/lib/front_end/core/common/common.ts +0 -81
- package/lib/front_end/core/host/AidaClient.ts +0 -733
- package/lib/front_end/core/host/GdpClient.ts +0 -316
- package/lib/front_end/core/host/InspectorFrontendHost.ts +0 -648
- package/lib/front_end/core/host/InspectorFrontendHostAPI.ts +0 -551
- package/lib/front_end/core/host/Platform.ts +0 -76
- package/lib/front_end/core/host/ResourceLoader.ts +0 -282
- package/lib/front_end/core/host/UserMetrics.ts +0 -1230
- package/lib/front_end/core/host/host.ts +0 -23
- package/lib/front_end/core/i18n/ByteUtilities.ts +0 -82
- package/lib/front_end/core/i18n/DevToolsLocale.ts +0 -87
- package/lib/front_end/core/i18n/NumberFormatter.ts +0 -82
- package/lib/front_end/core/i18n/i18n.ts +0 -17
- package/lib/front_end/core/i18n/i18nImpl.ts +0 -204
- package/lib/front_end/core/i18n/i18nTypes.ts +0 -10
- package/lib/front_end/core/i18n/locales.js +0 -14
- package/lib/front_end/core/i18n/time-utilities.ts +0 -174
- package/lib/front_end/core/platform/ArrayUtilities.ts +0 -271
- package/lib/front_end/core/platform/Brand.ts +0 -23
- package/lib/front_end/core/platform/Constructor.ts +0 -10
- package/lib/front_end/core/platform/DOMUtilities.ts +0 -138
- package/lib/front_end/core/platform/DateUtilities.ts +0 -15
- package/lib/front_end/core/platform/DevToolsPath.ts +0 -53
- package/lib/front_end/core/platform/KeyboardUtilities.ts +0 -38
- package/lib/front_end/core/platform/MapUtilities.ts +0 -95
- package/lib/front_end/core/platform/MimeType.ts +0 -175
- package/lib/front_end/core/platform/NumberUtilities.ts +0 -80
- package/lib/front_end/core/platform/StringUtilities.ts +0 -588
- package/lib/front_end/core/platform/Timing.ts +0 -17
- package/lib/front_end/core/platform/TypedArrayUtilities.ts +0 -189
- package/lib/front_end/core/platform/TypescriptUtilities.ts +0 -86
- package/lib/front_end/core/platform/UIString.ts +0 -39
- package/lib/front_end/core/platform/UserVisibleError.ts +0 -28
- package/lib/front_end/core/platform/platform.ts +0 -45
- package/lib/front_end/core/protocol_client/ConnectionTransport.ts +0 -26
- package/lib/front_end/core/protocol_client/InspectorBackend.ts +0 -1050
- package/lib/front_end/core/protocol_client/NodeURL.ts +0 -42
- package/lib/front_end/core/protocol_client/protocol_client.ts +0 -13
- package/lib/front_end/core/root/Runtime.ts +0 -609
- package/lib/front_end/core/root/root.ts +0 -6
- package/lib/front_end/core/sdk/AccessibilityModel.ts +0 -353
- package/lib/front_end/core/sdk/AnimationModel.ts +0 -1041
- package/lib/front_end/core/sdk/AutofillModel.ts +0 -184
- package/lib/front_end/core/sdk/CPUProfilerModel.ts +0 -148
- package/lib/front_end/core/sdk/CPUThrottlingManager.ts +0 -282
- package/lib/front_end/core/sdk/CSSContainerQuery.ts +0 -139
- package/lib/front_end/core/sdk/CSSFontFace.ts +0 -40
- package/lib/front_end/core/sdk/CSSLayer.ts +0 -30
- package/lib/front_end/core/sdk/CSSMatchedStyles.ts +0 -1646
- package/lib/front_end/core/sdk/CSSMedia.ts +0 -121
- package/lib/front_end/core/sdk/CSSMetadata.ts +0 -1647
- package/lib/front_end/core/sdk/CSSModel.ts +0 -1128
- package/lib/front_end/core/sdk/CSSProperty.ts +0 -384
- package/lib/front_end/core/sdk/CSSPropertyParser.ts +0 -681
- package/lib/front_end/core/sdk/CSSPropertyParserMatchers.ts +0 -1395
- package/lib/front_end/core/sdk/CSSQuery.ts +0 -72
- package/lib/front_end/core/sdk/CSSRule.ts +0 -465
- package/lib/front_end/core/sdk/CSSScope.ts +0 -30
- package/lib/front_end/core/sdk/CSSStartingStyle.ts +0 -29
- package/lib/front_end/core/sdk/CSSStyleDeclaration.ts +0 -313
- package/lib/front_end/core/sdk/CSSStyleSheetHeader.ts +0 -196
- package/lib/front_end/core/sdk/CSSSupports.ts +0 -33
- package/lib/front_end/core/sdk/CategorizedBreakpoint.ts +0 -64
- package/lib/front_end/core/sdk/ChildTargetManager.ts +0 -314
- package/lib/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +0 -62
- package/lib/front_end/core/sdk/Connections.ts +0 -293
- package/lib/front_end/core/sdk/ConsoleModel.ts +0 -808
- package/lib/front_end/core/sdk/ConsoleModelTypes.ts +0 -15
- package/lib/front_end/core/sdk/Cookie.ts +0 -319
- package/lib/front_end/core/sdk/CookieModel.ts +0 -239
- package/lib/front_end/core/sdk/CookieParser.ts +0 -185
- package/lib/front_end/core/sdk/DOMDebuggerModel.ts +0 -787
- package/lib/front_end/core/sdk/DOMModel.ts +0 -1961
- package/lib/front_end/core/sdk/DebuggerModel.ts +0 -1605
- package/lib/front_end/core/sdk/EmulationModel.ts +0 -648
- package/lib/front_end/core/sdk/EnhancedTracesParser.ts +0 -515
- package/lib/front_end/core/sdk/EventBreakpointsModel.ts +0 -183
- package/lib/front_end/core/sdk/FrameAssociated.ts +0 -11
- package/lib/front_end/core/sdk/FrameManager.ts +0 -259
- package/lib/front_end/core/sdk/HeapProfilerModel.ts +0 -225
- package/lib/front_end/core/sdk/HttpReasonPhraseStrings.ts +0 -77
- package/lib/front_end/core/sdk/IOModel.ts +0 -91
- package/lib/front_end/core/sdk/IsolateManager.ts +0 -257
- package/lib/front_end/core/sdk/IssuesModel.ts +0 -70
- package/lib/front_end/core/sdk/LayerTreeBase.ts +0 -169
- package/lib/front_end/core/sdk/LogModel.ts +0 -56
- package/lib/front_end/core/sdk/NetworkManager.ts +0 -2823
- package/lib/front_end/core/sdk/NetworkRequest.ts +0 -2253
- package/lib/front_end/core/sdk/OverlayColorGenerator.ts +0 -52
- package/lib/front_end/core/sdk/OverlayModel.ts +0 -1011
- package/lib/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -522
- package/lib/front_end/core/sdk/PageLoad.ts +0 -35
- package/lib/front_end/core/sdk/PageResourceLoader.ts +0 -435
- package/lib/front_end/core/sdk/PaintProfiler.ts +0 -110
- package/lib/front_end/core/sdk/PerformanceMetricsModel.ts +0 -84
- package/lib/front_end/core/sdk/PreloadingModel.ts +0 -863
- package/lib/front_end/core/sdk/RehydratingConnection.ts +0 -386
- package/lib/front_end/core/sdk/RehydratingObject.ts +0 -66
- package/lib/front_end/core/sdk/RemoteObject.ts +0 -1160
- package/lib/front_end/core/sdk/Resource.ts +0 -232
- package/lib/front_end/core/sdk/ResourceTreeModel.ts +0 -1160
- package/lib/front_end/core/sdk/RuntimeModel.ts +0 -732
- package/lib/front_end/core/sdk/SDKModel.ts +0 -65
- package/lib/front_end/core/sdk/ScopeTreeCache.ts +0 -45
- package/lib/front_end/core/sdk/ScreenCaptureModel.ts +0 -255
- package/lib/front_end/core/sdk/Script.ts +0 -534
- package/lib/front_end/core/sdk/SecurityOriginManager.ts +0 -76
- package/lib/front_end/core/sdk/ServerSentEvents.ts +0 -80
- package/lib/front_end/core/sdk/ServerSentEventsProtocol.ts +0 -122
- package/lib/front_end/core/sdk/ServerTiming.ts +0 -260
- package/lib/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -377
- package/lib/front_end/core/sdk/ServiceWorkerManager.ts +0 -605
- package/lib/front_end/core/sdk/SourceMap.ts +0 -867
- package/lib/front_end/core/sdk/SourceMapCache.ts +0 -54
- package/lib/front_end/core/sdk/SourceMapFunctionRanges.ts +0 -156
- package/lib/front_end/core/sdk/SourceMapManager.ts +0 -239
- package/lib/front_end/core/sdk/SourceMapScopeChainEntry.ts +0 -189
- package/lib/front_end/core/sdk/SourceMapScopesInfo.ts +0 -508
- package/lib/front_end/core/sdk/StorageBucketsModel.ts +0 -204
- package/lib/front_end/core/sdk/StorageKeyManager.ts +0 -98
- package/lib/front_end/core/sdk/Target.ts +0 -332
- package/lib/front_end/core/sdk/TargetManager.ts +0 -453
- package/lib/front_end/core/sdk/TraceObject.ts +0 -61
- package/lib/front_end/core/sdk/WebAuthnModel.ts +0 -104
- package/lib/front_end/core/sdk/sdk.ts +0 -174
- package/lib/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -59
- package/lib/front_end/generated/InspectorBackendCommands.js +0 -1617
- package/lib/front_end/generated/SupportedCSSProperties.js +0 -7512
- package/lib/front_end/generated/protocol-proxy-api.d.ts +0 -5022
- package/lib/front_end/generated/protocol.ts +0 -22014
- package/lib/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -318
- package/lib/front_end/models/bindings/CompilerScriptMapping.ts +0 -536
- package/lib/front_end/models/bindings/ContentProviderBasedProject.ts +0 -187
- package/lib/front_end/models/bindings/DebuggerLanguagePlugins.ts +0 -1197
- package/lib/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -733
- package/lib/front_end/models/bindings/DefaultScriptMapping.ts +0 -141
- package/lib/front_end/models/bindings/FileUtils.ts +0 -228
- package/lib/front_end/models/bindings/LiveLocation.ts +0 -81
- package/lib/front_end/models/bindings/NetworkProject.ts +0 -157
- package/lib/front_end/models/bindings/PresentationConsoleMessageHelper.ts +0 -312
- package/lib/front_end/models/bindings/ResourceMapping.ts +0 -539
- package/lib/front_end/models/bindings/ResourceScriptMapping.ts +0 -491
- package/lib/front_end/models/bindings/ResourceUtils.ts +0 -103
- package/lib/front_end/models/bindings/SASSSourceMapping.ts +0 -222
- package/lib/front_end/models/bindings/StylesSourceMapping.ts +0 -316
- package/lib/front_end/models/bindings/TempFile.ts +0 -67
- package/lib/front_end/models/bindings/bindings.ts +0 -39
- package/lib/front_end/models/cpu_profile/CPUProfileDataModel.ts +0 -571
- package/lib/front_end/models/cpu_profile/ProfileTreeModel.ts +0 -103
- package/lib/front_end/models/cpu_profile/cpu_profile.ts +0 -11
- package/lib/front_end/models/formatter/FormatterWorkerPool.ts +0 -219
- package/lib/front_end/models/formatter/ScriptFormatter.ts +0 -112
- package/lib/front_end/models/formatter/formatter.ts +0 -8
- package/lib/front_end/models/source_map_scopes/NamesResolver.ts +0 -765
- package/lib/front_end/models/source_map_scopes/ScopeChainModel.ts +0 -84
- package/lib/front_end/models/source_map_scopes/source_map_scopes.ts +0 -11
- package/lib/front_end/models/stack_trace/StackTrace.ts +0 -53
- package/lib/front_end/models/stack_trace/StackTraceImpl.ts +0 -85
- package/lib/front_end/models/stack_trace/StackTraceModel.ts +0 -128
- package/lib/front_end/models/stack_trace/Trie.ts +0 -163
- package/lib/front_end/models/stack_trace/stack_trace.ts +0 -9
- package/lib/front_end/models/stack_trace/stack_trace_impl.ts +0 -13
- package/lib/front_end/models/text_utils/CodeMirrorUtils.ts +0 -37
- package/lib/front_end/models/text_utils/ContentData.ts +0 -199
- package/lib/front_end/models/text_utils/ContentProvider.ts +0 -68
- package/lib/front_end/models/text_utils/StaticContentProvider.ts +0 -49
- package/lib/front_end/models/text_utils/StreamingContentData.ts +0 -108
- package/lib/front_end/models/text_utils/Text.ts +0 -90
- package/lib/front_end/models/text_utils/TextCursor.ts +0 -44
- package/lib/front_end/models/text_utils/TextRange.ts +0 -266
- package/lib/front_end/models/text_utils/TextUtils.ts +0 -401
- package/lib/front_end/models/text_utils/WasmDisassembly.ts +0 -87
- package/lib/front_end/models/text_utils/text_utils.ts +0 -27
- package/lib/front_end/models/trace/EntityMapper.ts +0 -141
- package/lib/front_end/models/trace/EventsSerializer.ts +0 -101
- package/lib/front_end/models/trace/LanternComputationData.ts +0 -438
- package/lib/front_end/models/trace/ModelImpl.ts +0 -236
- package/lib/front_end/models/trace/Name.ts +0 -136
- package/lib/front_end/models/trace/Processor.ts +0 -652
- package/lib/front_end/models/trace/Styles.ts +0 -1138
- package/lib/front_end/models/trace/extras/FilmStrip.ts +0 -78
- package/lib/front_end/models/trace/extras/MainThreadActivity.ts +0 -86
- package/lib/front_end/models/trace/extras/ScriptDuplication.ts +0 -236
- package/lib/front_end/models/trace/extras/StackTraceForEvent.ts +0 -203
- package/lib/front_end/models/trace/extras/ThirdParties.ts +0 -164
- package/lib/front_end/models/trace/extras/TraceFilter.ts +0 -62
- package/lib/front_end/models/trace/extras/TraceTree.ts +0 -701
- package/lib/front_end/models/trace/extras/extras.ts +0 -11
- package/lib/front_end/models/trace/handlers/AnimationFramesHandler.ts +0 -128
- package/lib/front_end/models/trace/handlers/AnimationHandler.ts +0 -36
- package/lib/front_end/models/trace/handlers/AsyncJSCallsHandler.ts +0 -239
- package/lib/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
- package/lib/front_end/models/trace/handlers/DOMStatsHandler.ts +0 -31
- package/lib/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -306
- package/lib/front_end/models/trace/handlers/FlowsHandler.ts +0 -175
- package/lib/front_end/models/trace/handlers/FramesHandler.ts +0 -571
- package/lib/front_end/models/trace/handlers/GPUHandler.ts +0 -50
- package/lib/front_end/models/trace/handlers/ImagePaintingHandler.ts +0 -183
- package/lib/front_end/models/trace/handlers/InitiatorsHandler.ts +0 -193
- package/lib/front_end/models/trace/handlers/InvalidationsHandler.ts +0 -168
- package/lib/front_end/models/trace/handlers/LargestImagePaintHandler.ts +0 -109
- package/lib/front_end/models/trace/handlers/LargestTextPaintHandler.ts +0 -35
- package/lib/front_end/models/trace/handlers/LayerTreeHandler.ts +0 -123
- package/lib/front_end/models/trace/handlers/LayoutShiftsHandler.ts +0 -573
- package/lib/front_end/models/trace/handlers/MemoryHandler.ts +0 -31
- package/lib/front_end/models/trace/handlers/MetaHandler.ts +0 -525
- package/lib/front_end/models/trace/handlers/ModelHandlers.ts +0 -34
- package/lib/front_end/models/trace/handlers/NetworkRequestsHandler.ts +0 -672
- package/lib/front_end/models/trace/handlers/PageFramesHandler.ts +0 -52
- package/lib/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +0 -460
- package/lib/front_end/models/trace/handlers/RendererHandler.ts +0 -428
- package/lib/front_end/models/trace/handlers/SamplesHandler.ts +0 -271
- package/lib/front_end/models/trace/handlers/ScreenshotsHandler.ts +0 -122
- package/lib/front_end/models/trace/handlers/ScriptsHandler.ts +0 -336
- package/lib/front_end/models/trace/handlers/SelectorStatsHandler.ts +0 -110
- package/lib/front_end/models/trace/handlers/Threads.ts +0 -139
- package/lib/front_end/models/trace/handlers/UserInteractionsHandler.ts +0 -400
- package/lib/front_end/models/trace/handlers/UserTimingsHandler.ts +0 -233
- package/lib/front_end/models/trace/handlers/WarningsHandler.ts +0 -162
- package/lib/front_end/models/trace/handlers/WorkersHandler.ts +0 -45
- package/lib/front_end/models/trace/handlers/handlers.ts +0 -8
- package/lib/front_end/models/trace/handlers/helpers.ts +0 -196
- package/lib/front_end/models/trace/handlers/types.ts +0 -75
- package/lib/front_end/models/trace/helpers/Extensions.ts +0 -54
- package/lib/front_end/models/trace/helpers/Network.ts +0 -129
- package/lib/front_end/models/trace/helpers/SamplesIntegrator.ts +0 -544
- package/lib/front_end/models/trace/helpers/SyntheticEvents.ts +0 -87
- package/lib/front_end/models/trace/helpers/Timing.ts +0 -248
- package/lib/front_end/models/trace/helpers/Trace.ts +0 -928
- package/lib/front_end/models/trace/helpers/TreeHelpers.ts +0 -320
- package/lib/front_end/models/trace/helpers/helpers.ts +0 -11
- package/lib/front_end/models/trace/insights/CLSCulprits.ts +0 -668
- package/lib/front_end/models/trace/insights/Cache.ts +0 -269
- package/lib/front_end/models/trace/insights/Common.ts +0 -453
- package/lib/front_end/models/trace/insights/DOMSize.ts +0 -223
- package/lib/front_end/models/trace/insights/DocumentLatency.ts +0 -319
- package/lib/front_end/models/trace/insights/DuplicatedJavaScript.ts +0 -126
- package/lib/front_end/models/trace/insights/FontDisplay.ts +0 -119
- package/lib/front_end/models/trace/insights/ForcedReflow.ts +0 -220
- package/lib/front_end/models/trace/insights/INPBreakdown.ts +0 -171
- package/lib/front_end/models/trace/insights/ImageDelivery.ts +0 -348
- package/lib/front_end/models/trace/insights/LCPBreakdown.ts +0 -268
- package/lib/front_end/models/trace/insights/LCPDiscovery.ts +0 -237
- package/lib/front_end/models/trace/insights/LegacyJavaScript.ts +0 -138
- package/lib/front_end/models/trace/insights/Models.ts +0 -22
- package/lib/front_end/models/trace/insights/ModernHTTP.ts +0 -257
- package/lib/front_end/models/trace/insights/NetworkDependencyTree.ts +0 -726
- package/lib/front_end/models/trace/insights/RenderBlocking.ts +0 -257
- package/lib/front_end/models/trace/insights/SlowCSSSelector.ts +0 -175
- package/lib/front_end/models/trace/insights/Statistics.ts +0 -101
- package/lib/front_end/models/trace/insights/ThirdParties.ts +0 -130
- package/lib/front_end/models/trace/insights/Viewport.ts +0 -138
- package/lib/front_end/models/trace/insights/insights.ts +0 -10
- package/lib/front_end/models/trace/insights/types.ts +0 -157
- package/lib/front_end/models/trace/lantern/core/LanternError.ts +0 -7
- package/lib/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +0 -619
- package/lib/front_end/models/trace/lantern/core/core.ts +0 -6
- package/lib/front_end/models/trace/lantern/graph/BaseNode.ts +0 -345
- package/lib/front_end/models/trace/lantern/graph/CPUNode.ts +0 -80
- package/lib/front_end/models/trace/lantern/graph/NetworkNode.ts +0 -101
- package/lib/front_end/models/trace/lantern/graph/PageDependencyGraph.ts +0 -636
- package/lib/front_end/models/trace/lantern/graph/graph.ts +0 -8
- package/lib/front_end/models/trace/lantern/lantern.ts +0 -17
- package/lib/front_end/models/trace/lantern/metrics/FirstContentfulPaint.ts +0 -187
- package/lib/front_end/models/trace/lantern/metrics/Interactive.ts +0 -88
- package/lib/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +0 -92
- package/lib/front_end/models/trace/lantern/metrics/MaxPotentialFID.ts +0 -72
- package/lib/front_end/models/trace/lantern/metrics/Metric.ts +0 -126
- package/lib/front_end/models/trace/lantern/metrics/SpeedIndex.ts +0 -126
- package/lib/front_end/models/trace/lantern/metrics/TBTUtils.ts +0 -82
- package/lib/front_end/models/trace/lantern/metrics/TotalBlockingTime.ts +0 -112
- package/lib/front_end/models/trace/lantern/metrics/metrics.ts +0 -12
- package/lib/front_end/models/trace/lantern/simulation/ConnectionPool.ts +0 -150
- package/lib/front_end/models/trace/lantern/simulation/Constants.ts +0 -46
- package/lib/front_end/models/trace/lantern/simulation/DNSCache.ts +0 -61
- package/lib/front_end/models/trace/lantern/simulation/SimulationTimingMap.ts +0 -196
- package/lib/front_end/models/trace/lantern/simulation/Simulator.ts +0 -556
- package/lib/front_end/models/trace/lantern/simulation/TCPConnection.ts +0 -192
- package/lib/front_end/models/trace/lantern/simulation/simulation.ts +0 -10
- package/lib/front_end/models/trace/lantern/types/Lantern.ts +0 -220
- package/lib/front_end/models/trace/lantern/types/types.ts +0 -5
- package/lib/front_end/models/trace/trace.ts +0 -33
- package/lib/front_end/models/trace/types/Configuration.ts +0 -110
- package/lib/front_end/models/trace/types/Extensions.ts +0 -136
- package/lib/front_end/models/trace/types/File.ts +0 -281
- package/lib/front_end/models/trace/types/Overlays.ts +0 -138
- package/lib/front_end/models/trace/types/Timing.ts +0 -30
- package/lib/front_end/models/trace/types/TraceEvents.ts +0 -3277
- package/lib/front_end/models/trace/types/types.ts +0 -10
- package/lib/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +0 -240
- package/lib/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +0 -5
- package/lib/front_end/models/workspace/FileManager.ts +0 -97
- package/lib/front_end/models/workspace/IgnoreListManager.ts +0 -628
- package/lib/front_end/models/workspace/SearchConfig.ts +0 -149
- package/lib/front_end/models/workspace/UISourceCode.ts +0 -698
- package/lib/front_end/models/workspace/WorkspaceImpl.ts +0 -339
- package/lib/front_end/models/workspace/workspace.ts +0 -17
- package/lib/front_end/panels/timeline/TimelineUIUtils.ts +0 -1029
- package/lib/front_end/panels/timeline/extensions/ExtensionUI.ts +0 -49
- package/lib/front_end/panels/timeline/extensions/extensions.ts +0 -9
- package/lib/front_end/third_party/codemirror.next/LICENSE +0 -21
- package/lib/front_end/third_party/codemirror.next/README.chromium +0 -30
- package/lib/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
- package/lib/front_end/third_party/codemirror.next/bundle.ts +0 -135
- package/lib/front_end/third_party/codemirror.next/chunk/angular.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/angular.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/cpp.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/cpp.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/css.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/html.js +0 -4
- package/lib/front_end/third_party/codemirror.next/chunk/java.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/java.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/javascript.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/legacy.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/legacy.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/less.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/less.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/markdown.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/markdown.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/php.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/php.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/python.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/python.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/sass.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/sass.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/svelte.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/svelte.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/vue.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/vue.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/wast.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/wast.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/chunk/xml.js +0 -2
- package/lib/front_end/third_party/codemirror.next/chunk/xml.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/codemirror.next.d.ts +0 -8057
- package/lib/front_end/third_party/codemirror.next/codemirror.next.js +0 -2
- package/lib/front_end/third_party/codemirror.next/codemirror.next.js.map +0 -1
- package/lib/front_end/third_party/codemirror.next/package.json +0 -43
- package/lib/front_end/third_party/codemirror.next/rebuild.sh +0 -6
- package/lib/front_end/third_party/codemirror.next/rollup.config.mjs +0 -49
- package/lib/front_end/third_party/i18n/LICENSE +0 -202
- package/lib/front_end/third_party/i18n/README.chromium +0 -15
- package/lib/front_end/third_party/i18n/i18n-impl.ts +0 -61
- package/lib/front_end/third_party/i18n/i18n.ts +0 -11
- package/lib/front_end/third_party/i18n/localized-string-set.ts +0 -129
- package/lib/front_end/third_party/intl-messageformat/LICENSE +0 -33
- package/lib/front_end/third_party/intl-messageformat/README.chromium +0 -24
- package/lib/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
- package/lib/front_end/third_party/intl-messageformat/intl-messageformat.ts +0 -6
- package/lib/front_end/third_party/intl-messageformat/package/LICENSE.md +0 -33
- package/lib/front_end/third_party/intl-messageformat/package/README.md +0 -3
- package/lib/front_end/third_party/intl-messageformat/package/index.d.ts +0 -6
- package/lib/front_end/third_party/intl-messageformat/package/index.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/index.js +0 -13
- package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.d.ts +0 -5
- package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.js +0 -1710
- package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.iife.js +0 -1815
- package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts +0 -6
- package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/lib/index.js +0 -10
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts +0 -34
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.js +0 -229
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts +0 -28
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.js +0 -48
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts +0 -34
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.js +0 -179
- package/lib/front_end/third_party/intl-messageformat/package/package.json +0 -42
- package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts +0 -34
- package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/src/core.js +0 -230
- package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts +0 -28
- package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/src/error.js +0 -51
- package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts +0 -34
- package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts.map +0 -1
- package/lib/front_end/third_party/intl-messageformat/package/src/formatters.js +0 -182
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/error.d.ts +0 -79
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/index.d.ts +0 -15
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/parser.d.ts +0 -153
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/types.d.ts +0 -139
- package/lib/front_end/third_party/legacy-javascript/LICENSE +0 -202
- package/lib/front_end/third_party/legacy-javascript/README.chromium +0 -13
- package/lib/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
- package/lib/front_end/third_party/legacy-javascript/legacy-javascript.ts +0 -3
- package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.d.ts +0 -18
- package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.js +0 -943
- package/lib/front_end/third_party/legacy-javascript/package.json +0 -8
- package/lib/front_end/third_party/legacy-javascript/rebuild.sh +0 -9
- package/lib/front_end/third_party/source-map-scopes-codec/LICENSE +0 -26
- package/lib/front_end/third_party/source-map-scopes-codec/README.chromium +0 -31
- package/lib/front_end/third_party/source-map-scopes-codec/package/CONTRIBUTING.md +0 -33
- package/lib/front_end/third_party/source-map-scopes-codec/package/LICENSE +0 -26
- package/lib/front_end/third_party/source-map-scopes-codec/package/README.md +0 -64
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts +0 -62
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts +0 -37
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +0 -29
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts +0 -8
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +0 -6
- package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/deno.json +0 -21
- package/lib/front_end/third_party/source-map-scopes-codec/package/package.json +0 -14
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js +0 -196
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.ts +0 -262
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js +0 -235
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.ts +0 -359
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js +0 -39
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.ts +0 -53
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +0 -438
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +0 -539
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js +0 -23
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.ts +0 -35
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +0 -257
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +0 -348
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js +0 -8
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +0 -20
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes-tsconfig.json +0 -8
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes.d.ts +0 -184
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js +0 -9
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.ts +0 -12
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js +0 -82
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js.map +0 -1
- package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.ts +0 -99
- package/lib/front_end/third_party/source-map-scopes-codec/source-map-scopes-codec.ts +0 -5
- package/lib/front_end/third_party/third-party-web/LICENSE +0 -20
- package/lib/front_end/third_party/third-party-web/README.chromium +0 -13
- package/lib/front_end/third_party/third-party-web/lib/nostats-subset.d.ts +0 -2
- package/lib/front_end/third_party/third-party-web/lib/nostats-subset.js +0 -149
- package/lib/front_end/third_party/third-party-web/package/LICENSE +0 -20
- package/lib/front_end/third_party/third-party-web/package/README.md +0 -929
- package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive-nostats.json +0 -1
- package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive.json +0 -1
- package/lib/front_end/third_party/third-party-web/package/dist/entities-nostats.json +0 -1
- package/lib/front_end/third_party/third-party-web/package/dist/entities.json +0 -1
- package/lib/front_end/third_party/third-party-web/package/facades.md +0 -46
- package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.js +0 -1
- package/lib/front_end/third_party/third-party-web/package/httparchive-subset.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/httparchive-subset.js +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/__snapshots__/index.test.js.snap +0 -1006
- package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.js +0 -139
- package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.test.js +0 -44
- package/lib/front_end/third_party/third-party-web/package/lib/entities.test.js +0 -27
- package/lib/front_end/third_party/third-party-web/package/lib/index.d.ts +0 -34
- package/lib/front_end/third_party/third-party-web/package/lib/index.js +0 -3
- package/lib/front_end/third_party/third-party-web/package/lib/index.test.js +0 -246
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/faqs.partial.md +0 -36
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/goals.partial.md +0 -9
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/methodology.partial.md +0 -5
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/template.md +0 -151
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-02-01.md +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-03-01.md +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-06.md +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-13.md +0 -14
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2021-01-01.md +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2024-07-01.md +0 -3
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.js +0 -3
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.js +0 -3
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.js +0 -3
- package/lib/front_end/third_party/third-party-web/package/nostats-subset.d.ts +0 -1
- package/lib/front_end/third_party/third-party-web/package/nostats-subset.js +0 -1
- package/lib/front_end/third_party/third-party-web/package/package.json +0 -46
- package/lib/front_end/third_party/third-party-web/package.json +0 -8
- package/lib/front_end/third_party/third-party-web/rebuild.sh +0 -13
- package/lib/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
- package/lib/front_end/third_party/third-party-web/third-party-web.ts +0 -3
- package/lib/front_end/ui/legacy/theme_support/ThemeSupport.ts +0 -222
- package/lib/front_end/ui/legacy/theme_support/theme_support.ts +0 -5
- package/patches/chrome-devtools-frontend+1.0.1533544.patch +0 -1716
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// Copyright 2024 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
import * as Types from '../types/types.js';
|
|
6
|
-
|
|
7
|
-
let frames = new Map<string, Types.Events.TraceFrame>();
|
|
8
|
-
|
|
9
|
-
export function reset(): void {
|
|
10
|
-
frames = new Map();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function handleEvent(event: Types.Events.Event): void {
|
|
14
|
-
if (Types.Events.isTracingStartedInBrowser(event)) {
|
|
15
|
-
for (const frame of event.args.data?.frames ?? []) {
|
|
16
|
-
// The ID of a frame is stored under the `frame` key.
|
|
17
|
-
frames.set(frame.frame, frame);
|
|
18
|
-
}
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// CommitLoad events can contain an updated URL or Name for a frame.
|
|
23
|
-
if (Types.Events.isCommitLoad(event)) {
|
|
24
|
-
const frameData = event.args.data;
|
|
25
|
-
if (!frameData) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
// We don't want to mutate the original object, hence why
|
|
29
|
-
// we set a new object from the new and existing values.
|
|
30
|
-
const frame = frames.get(frameData.frame);
|
|
31
|
-
if (!frame) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
frames.set(frameData.frame, {
|
|
35
|
-
...frame,
|
|
36
|
-
url: frameData.url || frame.url,
|
|
37
|
-
name: frameData.name || frameData.name,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export async function finalize(): Promise<void> {
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface PageFrameData {
|
|
46
|
-
frames: Map<string, Types.Events.TraceFrame>;
|
|
47
|
-
}
|
|
48
|
-
export function data(): PageFrameData {
|
|
49
|
-
return {
|
|
50
|
-
frames,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
@@ -1,460 +0,0 @@
|
|
|
1
|
-
// Copyright 2022 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* This handler stores page load metrics, including web vitals,
|
|
7
|
-
* and exports them in the shape of a map with the following shape:
|
|
8
|
-
* Map(FrameId -> Map(navigationID -> metrics) )
|
|
9
|
-
*
|
|
10
|
-
* It also exports all markers in a trace in an array.
|
|
11
|
-
*
|
|
12
|
-
* Some metrics are taken directly from a page load events (AKA markers) like DCL.
|
|
13
|
-
* Others require processing multiple events to be determined, like CLS and TBT.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
import * as Platform from '../../../core/platform/platform.js';
|
|
17
|
-
import * as Helpers from '../helpers/helpers.js';
|
|
18
|
-
import * as Types from '../types/types.js';
|
|
19
|
-
|
|
20
|
-
import {data as metaHandlerData} from './MetaHandler.js';
|
|
21
|
-
import type {HandlerName} from './types.js';
|
|
22
|
-
|
|
23
|
-
// Small helpers to make the below type easier to read.
|
|
24
|
-
type FrameId = string;
|
|
25
|
-
type NavigationId = string;
|
|
26
|
-
/**
|
|
27
|
-
* This represents the metric scores for all navigations, for all frames in a trace.
|
|
28
|
-
* Given a frame id, the map points to another map from navigation id to metric scores.
|
|
29
|
-
* The metric scores include the event related to the metric as well as the data regarding
|
|
30
|
-
* the score itself.
|
|
31
|
-
*/
|
|
32
|
-
let metricScoresByFrameId = new Map<FrameId, Map<NavigationId, Map<MetricName, MetricScore>>>();
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Page load events with no associated duration that happened in the
|
|
36
|
-
* main frame.
|
|
37
|
-
*/
|
|
38
|
-
let allMarkerEvents: Types.Events.PageLoadEvent[] = [];
|
|
39
|
-
|
|
40
|
-
export function reset(): void {
|
|
41
|
-
metricScoresByFrameId = new Map();
|
|
42
|
-
pageLoadEventsArray = [];
|
|
43
|
-
allMarkerEvents = [];
|
|
44
|
-
selectedLCPCandidateEvents = new Set();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
let pageLoadEventsArray: Types.Events.PageLoadEvent[] = [];
|
|
48
|
-
|
|
49
|
-
// Once we've found the LCP events in the trace we want to fetch their DOM Node
|
|
50
|
-
// from the backend. We could do this by parsing through our Map of frame =>
|
|
51
|
-
// navigation => metric, but it's easier to keep a set of LCP events. As we
|
|
52
|
-
// parse the trace, any time we store an LCP candidate as the potential LCP
|
|
53
|
-
// event, we store the event here. If we later find a new candidate in the
|
|
54
|
-
// trace, we store that and delete the prior event. When we've parsed the
|
|
55
|
-
// entire trace this set will contain all the LCP events that were used - e.g.
|
|
56
|
-
// the candidates that were the actual LCP events.
|
|
57
|
-
let selectedLCPCandidateEvents = new Set<Types.Events.LargestContentfulPaintCandidate>();
|
|
58
|
-
|
|
59
|
-
export function handleEvent(event: Types.Events.Event): void {
|
|
60
|
-
if (!Types.Events.eventIsPageLoadEvent(event)) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
pageLoadEventsArray.push(event);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function storePageLoadMetricAgainstNavigationId(
|
|
67
|
-
navigation: Types.Events.NavigationStart, event: Types.Events.PageLoadEvent): void {
|
|
68
|
-
const navigationId = navigation.args.data?.navigationId;
|
|
69
|
-
if (!navigationId) {
|
|
70
|
-
throw new Error('Navigation event unexpectedly had no navigation ID.');
|
|
71
|
-
}
|
|
72
|
-
const frameId = getFrameIdForPageLoadEvent(event);
|
|
73
|
-
const {rendererProcessesByFrame} = metaHandlerData();
|
|
74
|
-
|
|
75
|
-
// If either of these pieces of data do not exist, the most likely
|
|
76
|
-
// explanation is that the page load metric we found is for a frame/process
|
|
77
|
-
// combo that the MetaHandler discarded. This typically happens if we get a
|
|
78
|
-
// navigation event with an empty URL. Therefore, we will silently return and
|
|
79
|
-
// drop this metric. If we didn't care about the navigation, we certainly do
|
|
80
|
-
// not need to care about metrics for that navigation.
|
|
81
|
-
const rendererProcessesInFrame = rendererProcessesByFrame.get(frameId);
|
|
82
|
-
if (!rendererProcessesInFrame) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
const processData = rendererProcessesInFrame.get(event.pid);
|
|
86
|
-
if (!processData) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if (Types.Events.isNavigationStart(event)) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (Types.Events.isFirstContentfulPaint(event)) {
|
|
95
|
-
const fcpTime = Types.Timing.Micro(event.ts - navigation.ts);
|
|
96
|
-
const classification = scoreClassificationForFirstContentfulPaint(fcpTime);
|
|
97
|
-
const metricScore = {event, metricName: MetricName.FCP, classification, navigation, timing: fcpTime};
|
|
98
|
-
storeMetricScore(frameId, navigationId, metricScore);
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (Types.Events.isFirstPaint(event)) {
|
|
103
|
-
const paintTime = Types.Timing.Micro(event.ts - navigation.ts);
|
|
104
|
-
const classification = ScoreClassification.UNCLASSIFIED;
|
|
105
|
-
const metricScore = {event, metricName: MetricName.FP, classification, navigation, timing: paintTime};
|
|
106
|
-
storeMetricScore(frameId, navigationId, metricScore);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (Types.Events.isMarkDOMContent(event)) {
|
|
111
|
-
const dclTime = Types.Timing.Micro(event.ts - navigation.ts);
|
|
112
|
-
const metricScore = {
|
|
113
|
-
event,
|
|
114
|
-
metricName: MetricName.DCL,
|
|
115
|
-
classification: scoreClassificationForDOMContentLoaded(dclTime),
|
|
116
|
-
navigation,
|
|
117
|
-
timing: dclTime,
|
|
118
|
-
};
|
|
119
|
-
storeMetricScore(frameId, navigationId, metricScore);
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (Types.Events.isInteractiveTime(event)) {
|
|
124
|
-
const ttiValue = Types.Timing.Micro(event.ts - navigation.ts);
|
|
125
|
-
const tti = {
|
|
126
|
-
event,
|
|
127
|
-
metricName: MetricName.TTI,
|
|
128
|
-
classification: scoreClassificationForTimeToInteractive(ttiValue),
|
|
129
|
-
navigation,
|
|
130
|
-
timing: ttiValue,
|
|
131
|
-
};
|
|
132
|
-
storeMetricScore(frameId, navigationId, tti);
|
|
133
|
-
|
|
134
|
-
const tbtValue = Helpers.Timing.milliToMicro(Types.Timing.Milli(event.args.args.total_blocking_time_ms));
|
|
135
|
-
const tbt = {
|
|
136
|
-
event,
|
|
137
|
-
metricName: MetricName.TBT,
|
|
138
|
-
classification: scoreClassificationForTotalBlockingTime(tbtValue),
|
|
139
|
-
navigation,
|
|
140
|
-
timing: tbtValue,
|
|
141
|
-
};
|
|
142
|
-
storeMetricScore(frameId, navigationId, tbt);
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (Types.Events.isMarkLoad(event)) {
|
|
147
|
-
const loadTime = Types.Timing.Micro(event.ts - navigation.ts);
|
|
148
|
-
const metricScore = {
|
|
149
|
-
event,
|
|
150
|
-
metricName: MetricName.L,
|
|
151
|
-
classification: ScoreClassification.UNCLASSIFIED,
|
|
152
|
-
navigation,
|
|
153
|
-
timing: loadTime,
|
|
154
|
-
};
|
|
155
|
-
storeMetricScore(frameId, navigationId, metricScore);
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
if (Types.Events.isLargestContentfulPaintCandidate(event)) {
|
|
160
|
-
const candidateIndex = event.args.data?.candidateIndex;
|
|
161
|
-
if (!candidateIndex) {
|
|
162
|
-
throw new Error('Largest Contentful Paint unexpectedly had no candidateIndex.');
|
|
163
|
-
}
|
|
164
|
-
const lcpTime = Types.Timing.Micro(event.ts - navigation.ts);
|
|
165
|
-
const lcp = {
|
|
166
|
-
event,
|
|
167
|
-
metricName: MetricName.LCP,
|
|
168
|
-
classification: scoreClassificationForLargestContentfulPaint(lcpTime),
|
|
169
|
-
navigation,
|
|
170
|
-
timing: lcpTime,
|
|
171
|
-
};
|
|
172
|
-
const metricsByNavigation = Platform.MapUtilities.getWithDefault(metricScoresByFrameId, frameId, () => new Map());
|
|
173
|
-
const metrics = Platform.MapUtilities.getWithDefault(metricsByNavigation, navigationId, () => new Map());
|
|
174
|
-
const lastLCPCandidate = metrics.get(MetricName.LCP);
|
|
175
|
-
if (lastLCPCandidate === undefined) {
|
|
176
|
-
selectedLCPCandidateEvents.add(lcp.event);
|
|
177
|
-
storeMetricScore(frameId, navigationId, lcp);
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
const lastLCPCandidateEvent = lastLCPCandidate.event;
|
|
181
|
-
|
|
182
|
-
if (!Types.Events.isLargestContentfulPaintCandidate(lastLCPCandidateEvent)) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
const lastCandidateIndex = lastLCPCandidateEvent.args.data?.candidateIndex;
|
|
186
|
-
if (!lastCandidateIndex) {
|
|
187
|
-
// lastCandidateIndex cannot be undefined because we don't store candidates with
|
|
188
|
-
// with an undefined candidateIndex value. This check is only to make TypeScript
|
|
189
|
-
// treat the field as not undefined below.
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
if (lastCandidateIndex < candidateIndex) {
|
|
193
|
-
selectedLCPCandidateEvents.delete(lastLCPCandidateEvent);
|
|
194
|
-
selectedLCPCandidateEvents.add(lcp.event);
|
|
195
|
-
storeMetricScore(frameId, navigationId, lcp);
|
|
196
|
-
}
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
if (Types.Events.isLayoutShift(event)) {
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
return Platform.assertNever(event, `Unexpected event type: ${event}`);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
function storeMetricScore(frameId: string, navigationId: string, metricScore: MetricScore): void {
|
|
206
|
-
const metricsByNavigation = Platform.MapUtilities.getWithDefault(metricScoresByFrameId, frameId, () => new Map());
|
|
207
|
-
const metrics = Platform.MapUtilities.getWithDefault(metricsByNavigation, navigationId, () => new Map());
|
|
208
|
-
// If an entry with that metric name is present, delete it so that the new entry that
|
|
209
|
-
// will replace it is added at the end of the map. This way we guarantee the map entries
|
|
210
|
-
// are ordered in ASC manner by timestamp.
|
|
211
|
-
metrics.delete(metricScore.metricName);
|
|
212
|
-
metrics.set(metricScore.metricName, metricScore);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export function getFrameIdForPageLoadEvent(event: Types.Events.PageLoadEvent): string {
|
|
216
|
-
if (Types.Events.isFirstContentfulPaint(event) || Types.Events.isInteractiveTime(event) ||
|
|
217
|
-
Types.Events.isLargestContentfulPaintCandidate(event) || Types.Events.isNavigationStart(event) ||
|
|
218
|
-
Types.Events.isLayoutShift(event) || Types.Events.isFirstPaint(event)) {
|
|
219
|
-
return event.args.frame;
|
|
220
|
-
}
|
|
221
|
-
if (Types.Events.isMarkDOMContent(event) || Types.Events.isMarkLoad(event)) {
|
|
222
|
-
const frameId = event.args.data?.frame;
|
|
223
|
-
if (!frameId) {
|
|
224
|
-
throw new Error('MarkDOMContent unexpectedly had no frame ID.');
|
|
225
|
-
}
|
|
226
|
-
return frameId;
|
|
227
|
-
}
|
|
228
|
-
Platform.assertNever(event, `Unexpected event type: ${event}`);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
function getNavigationForPageLoadEvent(event: Types.Events.PageLoadEvent): Types.Events.NavigationStart|null {
|
|
232
|
-
if (Types.Events.isFirstContentfulPaint(event) || Types.Events.isLargestContentfulPaintCandidate(event) ||
|
|
233
|
-
Types.Events.isFirstPaint(event)) {
|
|
234
|
-
const navigationId = event.args.data?.navigationId;
|
|
235
|
-
if (!navigationId) {
|
|
236
|
-
throw new Error('Trace event unexpectedly had no navigation ID.');
|
|
237
|
-
}
|
|
238
|
-
const {navigationsByNavigationId} = metaHandlerData();
|
|
239
|
-
const navigation = navigationsByNavigationId.get(navigationId);
|
|
240
|
-
|
|
241
|
-
if (!navigation) {
|
|
242
|
-
// This event's navigation has been filtered out by the meta handler as a noise event.
|
|
243
|
-
return null;
|
|
244
|
-
}
|
|
245
|
-
return navigation;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
if (Types.Events.isMarkDOMContent(event) || Types.Events.isInteractiveTime(event) ||
|
|
249
|
-
Types.Events.isLayoutShift(event) || Types.Events.isMarkLoad(event)) {
|
|
250
|
-
const frameId = getFrameIdForPageLoadEvent(event);
|
|
251
|
-
const {navigationsByFrameId} = metaHandlerData();
|
|
252
|
-
return Helpers.Trace.getNavigationForTraceEvent(event, frameId, navigationsByFrameId);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
if (Types.Events.isNavigationStart(event)) {
|
|
256
|
-
// We don't want to compute metrics of the navigation relative to itself, so we'll avoid avoid all that.
|
|
257
|
-
return null;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
return Platform.assertNever(event, `Unexpected event type: ${event}`);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Classifications sourced from
|
|
265
|
-
* https://web.dev/fcp/
|
|
266
|
-
*/
|
|
267
|
-
export function scoreClassificationForFirstContentfulPaint(fcpScoreInMicroseconds: Types.Timing.Micro):
|
|
268
|
-
ScoreClassification {
|
|
269
|
-
const FCP_GOOD_TIMING = Helpers.Timing.secondsToMicro(Types.Timing.Seconds(1.8));
|
|
270
|
-
const FCP_MEDIUM_TIMING = Helpers.Timing.secondsToMicro(Types.Timing.Seconds(3.0));
|
|
271
|
-
let scoreClassification = ScoreClassification.BAD;
|
|
272
|
-
if (fcpScoreInMicroseconds <= FCP_MEDIUM_TIMING) {
|
|
273
|
-
scoreClassification = ScoreClassification.OK;
|
|
274
|
-
}
|
|
275
|
-
if (fcpScoreInMicroseconds <= FCP_GOOD_TIMING) {
|
|
276
|
-
scoreClassification = ScoreClassification.GOOD;
|
|
277
|
-
}
|
|
278
|
-
return scoreClassification;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Classifications sourced from
|
|
283
|
-
* https://web.dev/interactive/#how-lighthouse-determines-your-tti-score
|
|
284
|
-
*/
|
|
285
|
-
|
|
286
|
-
export function scoreClassificationForTimeToInteractive(ttiTimeInMicroseconds: Types.Timing.Micro):
|
|
287
|
-
ScoreClassification {
|
|
288
|
-
const TTI_GOOD_TIMING = Helpers.Timing.secondsToMicro(Types.Timing.Seconds(3.8));
|
|
289
|
-
const TTI_MEDIUM_TIMING = Helpers.Timing.secondsToMicro(Types.Timing.Seconds(7.3));
|
|
290
|
-
let scoreClassification = ScoreClassification.BAD;
|
|
291
|
-
if (ttiTimeInMicroseconds <= TTI_MEDIUM_TIMING) {
|
|
292
|
-
scoreClassification = ScoreClassification.OK;
|
|
293
|
-
}
|
|
294
|
-
if (ttiTimeInMicroseconds <= TTI_GOOD_TIMING) {
|
|
295
|
-
scoreClassification = ScoreClassification.GOOD;
|
|
296
|
-
}
|
|
297
|
-
return scoreClassification;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Classifications sourced from
|
|
302
|
-
* https://web.dev/lcp/#what-is-lcp
|
|
303
|
-
*/
|
|
304
|
-
|
|
305
|
-
export function scoreClassificationForLargestContentfulPaint(lcpTimeInMicroseconds: Types.Timing.Micro):
|
|
306
|
-
ScoreClassification {
|
|
307
|
-
const LCP_GOOD_TIMING = Helpers.Timing.secondsToMicro(Types.Timing.Seconds(2.5));
|
|
308
|
-
const LCP_MEDIUM_TIMING = Helpers.Timing.secondsToMicro(Types.Timing.Seconds(4));
|
|
309
|
-
let scoreClassification = ScoreClassification.BAD;
|
|
310
|
-
if (lcpTimeInMicroseconds <= LCP_MEDIUM_TIMING) {
|
|
311
|
-
scoreClassification = ScoreClassification.OK;
|
|
312
|
-
}
|
|
313
|
-
if (lcpTimeInMicroseconds <= LCP_GOOD_TIMING) {
|
|
314
|
-
scoreClassification = ScoreClassification.GOOD;
|
|
315
|
-
}
|
|
316
|
-
return scoreClassification;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* DCL does not have a classification.
|
|
321
|
-
*/
|
|
322
|
-
export function scoreClassificationForDOMContentLoaded(_dclTimeInMicroseconds: Types.Timing.Micro):
|
|
323
|
-
ScoreClassification {
|
|
324
|
-
return ScoreClassification.UNCLASSIFIED;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Classifications sourced from
|
|
329
|
-
* https://web.dev/lighthouse-total-blocking-#time/
|
|
330
|
-
*/
|
|
331
|
-
|
|
332
|
-
export function scoreClassificationForTotalBlockingTime(tbtTimeInMicroseconds: Types.Timing.Micro):
|
|
333
|
-
ScoreClassification {
|
|
334
|
-
const TBT_GOOD_TIMING = Helpers.Timing.milliToMicro(Types.Timing.Milli(200));
|
|
335
|
-
const TBT_MEDIUM_TIMING = Helpers.Timing.milliToMicro(Types.Timing.Milli(600));
|
|
336
|
-
let scoreClassification = ScoreClassification.BAD;
|
|
337
|
-
if (tbtTimeInMicroseconds <= TBT_MEDIUM_TIMING) {
|
|
338
|
-
scoreClassification = ScoreClassification.OK;
|
|
339
|
-
}
|
|
340
|
-
if (tbtTimeInMicroseconds <= TBT_GOOD_TIMING) {
|
|
341
|
-
scoreClassification = ScoreClassification.GOOD;
|
|
342
|
-
}
|
|
343
|
-
return scoreClassification;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* Gets all the Largest Contentful Paint scores of all the frames in the
|
|
348
|
-
* trace.
|
|
349
|
-
*/
|
|
350
|
-
function gatherFinalLCPEvents(): Types.Events.PageLoadEvent[] {
|
|
351
|
-
const allFinalLCPEvents: Types.Events.PageLoadEvent[] = [];
|
|
352
|
-
const dataForAllFrames = [...metricScoresByFrameId.values()];
|
|
353
|
-
const dataForAllNavigations = dataForAllFrames.flatMap(frameData => [...frameData.values()]);
|
|
354
|
-
for (let i = 0; i < dataForAllNavigations.length; i++) {
|
|
355
|
-
const navigationData = dataForAllNavigations[i];
|
|
356
|
-
const lcpInNavigation = navigationData.get(MetricName.LCP);
|
|
357
|
-
if (!lcpInNavigation?.event) {
|
|
358
|
-
continue;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
allFinalLCPEvents.push(lcpInNavigation.event);
|
|
362
|
-
}
|
|
363
|
-
return allFinalLCPEvents;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
export async function finalize(): Promise<void> {
|
|
367
|
-
pageLoadEventsArray.sort((a, b) => a.ts - b.ts);
|
|
368
|
-
|
|
369
|
-
for (const pageLoadEvent of pageLoadEventsArray) {
|
|
370
|
-
const navigation = getNavigationForPageLoadEvent(pageLoadEvent);
|
|
371
|
-
if (navigation) {
|
|
372
|
-
// Event's navigation was not filtered out as noise.
|
|
373
|
-
storePageLoadMetricAgainstNavigationId(navigation, pageLoadEvent);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
// NOTE: if you are looking for the TBT calculation, it has temporarily been
|
|
377
|
-
// removed. See crbug.com/1424335 for details.
|
|
378
|
-
const allFinalLCPEvents = gatherFinalLCPEvents();
|
|
379
|
-
const mainFrame = metaHandlerData().mainFrameId;
|
|
380
|
-
// Filter out LCP candidates to use only definitive LCP values
|
|
381
|
-
const allEventsButLCP = pageLoadEventsArray.filter(event => !Types.Events.isLargestContentfulPaintCandidate(event));
|
|
382
|
-
const markerEvents = [...allFinalLCPEvents, ...allEventsButLCP].filter(Types.Events.isMarkerEvent);
|
|
383
|
-
// Filter by main frame and sort.
|
|
384
|
-
allMarkerEvents =
|
|
385
|
-
markerEvents.filter(event => getFrameIdForPageLoadEvent(event) === mainFrame).sort((a, b) => a.ts - b.ts);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
export interface PageLoadMetricsData {
|
|
389
|
-
/**
|
|
390
|
-
* This represents the metric scores for all navigations, for all frames in a trace.
|
|
391
|
-
* Given a frame id, the map points to another map from navigation id to metric scores.
|
|
392
|
-
* The metric scores include the event related to the metric as well as the data regarding
|
|
393
|
-
* the score itself.
|
|
394
|
-
*/
|
|
395
|
-
metricScoresByFrameId: Map<string, Map<string, Map<MetricName, MetricScore>>>;
|
|
396
|
-
/**
|
|
397
|
-
* Page load events with no associated duration that happened in the
|
|
398
|
-
* main frame.
|
|
399
|
-
*/
|
|
400
|
-
allMarkerEvents: Types.Events.PageLoadEvent[];
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
export function data(): PageLoadMetricsData {
|
|
404
|
-
return {
|
|
405
|
-
metricScoresByFrameId,
|
|
406
|
-
allMarkerEvents,
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
export function deps(): HandlerName[] {
|
|
411
|
-
return ['Meta'];
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
export const enum ScoreClassification {
|
|
415
|
-
GOOD = 'good',
|
|
416
|
-
OK = 'ok',
|
|
417
|
-
BAD = 'bad',
|
|
418
|
-
// Some metrics (such as DOMContentLoaded) don't have a Good/OK/Bad classification, hence this additional entry.
|
|
419
|
-
UNCLASSIFIED = 'unclassified',
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
export const enum MetricName {
|
|
423
|
-
// First Contentful Paint
|
|
424
|
-
FCP = 'FCP',
|
|
425
|
-
// First Paint
|
|
426
|
-
FP = 'FP',
|
|
427
|
-
// MarkLoad
|
|
428
|
-
L = 'L',
|
|
429
|
-
LCP = 'LCP',
|
|
430
|
-
// Mark DOM Content
|
|
431
|
-
DCL = 'DCL',
|
|
432
|
-
// Time To Interactive
|
|
433
|
-
TTI = 'TTI',
|
|
434
|
-
// Total Blocking Time
|
|
435
|
-
TBT = 'TBT',
|
|
436
|
-
// Cumulative Layout Shift
|
|
437
|
-
CLS = 'CLS',
|
|
438
|
-
// Navigation
|
|
439
|
-
NAV = 'Nav',
|
|
440
|
-
// Note: INP is handled in UserInteractionsHandler
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
export interface MetricScore {
|
|
444
|
-
metricName: MetricName;
|
|
445
|
-
classification: ScoreClassification;
|
|
446
|
-
event?: Types.Events.PageLoadEvent;
|
|
447
|
-
// The last navigation that occurred before this metric score.
|
|
448
|
-
navigation?: Types.Events.NavigationStart;
|
|
449
|
-
estimated?: boolean;
|
|
450
|
-
timing: Types.Timing.Micro;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
export type LCPMetricScore = MetricScore&{
|
|
454
|
-
event: Types.Events.LargestContentfulPaintCandidate,
|
|
455
|
-
metricName: MetricName.LCP,
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
export function metricIsLCP(metric: MetricScore): metric is LCPMetricScore {
|
|
459
|
-
return metric.metricName === MetricName.LCP;
|
|
460
|
-
}
|