devtools-tracing 1.0.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/generate.ts +643 -0
- package/index.ts +16 -0
- package/lib/front_end/core/common/App.ts +7 -0
- package/lib/front_end/core/common/AppProvider.ts +32 -0
- package/lib/front_end/core/common/Base64.ts +47 -0
- package/lib/front_end/core/common/CharacterIdMap.ts +30 -0
- package/lib/front_end/core/common/Color.ts +2506 -0
- package/lib/front_end/core/common/ColorConverter.ts +402 -0
- package/lib/front_end/core/common/ColorUtils.ts +252 -0
- package/lib/front_end/core/common/Console.ts +114 -0
- package/lib/front_end/core/common/Debouncer.ts +15 -0
- package/lib/front_end/core/common/EventTarget.ts +52 -0
- package/lib/front_end/core/common/Gzip.ts +74 -0
- package/lib/front_end/core/common/JavaScriptMetaData.ts +29 -0
- package/lib/front_end/core/common/Lazy.ts +31 -0
- package/lib/front_end/core/common/Linkifier.ts +55 -0
- package/lib/front_end/core/common/MapWithDefault.ts +26 -0
- package/lib/front_end/core/common/Mutex.ts +55 -0
- package/lib/front_end/core/common/Object.ts +145 -0
- package/lib/front_end/core/common/ParsedURL.ts +554 -0
- package/lib/front_end/core/common/Progress.ts +180 -0
- package/lib/front_end/core/common/QueryParamHandler.ts +7 -0
- package/lib/front_end/core/common/ResolverBase.ts +85 -0
- package/lib/front_end/core/common/ResourceType.ts +588 -0
- package/lib/front_end/core/common/ReturnToPanel.ts +17 -0
- package/lib/front_end/core/common/Revealer.ts +192 -0
- package/lib/front_end/core/common/Runnable.ts +41 -0
- package/lib/front_end/core/common/SegmentedRange.ts +87 -0
- package/lib/front_end/core/common/SettingRegistration.ts +339 -0
- package/lib/front_end/core/common/Settings.ts +1497 -0
- package/lib/front_end/core/common/SimpleHistoryManager.ts +124 -0
- package/lib/front_end/core/common/StringOutputStream.ts +26 -0
- package/lib/front_end/core/common/TextDictionary.ts +48 -0
- package/lib/front_end/core/common/Throttler.ts +99 -0
- package/lib/front_end/core/common/Trie.ts +152 -0
- package/lib/front_end/core/common/Worker.ts +60 -0
- package/lib/front_end/core/common/common.ts +81 -0
- package/lib/front_end/core/host/AidaClient.ts +733 -0
- package/lib/front_end/core/host/GdpClient.ts +316 -0
- package/lib/front_end/core/host/InspectorFrontendHost.ts +648 -0
- package/lib/front_end/core/host/InspectorFrontendHostAPI.ts +551 -0
- package/lib/front_end/core/host/Platform.ts +76 -0
- package/lib/front_end/core/host/ResourceLoader.ts +282 -0
- package/lib/front_end/core/host/UserMetrics.ts +1230 -0
- package/lib/front_end/core/host/host.ts +23 -0
- package/lib/front_end/core/i18n/ByteUtilities.ts +82 -0
- package/lib/front_end/core/i18n/DevToolsLocale.ts +87 -0
- package/lib/front_end/core/i18n/NumberFormatter.ts +82 -0
- package/lib/front_end/core/i18n/i18n.ts +17 -0
- package/lib/front_end/core/i18n/i18nImpl.ts +204 -0
- package/lib/front_end/core/i18n/i18nTypes.ts +10 -0
- package/lib/front_end/core/i18n/locales.js +14 -0
- package/lib/front_end/core/i18n/time-utilities.ts +174 -0
- package/lib/front_end/core/platform/ArrayUtilities.ts +271 -0
- package/lib/front_end/core/platform/Brand.ts +23 -0
- package/lib/front_end/core/platform/Constructor.ts +10 -0
- package/lib/front_end/core/platform/DOMUtilities.ts +138 -0
- package/lib/front_end/core/platform/DateUtilities.ts +15 -0
- package/lib/front_end/core/platform/DevToolsPath.ts +53 -0
- package/lib/front_end/core/platform/KeyboardUtilities.ts +38 -0
- package/lib/front_end/core/platform/MapUtilities.ts +95 -0
- package/lib/front_end/core/platform/MimeType.ts +175 -0
- package/lib/front_end/core/platform/NumberUtilities.ts +80 -0
- package/lib/front_end/core/platform/StringUtilities.ts +588 -0
- package/lib/front_end/core/platform/Timing.ts +17 -0
- package/lib/front_end/core/platform/TypedArrayUtilities.ts +189 -0
- package/lib/front_end/core/platform/TypescriptUtilities.ts +86 -0
- package/lib/front_end/core/platform/UIString.ts +39 -0
- package/lib/front_end/core/platform/UserVisibleError.ts +28 -0
- package/lib/front_end/core/platform/platform.ts +45 -0
- package/lib/front_end/core/protocol_client/ConnectionTransport.ts +26 -0
- package/lib/front_end/core/protocol_client/InspectorBackend.ts +1050 -0
- package/lib/front_end/core/protocol_client/NodeURL.ts +42 -0
- package/lib/front_end/core/protocol_client/protocol_client.ts +13 -0
- package/lib/front_end/core/root/Runtime.ts +609 -0
- package/lib/front_end/core/root/root.ts +6 -0
- package/lib/front_end/core/sdk/AccessibilityModel.ts +353 -0
- package/lib/front_end/core/sdk/AnimationModel.ts +1041 -0
- package/lib/front_end/core/sdk/AutofillModel.ts +184 -0
- package/lib/front_end/core/sdk/CPUProfilerModel.ts +148 -0
- package/lib/front_end/core/sdk/CPUThrottlingManager.ts +282 -0
- package/lib/front_end/core/sdk/CSSContainerQuery.ts +139 -0
- package/lib/front_end/core/sdk/CSSFontFace.ts +40 -0
- package/lib/front_end/core/sdk/CSSLayer.ts +30 -0
- package/lib/front_end/core/sdk/CSSMatchedStyles.ts +1646 -0
- package/lib/front_end/core/sdk/CSSMedia.ts +121 -0
- package/lib/front_end/core/sdk/CSSMetadata.ts +1647 -0
- package/lib/front_end/core/sdk/CSSModel.ts +1128 -0
- package/lib/front_end/core/sdk/CSSProperty.ts +384 -0
- package/lib/front_end/core/sdk/CSSPropertyParser.ts +681 -0
- package/lib/front_end/core/sdk/CSSPropertyParserMatchers.ts +1395 -0
- package/lib/front_end/core/sdk/CSSQuery.ts +72 -0
- package/lib/front_end/core/sdk/CSSRule.ts +465 -0
- package/lib/front_end/core/sdk/CSSScope.ts +30 -0
- package/lib/front_end/core/sdk/CSSStartingStyle.ts +29 -0
- package/lib/front_end/core/sdk/CSSStyleDeclaration.ts +313 -0
- package/lib/front_end/core/sdk/CSSStyleSheetHeader.ts +196 -0
- package/lib/front_end/core/sdk/CSSSupports.ts +33 -0
- package/lib/front_end/core/sdk/CategorizedBreakpoint.ts +64 -0
- package/lib/front_end/core/sdk/ChildTargetManager.ts +314 -0
- package/lib/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +62 -0
- package/lib/front_end/core/sdk/Connections.ts +293 -0
- package/lib/front_end/core/sdk/ConsoleModel.ts +808 -0
- package/lib/front_end/core/sdk/ConsoleModelTypes.ts +15 -0
- package/lib/front_end/core/sdk/Cookie.ts +319 -0
- package/lib/front_end/core/sdk/CookieModel.ts +239 -0
- package/lib/front_end/core/sdk/CookieParser.ts +185 -0
- package/lib/front_end/core/sdk/DOMDebuggerModel.ts +787 -0
- package/lib/front_end/core/sdk/DOMModel.ts +1961 -0
- package/lib/front_end/core/sdk/DebuggerModel.ts +1605 -0
- package/lib/front_end/core/sdk/EmulationModel.ts +648 -0
- package/lib/front_end/core/sdk/EnhancedTracesParser.ts +515 -0
- package/lib/front_end/core/sdk/EventBreakpointsModel.ts +183 -0
- package/lib/front_end/core/sdk/FrameAssociated.ts +11 -0
- package/lib/front_end/core/sdk/FrameManager.ts +259 -0
- package/lib/front_end/core/sdk/HeapProfilerModel.ts +225 -0
- package/lib/front_end/core/sdk/HttpReasonPhraseStrings.ts +77 -0
- package/lib/front_end/core/sdk/IOModel.ts +91 -0
- package/lib/front_end/core/sdk/IsolateManager.ts +257 -0
- package/lib/front_end/core/sdk/IssuesModel.ts +70 -0
- package/lib/front_end/core/sdk/LayerTreeBase.ts +169 -0
- package/lib/front_end/core/sdk/LogModel.ts +56 -0
- package/lib/front_end/core/sdk/NetworkManager.ts +2823 -0
- package/lib/front_end/core/sdk/NetworkRequest.ts +2253 -0
- package/lib/front_end/core/sdk/OverlayColorGenerator.ts +52 -0
- package/lib/front_end/core/sdk/OverlayModel.ts +1011 -0
- package/lib/front_end/core/sdk/OverlayPersistentHighlighter.ts +522 -0
- package/lib/front_end/core/sdk/PageLoad.ts +35 -0
- package/lib/front_end/core/sdk/PageResourceLoader.ts +435 -0
- package/lib/front_end/core/sdk/PaintProfiler.ts +110 -0
- package/lib/front_end/core/sdk/PerformanceMetricsModel.ts +84 -0
- package/lib/front_end/core/sdk/PreloadingModel.ts +863 -0
- package/lib/front_end/core/sdk/RehydratingConnection.ts +386 -0
- package/lib/front_end/core/sdk/RehydratingObject.ts +66 -0
- package/lib/front_end/core/sdk/RemoteObject.ts +1160 -0
- package/lib/front_end/core/sdk/Resource.ts +232 -0
- package/lib/front_end/core/sdk/ResourceTreeModel.ts +1160 -0
- package/lib/front_end/core/sdk/RuntimeModel.ts +732 -0
- package/lib/front_end/core/sdk/SDKModel.ts +65 -0
- package/lib/front_end/core/sdk/ScopeTreeCache.ts +45 -0
- package/lib/front_end/core/sdk/ScreenCaptureModel.ts +255 -0
- package/lib/front_end/core/sdk/Script.ts +534 -0
- package/lib/front_end/core/sdk/SecurityOriginManager.ts +76 -0
- package/lib/front_end/core/sdk/ServerSentEvents.ts +80 -0
- package/lib/front_end/core/sdk/ServerSentEventsProtocol.ts +122 -0
- package/lib/front_end/core/sdk/ServerTiming.ts +260 -0
- package/lib/front_end/core/sdk/ServiceWorkerCacheModel.ts +377 -0
- package/lib/front_end/core/sdk/ServiceWorkerManager.ts +605 -0
- package/lib/front_end/core/sdk/SourceMap.ts +867 -0
- package/lib/front_end/core/sdk/SourceMapCache.ts +54 -0
- package/lib/front_end/core/sdk/SourceMapFunctionRanges.ts +156 -0
- package/lib/front_end/core/sdk/SourceMapManager.ts +239 -0
- package/lib/front_end/core/sdk/SourceMapScopeChainEntry.ts +189 -0
- package/lib/front_end/core/sdk/SourceMapScopesInfo.ts +508 -0
- package/lib/front_end/core/sdk/StorageBucketsModel.ts +204 -0
- package/lib/front_end/core/sdk/StorageKeyManager.ts +98 -0
- package/lib/front_end/core/sdk/Target.ts +332 -0
- package/lib/front_end/core/sdk/TargetManager.ts +453 -0
- package/lib/front_end/core/sdk/TraceObject.ts +61 -0
- package/lib/front_end/core/sdk/WebAuthnModel.ts +104 -0
- package/lib/front_end/core/sdk/sdk.ts +174 -0
- package/lib/front_end/entrypoints/formatter_worker/FormatterActions.ts +59 -0
- package/lib/front_end/generated/InspectorBackendCommands.js +1617 -0
- package/lib/front_end/generated/SupportedCSSProperties.js +7512 -0
- package/lib/front_end/generated/protocol-proxy-api.d.ts +5022 -0
- package/lib/front_end/generated/protocol.ts +22014 -0
- package/lib/front_end/models/cpu_profile/CPUProfileDataModel.ts +571 -0
- package/lib/front_end/models/cpu_profile/ProfileTreeModel.ts +103 -0
- package/lib/front_end/models/cpu_profile/cpu_profile.ts +11 -0
- package/lib/front_end/models/formatter/FormatterWorkerPool.ts +219 -0
- package/lib/front_end/models/formatter/ScriptFormatter.ts +112 -0
- package/lib/front_end/models/formatter/formatter.ts +8 -0
- package/lib/front_end/models/text_utils/CodeMirrorUtils.ts +37 -0
- package/lib/front_end/models/text_utils/ContentData.ts +199 -0
- package/lib/front_end/models/text_utils/ContentProvider.ts +68 -0
- package/lib/front_end/models/text_utils/StaticContentProvider.ts +49 -0
- package/lib/front_end/models/text_utils/StreamingContentData.ts +108 -0
- package/lib/front_end/models/text_utils/Text.ts +90 -0
- package/lib/front_end/models/text_utils/TextCursor.ts +44 -0
- package/lib/front_end/models/text_utils/TextRange.ts +266 -0
- package/lib/front_end/models/text_utils/TextUtils.ts +401 -0
- package/lib/front_end/models/text_utils/WasmDisassembly.ts +87 -0
- package/lib/front_end/models/text_utils/text_utils.ts +27 -0
- package/lib/front_end/models/trace/EntityMapper.ts +141 -0
- package/lib/front_end/models/trace/EventsSerializer.ts +101 -0
- package/lib/front_end/models/trace/LanternComputationData.ts +438 -0
- package/lib/front_end/models/trace/ModelImpl.ts +236 -0
- package/lib/front_end/models/trace/Name.ts +136 -0
- package/lib/front_end/models/trace/Processor.ts +652 -0
- package/lib/front_end/models/trace/Styles.ts +1138 -0
- package/lib/front_end/models/trace/extras/FilmStrip.ts +78 -0
- package/lib/front_end/models/trace/extras/MainThreadActivity.ts +86 -0
- package/lib/front_end/models/trace/extras/ScriptDuplication.ts +236 -0
- package/lib/front_end/models/trace/extras/StackTraceForEvent.ts +203 -0
- package/lib/front_end/models/trace/extras/ThirdParties.ts +164 -0
- package/lib/front_end/models/trace/extras/TraceFilter.ts +62 -0
- package/lib/front_end/models/trace/extras/TraceTree.ts +701 -0
- package/lib/front_end/models/trace/extras/extras.ts +11 -0
- package/lib/front_end/models/trace/handlers/AnimationFramesHandler.ts +128 -0
- package/lib/front_end/models/trace/handlers/AnimationHandler.ts +36 -0
- package/lib/front_end/models/trace/handlers/AsyncJSCallsHandler.ts +239 -0
- package/lib/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +183 -0
- package/lib/front_end/models/trace/handlers/DOMStatsHandler.ts +31 -0
- package/lib/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +306 -0
- package/lib/front_end/models/trace/handlers/FlowsHandler.ts +175 -0
- package/lib/front_end/models/trace/handlers/FramesHandler.ts +571 -0
- package/lib/front_end/models/trace/handlers/GPUHandler.ts +50 -0
- package/lib/front_end/models/trace/handlers/ImagePaintingHandler.ts +183 -0
- package/lib/front_end/models/trace/handlers/InitiatorsHandler.ts +193 -0
- package/lib/front_end/models/trace/handlers/InvalidationsHandler.ts +168 -0
- package/lib/front_end/models/trace/handlers/LargestImagePaintHandler.ts +109 -0
- package/lib/front_end/models/trace/handlers/LargestTextPaintHandler.ts +35 -0
- package/lib/front_end/models/trace/handlers/LayerTreeHandler.ts +123 -0
- package/lib/front_end/models/trace/handlers/LayoutShiftsHandler.ts +573 -0
- package/lib/front_end/models/trace/handlers/MemoryHandler.ts +31 -0
- package/lib/front_end/models/trace/handlers/MetaHandler.ts +525 -0
- package/lib/front_end/models/trace/handlers/ModelHandlers.ts +34 -0
- package/lib/front_end/models/trace/handlers/NetworkRequestsHandler.ts +672 -0
- package/lib/front_end/models/trace/handlers/PageFramesHandler.ts +52 -0
- package/lib/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +460 -0
- package/lib/front_end/models/trace/handlers/RendererHandler.ts +428 -0
- package/lib/front_end/models/trace/handlers/SamplesHandler.ts +271 -0
- package/lib/front_end/models/trace/handlers/ScreenshotsHandler.ts +122 -0
- package/lib/front_end/models/trace/handlers/ScriptsHandler.ts +336 -0
- package/lib/front_end/models/trace/handlers/SelectorStatsHandler.ts +110 -0
- package/lib/front_end/models/trace/handlers/Threads.ts +139 -0
- package/lib/front_end/models/trace/handlers/UserInteractionsHandler.ts +400 -0
- package/lib/front_end/models/trace/handlers/UserTimingsHandler.ts +233 -0
- package/lib/front_end/models/trace/handlers/WarningsHandler.ts +162 -0
- package/lib/front_end/models/trace/handlers/WorkersHandler.ts +45 -0
- package/lib/front_end/models/trace/handlers/handlers.ts +8 -0
- package/lib/front_end/models/trace/handlers/helpers.ts +196 -0
- package/lib/front_end/models/trace/handlers/types.ts +75 -0
- package/lib/front_end/models/trace/helpers/Extensions.ts +54 -0
- package/lib/front_end/models/trace/helpers/Network.ts +129 -0
- package/lib/front_end/models/trace/helpers/SamplesIntegrator.ts +544 -0
- package/lib/front_end/models/trace/helpers/SyntheticEvents.ts +87 -0
- package/lib/front_end/models/trace/helpers/Timing.ts +248 -0
- package/lib/front_end/models/trace/helpers/Trace.ts +928 -0
- package/lib/front_end/models/trace/helpers/TreeHelpers.ts +320 -0
- package/lib/front_end/models/trace/helpers/helpers.ts +11 -0
- package/lib/front_end/models/trace/insights/CLSCulprits.ts +668 -0
- package/lib/front_end/models/trace/insights/Cache.ts +269 -0
- package/lib/front_end/models/trace/insights/Common.ts +453 -0
- package/lib/front_end/models/trace/insights/DOMSize.ts +223 -0
- package/lib/front_end/models/trace/insights/DocumentLatency.ts +319 -0
- package/lib/front_end/models/trace/insights/DuplicatedJavaScript.ts +126 -0
- package/lib/front_end/models/trace/insights/FontDisplay.ts +119 -0
- package/lib/front_end/models/trace/insights/ForcedReflow.ts +220 -0
- package/lib/front_end/models/trace/insights/INPBreakdown.ts +171 -0
- package/lib/front_end/models/trace/insights/ImageDelivery.ts +348 -0
- package/lib/front_end/models/trace/insights/LCPBreakdown.ts +268 -0
- package/lib/front_end/models/trace/insights/LCPDiscovery.ts +237 -0
- package/lib/front_end/models/trace/insights/LegacyJavaScript.ts +138 -0
- package/lib/front_end/models/trace/insights/Models.ts +22 -0
- package/lib/front_end/models/trace/insights/ModernHTTP.ts +257 -0
- package/lib/front_end/models/trace/insights/NetworkDependencyTree.ts +726 -0
- package/lib/front_end/models/trace/insights/RenderBlocking.ts +257 -0
- package/lib/front_end/models/trace/insights/SlowCSSSelector.ts +175 -0
- package/lib/front_end/models/trace/insights/Statistics.ts +101 -0
- package/lib/front_end/models/trace/insights/ThirdParties.ts +130 -0
- package/lib/front_end/models/trace/insights/Viewport.ts +138 -0
- package/lib/front_end/models/trace/insights/insights.ts +10 -0
- package/lib/front_end/models/trace/insights/types.ts +157 -0
- package/lib/front_end/models/trace/lantern/core/LanternError.ts +7 -0
- package/lib/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +619 -0
- package/lib/front_end/models/trace/lantern/core/core.ts +6 -0
- package/lib/front_end/models/trace/lantern/graph/BaseNode.ts +345 -0
- package/lib/front_end/models/trace/lantern/graph/CPUNode.ts +80 -0
- package/lib/front_end/models/trace/lantern/graph/NetworkNode.ts +101 -0
- package/lib/front_end/models/trace/lantern/graph/PageDependencyGraph.ts +636 -0
- package/lib/front_end/models/trace/lantern/graph/graph.ts +8 -0
- package/lib/front_end/models/trace/lantern/lantern.ts +17 -0
- package/lib/front_end/models/trace/lantern/metrics/FirstContentfulPaint.ts +187 -0
- package/lib/front_end/models/trace/lantern/metrics/Interactive.ts +88 -0
- package/lib/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +92 -0
- package/lib/front_end/models/trace/lantern/metrics/MaxPotentialFID.ts +72 -0
- package/lib/front_end/models/trace/lantern/metrics/Metric.ts +126 -0
- package/lib/front_end/models/trace/lantern/metrics/SpeedIndex.ts +126 -0
- package/lib/front_end/models/trace/lantern/metrics/TBTUtils.ts +82 -0
- package/lib/front_end/models/trace/lantern/metrics/TotalBlockingTime.ts +112 -0
- package/lib/front_end/models/trace/lantern/metrics/metrics.ts +12 -0
- package/lib/front_end/models/trace/lantern/simulation/ConnectionPool.ts +150 -0
- package/lib/front_end/models/trace/lantern/simulation/Constants.ts +46 -0
- package/lib/front_end/models/trace/lantern/simulation/DNSCache.ts +61 -0
- package/lib/front_end/models/trace/lantern/simulation/SimulationTimingMap.ts +196 -0
- package/lib/front_end/models/trace/lantern/simulation/Simulator.ts +556 -0
- package/lib/front_end/models/trace/lantern/simulation/TCPConnection.ts +192 -0
- package/lib/front_end/models/trace/lantern/simulation/simulation.ts +10 -0
- package/lib/front_end/models/trace/lantern/types/Lantern.ts +220 -0
- package/lib/front_end/models/trace/lantern/types/types.ts +5 -0
- package/lib/front_end/models/trace/trace.ts +33 -0
- package/lib/front_end/models/trace/types/Configuration.ts +110 -0
- package/lib/front_end/models/trace/types/Extensions.ts +136 -0
- package/lib/front_end/models/trace/types/File.ts +281 -0
- package/lib/front_end/models/trace/types/Overlays.ts +138 -0
- package/lib/front_end/models/trace/types/Timing.ts +30 -0
- package/lib/front_end/models/trace/types/TraceEvents.ts +3277 -0
- package/lib/front_end/models/trace/types/types.ts +10 -0
- package/lib/front_end/third_party/i18n/LICENSE +202 -0
- package/lib/front_end/third_party/i18n/README.chromium +15 -0
- package/lib/front_end/third_party/i18n/i18n-impl.ts +61 -0
- package/lib/front_end/third_party/i18n/i18n.ts +11 -0
- package/lib/front_end/third_party/i18n/localized-string-set.ts +129 -0
- package/lib/front_end/third_party/intl-messageformat/LICENSE +33 -0
- package/lib/front_end/third_party/intl-messageformat/README.chromium +24 -0
- package/lib/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +16 -0
- package/lib/front_end/third_party/intl-messageformat/intl-messageformat.ts +6 -0
- package/lib/front_end/third_party/intl-messageformat/package/LICENSE.md +33 -0
- package/lib/front_end/third_party/intl-messageformat/package/README.md +3 -0
- package/lib/front_end/third_party/intl-messageformat/package/index.d.ts +6 -0
- package/lib/front_end/third_party/intl-messageformat/package/index.d.ts.map +1 -0
- package/lib/front_end/third_party/intl-messageformat/package/index.js +13 -0
- package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.d.ts +5 -0
- package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.js +1710 -0
- package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.iife.js +1815 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts +6 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts.map +1 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/index.js +10 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts +34 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts.map +1 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.js +229 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts +28 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts.map +1 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.js +48 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts +34 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts.map +1 -0
- package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.js +179 -0
- package/lib/front_end/third_party/intl-messageformat/package/package.json +42 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts +34 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts.map +1 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/core.js +230 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts +28 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts.map +1 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/error.js +51 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts +34 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts.map +1 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/formatters.js +182 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/error.d.ts +79 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/index.d.ts +15 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/parser.d.ts +153 -0
- package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/types.d.ts +139 -0
- package/lib/front_end/third_party/legacy-javascript/LICENSE +202 -0
- package/lib/front_end/third_party/legacy-javascript/README.chromium +13 -0
- package/lib/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +8 -0
- package/lib/front_end/third_party/legacy-javascript/legacy-javascript.ts +3 -0
- package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.d.ts +18 -0
- package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.js +943 -0
- package/lib/front_end/third_party/legacy-javascript/package.json +8 -0
- package/lib/front_end/third_party/legacy-javascript/rebuild.sh +9 -0
- package/lib/front_end/third_party/third-party-web/LICENSE +20 -0
- package/lib/front_end/third_party/third-party-web/README.chromium +13 -0
- package/lib/front_end/third_party/third-party-web/lib/nostats-subset.d.ts +2 -0
- package/lib/front_end/third_party/third-party-web/lib/nostats-subset.js +149 -0
- package/lib/front_end/third_party/third-party-web/package/LICENSE +20 -0
- package/lib/front_end/third_party/third-party-web/package/README.md +929 -0
- package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive-nostats.json +1 -0
- package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive.json +1 -0
- package/lib/front_end/third_party/third-party-web/package/dist/entities-nostats.json +1 -0
- package/lib/front_end/third_party/third-party-web/package/dist/entities.json +1 -0
- package/lib/front_end/third_party/third-party-web/package/facades.md +46 -0
- package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.d.ts +1 -0
- package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.js +1 -0
- package/lib/front_end/third_party/third-party-web/package/httparchive-subset.d.ts +1 -0
- package/lib/front_end/third_party/third-party-web/package/httparchive-subset.js +1 -0
- package/lib/front_end/third_party/third-party-web/package/lib/__snapshots__/index.test.js.snap +1006 -0
- package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.js +139 -0
- package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.test.js +44 -0
- package/lib/front_end/third_party/third-party-web/package/lib/entities.test.js +27 -0
- package/lib/front_end/third_party/third-party-web/package/lib/index.d.ts +34 -0
- package/lib/front_end/third_party/third-party-web/package/lib/index.js +3 -0
- package/lib/front_end/third_party/third-party-web/package/lib/index.test.js +246 -0
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/faqs.partial.md +36 -0
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/goals.partial.md +9 -0
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/methodology.partial.md +5 -0
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/template.md +151 -0
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-02-01.md +1 -0
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-03-01.md +1 -0
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-06.md +1 -0
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-13.md +14 -0
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2021-01-01.md +1 -0
- package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2024-07-01.md +3 -0
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.d.ts +1 -0
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.js +3 -0
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.d.ts +1 -0
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.js +3 -0
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.d.ts +1 -0
- package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.js +3 -0
- package/lib/front_end/third_party/third-party-web/package/nostats-subset.d.ts +1 -0
- package/lib/front_end/third_party/third-party-web/package/nostats-subset.js +1 -0
- package/lib/front_end/third_party/third-party-web/package/package.json +46 -0
- package/lib/front_end/third_party/third-party-web/package.json +8 -0
- package/lib/front_end/third_party/third-party-web/rebuild.sh +13 -0
- package/lib/front_end/third_party/third-party-web/third-party-web-tsconfig.json +8 -0
- package/lib/front_end/third_party/third-party-web/third-party-web.ts +3 -0
- package/package.json +24 -0
- package/patches/chrome-devtools-frontend+1.0.1533544.patch +187 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# [Third Party Web](https://www.thirdpartyweb.today/)
|
|
2
|
+
|
|
3
|
+
## Check out the shiny new web UI https://www.thirdpartyweb.today/
|
|
4
|
+
|
|
5
|
+
Data on third party entities and their impact on the web.
|
|
6
|
+
|
|
7
|
+
This document is a summary of which third party scripts are most responsible for excessive JavaScript execution on the web today.
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
1. [Goals](#goals)
|
|
12
|
+
1. [Methodology](#methodology)
|
|
13
|
+
1. [npm Module](#npm-module)
|
|
14
|
+
1. [Updates](#updates)
|
|
15
|
+
1. [Data](#data)
|
|
16
|
+
1. [Summary](#summary)
|
|
17
|
+
1. [How to Interpret](#how-to-interpret)
|
|
18
|
+
1. [Third Parties by Category](#by-category)
|
|
19
|
+
<%= category_table_of_contents %>
|
|
20
|
+
1. [Third Parties by Total Impact](#by-total-impact)
|
|
21
|
+
1. [Future Work](#future-work)
|
|
22
|
+
1. [FAQs](#faqs)
|
|
23
|
+
1. [Contributing](#contributing)
|
|
24
|
+
|
|
25
|
+
## Goals
|
|
26
|
+
|
|
27
|
+
<%= partials.goals %>
|
|
28
|
+
|
|
29
|
+
## Methodology
|
|
30
|
+
|
|
31
|
+
<%= partials.methodology %>
|
|
32
|
+
|
|
33
|
+
## npm Module
|
|
34
|
+
|
|
35
|
+
The entity classification data is available as an npm module.
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
const {getEntity} = require('third-party-web')
|
|
39
|
+
const entity = getEntity('https://d36mpcpuzc4ztk.cloudfront.net/js/visitor.js')
|
|
40
|
+
console.log(entity)
|
|
41
|
+
// {
|
|
42
|
+
// "name": "Freshdesk",
|
|
43
|
+
// "homepage": "https://freshdesk.com/",
|
|
44
|
+
// "category": "customer-success",
|
|
45
|
+
// "domains": ["d36mpcpuzc4ztk.cloudfront.net"]
|
|
46
|
+
// }
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Updates
|
|
50
|
+
|
|
51
|
+
<%= updates_contents %>
|
|
52
|
+
|
|
53
|
+
## Data
|
|
54
|
+
|
|
55
|
+
### Summary
|
|
56
|
+
|
|
57
|
+
Across top ~4 million sites, ~2700 origins account for ~57% of all script execution time with the top 50 entities already accounting for ~47%. Third party script execution is the majority chunk of the web today, and it's important to make informed choices.
|
|
58
|
+
|
|
59
|
+
### How to Interpret
|
|
60
|
+
|
|
61
|
+
Each entity has a number of data points available.
|
|
62
|
+
|
|
63
|
+
1. **Usage (Total Number of Occurrences)** - how many scripts from their origins were included on pages
|
|
64
|
+
1. **Total Impact (Total Execution Time)** - how many seconds were spent executing their scripts across the web
|
|
65
|
+
1. **Average Impact (Average Execution Time)** - on average, how many milliseconds were spent executing each script
|
|
66
|
+
1. **Category** - what type of script is this
|
|
67
|
+
|
|
68
|
+
<a name="by-category"></a>
|
|
69
|
+
|
|
70
|
+
### Third Parties by Category
|
|
71
|
+
|
|
72
|
+
This section breaks down third parties by category. The third parties in each category are ranked from first to last based on the average impact of their scripts. Perhaps the most important comparisons lie here. You always need to pick an analytics provider, but at least you can pick the most well-behaved analytics provider.
|
|
73
|
+
|
|
74
|
+
#### Overall Breakdown
|
|
75
|
+
|
|
76
|
+
Unsurprisingly, ads account for the largest identifiable chunk of third party script execution.
|
|
77
|
+
|
|
78
|
+

|
|
79
|
+
|
|
80
|
+
<%= category_contents %>
|
|
81
|
+
|
|
82
|
+
<a name="by-total-impact"></a>
|
|
83
|
+
|
|
84
|
+
### Third Parties by Total Impact
|
|
85
|
+
|
|
86
|
+
This section highlights the entities responsible for the most script execution across the web. This helps inform which improvements would have the largest total impact.
|
|
87
|
+
|
|
88
|
+
<%= all_data %>
|
|
89
|
+
|
|
90
|
+
## Future Work
|
|
91
|
+
|
|
92
|
+
1. Introduce URL-level data for more fine-grained analysis, i.e. which libraries from Cloudflare/Google CDNs are most expensive.
|
|
93
|
+
1. Expand the scope, i.e. include more third parties and have greater entity/category coverage.
|
|
94
|
+
|
|
95
|
+
## FAQs
|
|
96
|
+
|
|
97
|
+
<%= partials.faqs %>
|
|
98
|
+
|
|
99
|
+
## Contributing
|
|
100
|
+
|
|
101
|
+
### Thanks
|
|
102
|
+
|
|
103
|
+
A **huge** thanks to [@simonhearne](https://twitter.com/simonhearne) and [@soulgalore](https://twitter.com/soulislove) for their assistance in classifying additional domains!
|
|
104
|
+
|
|
105
|
+
### Updating the Entities
|
|
106
|
+
|
|
107
|
+
The domain->entity mapping can be found in `data/entities.js`. Adding a new entity is as simple as adding a new array item with the following form.
|
|
108
|
+
|
|
109
|
+
```js
|
|
110
|
+
{
|
|
111
|
+
"name": "Facebook",
|
|
112
|
+
"homepage": "https://www.facebook.com",
|
|
113
|
+
"category": "social",
|
|
114
|
+
"domains": [
|
|
115
|
+
"*.facebook.com",
|
|
116
|
+
"*.fbcdn.net"
|
|
117
|
+
],
|
|
118
|
+
"examples": [
|
|
119
|
+
"www.facebook.com",
|
|
120
|
+
"connect.facebook.net",
|
|
121
|
+
"staticxx.facebook.com",
|
|
122
|
+
"static.xx.fbcdn.net",
|
|
123
|
+
"m.facebook.com"
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Updating Attribution Logic
|
|
129
|
+
|
|
130
|
+
The logic for attribution to individual script URLs can be found in the [Lighthouse repo](https://github.com/GoogleChrome/lighthouse). File an issue over there to discuss further.
|
|
131
|
+
|
|
132
|
+
### Updating the Data
|
|
133
|
+
|
|
134
|
+
This is now automated! Run `yarn start:update-ha-data` with a `gcp-credentials.json` file in the root directory of this project (look at `bin/automated-update.js` for the steps involved).
|
|
135
|
+
|
|
136
|
+
### Updating this README
|
|
137
|
+
|
|
138
|
+
This README is auto-generated from the templates `lib/` and the computed data. In order to update the charts, you'll need to make sure you have `cairo` installed locally in addition to `yarn install`.
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Install `cairo` and dependencies for node-canvas
|
|
142
|
+
brew install pkg-config cairo pango libpng jpeg giflib
|
|
143
|
+
# Build the requirements in this repo
|
|
144
|
+
yarn build
|
|
145
|
+
# Regenerate the README
|
|
146
|
+
yarn start
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Updating the website
|
|
150
|
+
|
|
151
|
+
The web code is located in `www/` directory of this repository. Open a PR to make changes.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Huge props to [WordAds](https://wordads.co/) for reducing their impact from ~2.5s to ~200ms on average! A few entities are showing considerably less data this cycle (Media Math, Crazy Egg, DoubleVerify, Bootstrap CDN). Perhaps they've added new CDNs/hostnames that we haven't identified or the basket of sites in HTTPArchive has shifted away from their usage.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Almost 2,000 entities tracked now across ~3,000+ domains! Huge props to [@simonhearne](https://twitter.com/simonhearne) for making this massive increase possible. Tag Managers have now been split out into their own category since they represented such a large percentage of the "Mixed / Other" category.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Google Ads clarified that `www.googletagservices.com` serves more ad scripts than generic tag management, and it has been reclassified accordingly. This has dropped the overall Tag Management share considerably back down to its earlier position.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
A shortcoming of the attribution approach has been fixed. Total usage is now reported based on the number of _pages_ in the dataset that use the third-party, not the number of _scripts_. Correspondingly, all average impact times are now reported _per page_ rather than _per script_. Previously, a third party could appear to have a lower impact or be more popular simply by splitting their work across multiple files.
|
|
2
|
+
|
|
3
|
+
Third-parties that performed most of their work from a single script should see little to no impact from this change, but some entities have seen significant ranking movement. Hosting providers that host entire pages are, understandably, the most affected.
|
|
4
|
+
|
|
5
|
+
Some notable changes below:
|
|
6
|
+
|
|
7
|
+
| Third-Party | Previously (per-script) | Now (per-page) |
|
|
8
|
+
| ----------- | ----------------------- | -------------- |
|
|
9
|
+
| Beeketing | 137 ms | 465 ms |
|
|
10
|
+
| Sumo | 263 ms | 798 ms |
|
|
11
|
+
| Tumblr | 324 ms | 1499 ms |
|
|
12
|
+
| Yandex APIs | 393 ms | 1231 ms |
|
|
13
|
+
| Google Ads | 402 ms | 1285 ms |
|
|
14
|
+
| Wix | 972 ms | 5393 ms |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Due to a change in HTTPArchive measurement which temporarily disabled site-isolation (out-of-process iframes), all of the third-parties whose work previously took place off the main-thread are now counted _on_ the main thread (and thus appear in our stats). This is most evident in the change to Google-owned properties such as YouTube and Doubleclick whose _complete_ cost are now captured.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Some third parties use a dynamic subdomain to serve its main script on websites (e.g .domain.com). Some of these subdomain scripts are saved under observed-domains JSON file as results of the `sql/all-observed-domains-query.sql` query but analyzing http archive database we found a lot that are ignored because of number of occurrences (less than 50 ).
|
|
2
|
+
|
|
3
|
+
So, we've created a new query to keep observed domains with occurrence below 50 only if its mapped entity (based on entity.js) has a total occurrence (of all its declared domain) greater than 50.
|
package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../index'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../index'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../index'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/subsets/nostats.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("./lib/subsets/nostats.js")
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "third-party-web",
|
|
3
|
+
"version": "0.26.2",
|
|
4
|
+
"description": "Categorized data on third party entities on the web.",
|
|
5
|
+
"main": "./lib/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build:www": "cd www/ && npm install && npm run build",
|
|
8
|
+
"build": "node bin/convert-entities-db.js && node bin/generate-canonical-domain-csv.js && node bin/build-entity-json-files.js && node bin/generate-sql.js && generate-export-aliases",
|
|
9
|
+
"lint:fix": "prettier --print-width=100 --write '**/*.js'",
|
|
10
|
+
"start": "mkdir -p .tmp && node bin/merge-origins-with-entities.js && node bin/create-markdown.js",
|
|
11
|
+
"start:update-ha-data": "node ./bin/automated-update.js",
|
|
12
|
+
"test": "yarn build && yarn test:unit",
|
|
13
|
+
"test:unit": "jest 'lib/*'",
|
|
14
|
+
"semantic-release": "semantic-release"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"third-party",
|
|
18
|
+
"third-parties"
|
|
19
|
+
],
|
|
20
|
+
"author": "Patrick Hulce <patrick.hulce@gmail.com>",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/patrickhulce/third-party-web.git"
|
|
24
|
+
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@google-cloud/bigquery": "^7.9.0",
|
|
28
|
+
"chart.js": "^2.9.4",
|
|
29
|
+
"chartjs-node-canvas": "^3.2.0",
|
|
30
|
+
"colors": "^1.4.0",
|
|
31
|
+
"generate-export-aliases": "^1.1.0",
|
|
32
|
+
"jest": "^24.9.0",
|
|
33
|
+
"lodash": "^4.17.15",
|
|
34
|
+
"prettier": "^1.18.2",
|
|
35
|
+
"prompts": "^2.4.2",
|
|
36
|
+
"semantic-release": "^24.2.0"
|
|
37
|
+
},
|
|
38
|
+
"config": {
|
|
39
|
+
"exportAliases": {
|
|
40
|
+
"nostats-subset": "./lib/subsets/nostats.js",
|
|
41
|
+
"httparchive-nostats-subset": "./lib/subsets/httparchive-nostats.js",
|
|
42
|
+
"httparchive-subset": "./lib/subsets/httparchive.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"packageManager": "yarn@4.1.1"
|
|
46
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
2
|
+
cd "$SCRIPT_DIR"
|
|
3
|
+
|
|
4
|
+
npm install
|
|
5
|
+
|
|
6
|
+
rm -rf package
|
|
7
|
+
cp -r node_modules/third-party-web package
|
|
8
|
+
rm -fr package/.* package/www-v2 package/dist/domain-map.csv
|
|
9
|
+
|
|
10
|
+
../../../third_party/esbuild/esbuild --bundle package/nostats-subset.js --format=esm --outdir=lib
|
|
11
|
+
rm -rf node_modules
|
|
12
|
+
# Because there's a bug in clang causing it to reformat import lists even where formatting is disabled, run it right away
|
|
13
|
+
git cl format --js
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "devtools-tracing",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Utilities for working with trace files",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "tsx index.ts",
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
+
"postinstall": "patch-package"
|
|
10
|
+
},
|
|
11
|
+
"author": "",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@typescript-eslint/typescript-estree": "^8.46.2",
|
|
15
|
+
"chrome-devtools-frontend": "^1.0.1533544",
|
|
16
|
+
"patch-package": "^8.0.1",
|
|
17
|
+
"tsx": "^4.20.6",
|
|
18
|
+
"typescript": "^5.9.3"
|
|
19
|
+
},
|
|
20
|
+
"prettier": {
|
|
21
|
+
"tabWidth": 2,
|
|
22
|
+
"singleQuote": true
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
diff --git a/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/helpers.ts b/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/helpers.ts
|
|
2
|
+
index 62c5773..ff07f89 100644
|
|
3
|
+
--- a/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/helpers.ts
|
|
4
|
+
+++ b/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/helpers.ts
|
|
5
|
+
@@ -3,13 +3,13 @@
|
|
6
|
+
// found in the LICENSE file.
|
|
7
|
+
|
|
8
|
+
import type * as Platform from '../../../core/platform/platform.js';
|
|
9
|
+
-import * as ThirdPartyWeb from '../../../third_party/third-party-web/third-party-web.js';
|
|
10
|
+
import * as Types from '../types/types.js';
|
|
11
|
+
|
|
12
|
+
import type {TraceEventsForNetworkRequest} from './NetworkRequestsHandler.js';
|
|
13
|
+
import type {HandlerData} from './types.js';
|
|
14
|
+
|
|
15
|
+
-export type Entity = typeof ThirdPartyWeb.ThirdPartyWeb.entities[number]&{
|
|
16
|
+
+export type Entity = {
|
|
17
|
+
+ name?: string,
|
|
18
|
+
isUnrecognized?: boolean,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
@@ -33,7 +33,7 @@ export function getEntityForUrl(url: string, entityMappings: EntityMappings): En
|
|
22
|
+
if (cachedByUrl) {
|
|
23
|
+
return cachedByUrl;
|
|
24
|
+
}
|
|
25
|
+
- const entity = ThirdPartyWeb.ThirdPartyWeb.getEntity(url) ?? makeUpEntity(entityMappings.createdEntityCache, url);
|
|
26
|
+
+ const entity = makeUpEntity(entityMappings.createdEntityCache, url);
|
|
27
|
+
if (entity) {
|
|
28
|
+
entityMappings.entityByUrlCache.set(url, entity);
|
|
29
|
+
}
|
|
30
|
+
@@ -105,17 +105,7 @@ export function makeUpEntity(entityCache: Map<string, Entity>, url: string): Ent
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
- // NOTE: Lighthouse uses a tld database to determine the root domain, but here
|
|
35
|
+
- // we are using third party web's database. Doesn't really work for the case of classifying
|
|
36
|
+
- // domains 3pweb doesn't know about, so it will just give us a guess.
|
|
37
|
+
- const rootDomain = ThirdPartyWeb.ThirdPartyWeb.getRootDomain(url);
|
|
38
|
+
- if (!rootDomain) {
|
|
39
|
+
- return;
|
|
40
|
+
- }
|
|
41
|
+
-
|
|
42
|
+
- if (entityCache.has(rootDomain)) {
|
|
43
|
+
- return entityCache.get(rootDomain);
|
|
44
|
+
- }
|
|
45
|
+
+ const rootDomain = URL.parse(url)?.hostname || url
|
|
46
|
+
|
|
47
|
+
const unrecognizedEntity = {
|
|
48
|
+
name: rootDomain,
|
|
49
|
+
diff --git a/node_modules/chrome-devtools-frontend/front_end/panels/timeline/TimelineUIUtils.ts b/node_modules/chrome-devtools-frontend/front_end/panels/timeline/TimelineUIUtils.ts
|
|
50
|
+
index 4fe7b92..573e0d3 100644
|
|
51
|
+
--- a/node_modules/chrome-devtools-frontend/front_end/panels/timeline/TimelineUIUtils.ts
|
|
52
|
+
+++ b/node_modules/chrome-devtools-frontend/front_end/panels/timeline/TimelineUIUtils.ts
|
|
53
|
+
@@ -48,7 +48,6 @@ import * as Tracing from '../../services/tracing/tracing.js';
|
|
54
|
+
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
|
55
|
+
// eslint-disable-next-line @devtools/es-modules-import
|
|
56
|
+
import codeHighlighterStyles from '../../ui/components/code_highlighter/codeHighlighter.css.js';
|
|
57
|
+
-import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
58
|
+
// eslint-disable-next-line @devtools/es-modules-import
|
|
59
|
+
import imagePreviewStyles from '../../ui/legacy/components/utils/imagePreview.css.js';
|
|
60
|
+
import * as LegacyComponents from '../../ui/legacy/components/utils/utils.js';
|
|
61
|
+
@@ -1531,14 +1530,6 @@ export class TimelineUIUtils {
|
|
62
|
+
TimelineUIUtils.renderEventJson(event, contentHelper);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
- const stats: TimeRangeCategoryStats = {};
|
|
66
|
+
- const showPieChart = canShowPieChart && TimelineUIUtils.aggregatedStatsForTraceEvent(stats, parsedTrace, event);
|
|
67
|
+
- if (showPieChart) {
|
|
68
|
+
- contentHelper.addSection(i18nString(UIStrings.aggregatedTime));
|
|
69
|
+
- const pieChart = TimelineUIUtils.generatePieChart(stats, TimelineUIUtils.eventStyle(event).category, selfTime);
|
|
70
|
+
- contentHelper.appendElementRow('', pieChart);
|
|
71
|
+
- }
|
|
72
|
+
-
|
|
73
|
+
return contentHelper.fragment;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@@ -2048,79 +2039,6 @@ export class TimelineUIUtils {
|
|
77
|
+
return Trace.Styles.getCategoryStyles();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
- static generatePieChart(
|
|
81
|
+
- aggregatedStats: TimeRangeCategoryStats, selfCategory?: Trace.Styles.TimelineCategory,
|
|
82
|
+
- selfTime?: Trace.Types.Timing.Micro): Element {
|
|
83
|
+
- let total = 0;
|
|
84
|
+
- for (const categoryName in aggregatedStats) {
|
|
85
|
+
- total += aggregatedStats[categoryName];
|
|
86
|
+
- }
|
|
87
|
+
-
|
|
88
|
+
- const element = document.createElement('div');
|
|
89
|
+
- element.classList.add('timeline-details-view-pie-chart-wrapper');
|
|
90
|
+
- element.classList.add('hbox');
|
|
91
|
+
-
|
|
92
|
+
- const pieChart = new PerfUI.PieChart.PieChart();
|
|
93
|
+
- const slices: Array<{
|
|
94
|
+
- value: number,
|
|
95
|
+
- color: string,
|
|
96
|
+
- title: string,
|
|
97
|
+
- }> = [];
|
|
98
|
+
-
|
|
99
|
+
- function appendLegendRow(title: string, value: number, color: string): void {
|
|
100
|
+
- if (!value) {
|
|
101
|
+
- return;
|
|
102
|
+
- }
|
|
103
|
+
- slices.push({value, color, title});
|
|
104
|
+
- }
|
|
105
|
+
-
|
|
106
|
+
- // In case of self time, first add self, then children of the same category.
|
|
107
|
+
- if (selfCategory) {
|
|
108
|
+
- const selfTimeMilli = Trace.Helpers.Timing.microToMilli(selfTime || 0 as Trace.Types.Timing.Micro);
|
|
109
|
+
- if (selfTime) {
|
|
110
|
+
- appendLegendRow(
|
|
111
|
+
- i18nString(UIStrings.sSelf, {PH1: selfCategory.title}),
|
|
112
|
+
- selfTimeMilli,
|
|
113
|
+
- selfCategory.getCSSValue(),
|
|
114
|
+
- );
|
|
115
|
+
- }
|
|
116
|
+
- // Children of the same category.
|
|
117
|
+
- const categoryTime = aggregatedStats[selfCategory.name];
|
|
118
|
+
- const value = categoryTime - (selfTimeMilli || 0);
|
|
119
|
+
- if (value > 0) {
|
|
120
|
+
- appendLegendRow(
|
|
121
|
+
- i18nString(UIStrings.sChildren, {PH1: selfCategory.title}),
|
|
122
|
+
- value,
|
|
123
|
+
- selfCategory.getCSSValue(),
|
|
124
|
+
- );
|
|
125
|
+
- }
|
|
126
|
+
- }
|
|
127
|
+
-
|
|
128
|
+
- // Add other categories.
|
|
129
|
+
- for (const categoryName in Trace.Styles.getCategoryStyles()) {
|
|
130
|
+
- const category = Trace.Styles.getCategoryStyles()[categoryName as keyof Trace.Styles.CategoryPalette];
|
|
131
|
+
- if (categoryName === selfCategory?.name) {
|
|
132
|
+
- // Do not add an entry for this event's self category because 2
|
|
133
|
+
- // entries for it where added just before this for loop (for
|
|
134
|
+
- // self and children times).
|
|
135
|
+
- continue;
|
|
136
|
+
- }
|
|
137
|
+
- appendLegendRow(category.title, aggregatedStats[category.name], category.getCSSValue());
|
|
138
|
+
- }
|
|
139
|
+
-
|
|
140
|
+
- pieChart.data = {
|
|
141
|
+
- chartName: i18nString(UIStrings.timeSpentInRendering),
|
|
142
|
+
- size: 110,
|
|
143
|
+
- formatter: (value: number) => i18n.TimeUtilities.preciseMillisToString(value),
|
|
144
|
+
- showLegend: true,
|
|
145
|
+
- total,
|
|
146
|
+
- slices,
|
|
147
|
+
- };
|
|
148
|
+
- const pieChartContainer = element.createChild('div', 'vbox');
|
|
149
|
+
- pieChartContainer.appendChild(pieChart);
|
|
150
|
+
-
|
|
151
|
+
- return element;
|
|
152
|
+
- }
|
|
153
|
+
// Generates a Summary component given a aggregated stats for categories.
|
|
154
|
+
static generateSummaryDetails(
|
|
155
|
+
aggregatedStats: Record<string, number>, rangeStart: number, rangeEnd: number,
|
|
156
|
+
@@ -2174,31 +2092,6 @@ export class TimelineUIUtils {
|
|
157
|
+
return element;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
- static generateDetailsContentForFrame(
|
|
161
|
+
- frame: Trace.Types.Events.LegacyTimelineFrame, filmStrip: Trace.Extras.FilmStrip.Data|null,
|
|
162
|
+
- filmStripFrame: Trace.Extras.FilmStrip.Frame|null): DocumentFragment {
|
|
163
|
+
- const contentHelper = new TimelineDetailsContentHelper(null, null);
|
|
164
|
+
- contentHelper.addSection(i18nString(UIStrings.frame));
|
|
165
|
+
-
|
|
166
|
+
- const duration = TimelineUIUtils.frameDuration(frame);
|
|
167
|
+
- contentHelper.appendElementRow(i18nString(UIStrings.duration), duration);
|
|
168
|
+
- if (filmStrip && filmStripFrame) {
|
|
169
|
+
- const filmStripPreview = document.createElement('div');
|
|
170
|
+
- filmStripPreview.classList.add('timeline-filmstrip-preview');
|
|
171
|
+
- // TODO(paulirish): Adopt Util.ImageCache
|
|
172
|
+
- const uri = Trace.Handlers.ModelHandlers.Screenshots.screenshotImageDataUri(filmStripFrame.screenshotEvent);
|
|
173
|
+
- void UI.UIUtils.loadImage(uri).then(image => image && filmStripPreview.appendChild(image));
|
|
174
|
+
- contentHelper.appendElementRow('', filmStripPreview);
|
|
175
|
+
- filmStripPreview.addEventListener('click', frameClicked.bind(null, filmStrip, filmStripFrame), false);
|
|
176
|
+
- }
|
|
177
|
+
-
|
|
178
|
+
- function frameClicked(filmStrip: Trace.Extras.FilmStrip.Data, filmStripFrame: Trace.Extras.FilmStrip.Frame): void {
|
|
179
|
+
- PerfUI.FilmStripView.Dialog.fromFilmStrip(filmStrip, filmStripFrame.index);
|
|
180
|
+
- }
|
|
181
|
+
-
|
|
182
|
+
- return contentHelper.fragment;
|
|
183
|
+
- }
|
|
184
|
+
-
|
|
185
|
+
static frameDuration(frame: Trace.Types.Events.LegacyTimelineFrame): Element {
|
|
186
|
+
const offsetMilli = Trace.Helpers.Timing.microToMilli(frame.startTimeOffset);
|
|
187
|
+
const durationMilli = Trace.Helpers.Timing.microToMilli(Trace.Types.Timing.Micro(frame.endTime - frame.startTime));
|