devtools-tracing 1.1.1 → 1.2.1

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.
Files changed (527) hide show
  1. package/dist/index.d.ts +4 -0
  2. package/dist/index.js +28854 -0
  3. package/package.json +11 -8
  4. package/generate.ts +0 -649
  5. package/index.ts +0 -17
  6. package/lib/extension-api/ExtensionAPI.d.ts +0 -357
  7. package/lib/front_end/core/common/App.ts +0 -7
  8. package/lib/front_end/core/common/AppProvider.ts +0 -32
  9. package/lib/front_end/core/common/Base64.ts +0 -47
  10. package/lib/front_end/core/common/CharacterIdMap.ts +0 -30
  11. package/lib/front_end/core/common/Color.ts +0 -2506
  12. package/lib/front_end/core/common/ColorConverter.ts +0 -402
  13. package/lib/front_end/core/common/ColorUtils.ts +0 -252
  14. package/lib/front_end/core/common/Console.ts +0 -114
  15. package/lib/front_end/core/common/Debouncer.ts +0 -15
  16. package/lib/front_end/core/common/EventTarget.ts +0 -52
  17. package/lib/front_end/core/common/Gzip.ts +0 -74
  18. package/lib/front_end/core/common/JavaScriptMetaData.ts +0 -29
  19. package/lib/front_end/core/common/Lazy.ts +0 -31
  20. package/lib/front_end/core/common/Linkifier.ts +0 -55
  21. package/lib/front_end/core/common/MapWithDefault.ts +0 -26
  22. package/lib/front_end/core/common/Mutex.ts +0 -55
  23. package/lib/front_end/core/common/Object.ts +0 -145
  24. package/lib/front_end/core/common/ParsedURL.ts +0 -554
  25. package/lib/front_end/core/common/Progress.ts +0 -180
  26. package/lib/front_end/core/common/QueryParamHandler.ts +0 -7
  27. package/lib/front_end/core/common/ResolverBase.ts +0 -85
  28. package/lib/front_end/core/common/ResourceType.ts +0 -588
  29. package/lib/front_end/core/common/ReturnToPanel.ts +0 -17
  30. package/lib/front_end/core/common/Revealer.ts +0 -192
  31. package/lib/front_end/core/common/Runnable.ts +0 -41
  32. package/lib/front_end/core/common/SegmentedRange.ts +0 -87
  33. package/lib/front_end/core/common/SettingRegistration.ts +0 -339
  34. package/lib/front_end/core/common/Settings.ts +0 -1497
  35. package/lib/front_end/core/common/SimpleHistoryManager.ts +0 -124
  36. package/lib/front_end/core/common/StringOutputStream.ts +0 -26
  37. package/lib/front_end/core/common/TextDictionary.ts +0 -48
  38. package/lib/front_end/core/common/Throttler.ts +0 -99
  39. package/lib/front_end/core/common/Trie.ts +0 -152
  40. package/lib/front_end/core/common/Worker.ts +0 -60
  41. package/lib/front_end/core/common/common.ts +0 -81
  42. package/lib/front_end/core/host/AidaClient.ts +0 -733
  43. package/lib/front_end/core/host/GdpClient.ts +0 -316
  44. package/lib/front_end/core/host/InspectorFrontendHost.ts +0 -648
  45. package/lib/front_end/core/host/InspectorFrontendHostAPI.ts +0 -551
  46. package/lib/front_end/core/host/Platform.ts +0 -76
  47. package/lib/front_end/core/host/ResourceLoader.ts +0 -282
  48. package/lib/front_end/core/host/UserMetrics.ts +0 -1230
  49. package/lib/front_end/core/host/host.ts +0 -23
  50. package/lib/front_end/core/i18n/ByteUtilities.ts +0 -82
  51. package/lib/front_end/core/i18n/DevToolsLocale.ts +0 -87
  52. package/lib/front_end/core/i18n/NumberFormatter.ts +0 -82
  53. package/lib/front_end/core/i18n/i18n.ts +0 -17
  54. package/lib/front_end/core/i18n/i18nImpl.ts +0 -204
  55. package/lib/front_end/core/i18n/i18nTypes.ts +0 -10
  56. package/lib/front_end/core/i18n/locales.js +0 -14
  57. package/lib/front_end/core/i18n/time-utilities.ts +0 -174
  58. package/lib/front_end/core/platform/ArrayUtilities.ts +0 -271
  59. package/lib/front_end/core/platform/Brand.ts +0 -23
  60. package/lib/front_end/core/platform/Constructor.ts +0 -10
  61. package/lib/front_end/core/platform/DOMUtilities.ts +0 -138
  62. package/lib/front_end/core/platform/DateUtilities.ts +0 -15
  63. package/lib/front_end/core/platform/DevToolsPath.ts +0 -53
  64. package/lib/front_end/core/platform/KeyboardUtilities.ts +0 -38
  65. package/lib/front_end/core/platform/MapUtilities.ts +0 -95
  66. package/lib/front_end/core/platform/MimeType.ts +0 -175
  67. package/lib/front_end/core/platform/NumberUtilities.ts +0 -80
  68. package/lib/front_end/core/platform/StringUtilities.ts +0 -588
  69. package/lib/front_end/core/platform/Timing.ts +0 -17
  70. package/lib/front_end/core/platform/TypedArrayUtilities.ts +0 -189
  71. package/lib/front_end/core/platform/TypescriptUtilities.ts +0 -86
  72. package/lib/front_end/core/platform/UIString.ts +0 -39
  73. package/lib/front_end/core/platform/UserVisibleError.ts +0 -28
  74. package/lib/front_end/core/platform/platform.ts +0 -45
  75. package/lib/front_end/core/protocol_client/ConnectionTransport.ts +0 -26
  76. package/lib/front_end/core/protocol_client/InspectorBackend.ts +0 -1050
  77. package/lib/front_end/core/protocol_client/NodeURL.ts +0 -42
  78. package/lib/front_end/core/protocol_client/protocol_client.ts +0 -13
  79. package/lib/front_end/core/root/Runtime.ts +0 -609
  80. package/lib/front_end/core/root/root.ts +0 -6
  81. package/lib/front_end/core/sdk/AccessibilityModel.ts +0 -353
  82. package/lib/front_end/core/sdk/AnimationModel.ts +0 -1041
  83. package/lib/front_end/core/sdk/AutofillModel.ts +0 -184
  84. package/lib/front_end/core/sdk/CPUProfilerModel.ts +0 -148
  85. package/lib/front_end/core/sdk/CPUThrottlingManager.ts +0 -282
  86. package/lib/front_end/core/sdk/CSSContainerQuery.ts +0 -139
  87. package/lib/front_end/core/sdk/CSSFontFace.ts +0 -40
  88. package/lib/front_end/core/sdk/CSSLayer.ts +0 -30
  89. package/lib/front_end/core/sdk/CSSMatchedStyles.ts +0 -1646
  90. package/lib/front_end/core/sdk/CSSMedia.ts +0 -121
  91. package/lib/front_end/core/sdk/CSSMetadata.ts +0 -1647
  92. package/lib/front_end/core/sdk/CSSModel.ts +0 -1128
  93. package/lib/front_end/core/sdk/CSSProperty.ts +0 -384
  94. package/lib/front_end/core/sdk/CSSPropertyParser.ts +0 -681
  95. package/lib/front_end/core/sdk/CSSPropertyParserMatchers.ts +0 -1395
  96. package/lib/front_end/core/sdk/CSSQuery.ts +0 -72
  97. package/lib/front_end/core/sdk/CSSRule.ts +0 -465
  98. package/lib/front_end/core/sdk/CSSScope.ts +0 -30
  99. package/lib/front_end/core/sdk/CSSStartingStyle.ts +0 -29
  100. package/lib/front_end/core/sdk/CSSStyleDeclaration.ts +0 -313
  101. package/lib/front_end/core/sdk/CSSStyleSheetHeader.ts +0 -196
  102. package/lib/front_end/core/sdk/CSSSupports.ts +0 -33
  103. package/lib/front_end/core/sdk/CategorizedBreakpoint.ts +0 -64
  104. package/lib/front_end/core/sdk/ChildTargetManager.ts +0 -314
  105. package/lib/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +0 -62
  106. package/lib/front_end/core/sdk/Connections.ts +0 -293
  107. package/lib/front_end/core/sdk/ConsoleModel.ts +0 -808
  108. package/lib/front_end/core/sdk/ConsoleModelTypes.ts +0 -15
  109. package/lib/front_end/core/sdk/Cookie.ts +0 -319
  110. package/lib/front_end/core/sdk/CookieModel.ts +0 -239
  111. package/lib/front_end/core/sdk/CookieParser.ts +0 -185
  112. package/lib/front_end/core/sdk/DOMDebuggerModel.ts +0 -787
  113. package/lib/front_end/core/sdk/DOMModel.ts +0 -1961
  114. package/lib/front_end/core/sdk/DebuggerModel.ts +0 -1605
  115. package/lib/front_end/core/sdk/EmulationModel.ts +0 -648
  116. package/lib/front_end/core/sdk/EnhancedTracesParser.ts +0 -515
  117. package/lib/front_end/core/sdk/EventBreakpointsModel.ts +0 -183
  118. package/lib/front_end/core/sdk/FrameAssociated.ts +0 -11
  119. package/lib/front_end/core/sdk/FrameManager.ts +0 -259
  120. package/lib/front_end/core/sdk/HeapProfilerModel.ts +0 -225
  121. package/lib/front_end/core/sdk/HttpReasonPhraseStrings.ts +0 -77
  122. package/lib/front_end/core/sdk/IOModel.ts +0 -91
  123. package/lib/front_end/core/sdk/IsolateManager.ts +0 -257
  124. package/lib/front_end/core/sdk/IssuesModel.ts +0 -70
  125. package/lib/front_end/core/sdk/LayerTreeBase.ts +0 -169
  126. package/lib/front_end/core/sdk/LogModel.ts +0 -56
  127. package/lib/front_end/core/sdk/NetworkManager.ts +0 -2823
  128. package/lib/front_end/core/sdk/NetworkRequest.ts +0 -2253
  129. package/lib/front_end/core/sdk/OverlayColorGenerator.ts +0 -52
  130. package/lib/front_end/core/sdk/OverlayModel.ts +0 -1011
  131. package/lib/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -522
  132. package/lib/front_end/core/sdk/PageLoad.ts +0 -35
  133. package/lib/front_end/core/sdk/PageResourceLoader.ts +0 -435
  134. package/lib/front_end/core/sdk/PaintProfiler.ts +0 -110
  135. package/lib/front_end/core/sdk/PerformanceMetricsModel.ts +0 -84
  136. package/lib/front_end/core/sdk/PreloadingModel.ts +0 -863
  137. package/lib/front_end/core/sdk/RehydratingConnection.ts +0 -386
  138. package/lib/front_end/core/sdk/RehydratingObject.ts +0 -66
  139. package/lib/front_end/core/sdk/RemoteObject.ts +0 -1160
  140. package/lib/front_end/core/sdk/Resource.ts +0 -232
  141. package/lib/front_end/core/sdk/ResourceTreeModel.ts +0 -1160
  142. package/lib/front_end/core/sdk/RuntimeModel.ts +0 -732
  143. package/lib/front_end/core/sdk/SDKModel.ts +0 -65
  144. package/lib/front_end/core/sdk/ScopeTreeCache.ts +0 -45
  145. package/lib/front_end/core/sdk/ScreenCaptureModel.ts +0 -255
  146. package/lib/front_end/core/sdk/Script.ts +0 -534
  147. package/lib/front_end/core/sdk/SecurityOriginManager.ts +0 -76
  148. package/lib/front_end/core/sdk/ServerSentEvents.ts +0 -80
  149. package/lib/front_end/core/sdk/ServerSentEventsProtocol.ts +0 -122
  150. package/lib/front_end/core/sdk/ServerTiming.ts +0 -260
  151. package/lib/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -377
  152. package/lib/front_end/core/sdk/ServiceWorkerManager.ts +0 -605
  153. package/lib/front_end/core/sdk/SourceMap.ts +0 -867
  154. package/lib/front_end/core/sdk/SourceMapCache.ts +0 -54
  155. package/lib/front_end/core/sdk/SourceMapFunctionRanges.ts +0 -156
  156. package/lib/front_end/core/sdk/SourceMapManager.ts +0 -239
  157. package/lib/front_end/core/sdk/SourceMapScopeChainEntry.ts +0 -189
  158. package/lib/front_end/core/sdk/SourceMapScopesInfo.ts +0 -508
  159. package/lib/front_end/core/sdk/StorageBucketsModel.ts +0 -204
  160. package/lib/front_end/core/sdk/StorageKeyManager.ts +0 -98
  161. package/lib/front_end/core/sdk/Target.ts +0 -332
  162. package/lib/front_end/core/sdk/TargetManager.ts +0 -453
  163. package/lib/front_end/core/sdk/TraceObject.ts +0 -61
  164. package/lib/front_end/core/sdk/WebAuthnModel.ts +0 -104
  165. package/lib/front_end/core/sdk/sdk.ts +0 -174
  166. package/lib/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -59
  167. package/lib/front_end/generated/InspectorBackendCommands.js +0 -1617
  168. package/lib/front_end/generated/SupportedCSSProperties.js +0 -7512
  169. package/lib/front_end/generated/protocol-proxy-api.d.ts +0 -5022
  170. package/lib/front_end/generated/protocol.ts +0 -22014
  171. package/lib/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -318
  172. package/lib/front_end/models/bindings/CompilerScriptMapping.ts +0 -536
  173. package/lib/front_end/models/bindings/ContentProviderBasedProject.ts +0 -187
  174. package/lib/front_end/models/bindings/DebuggerLanguagePlugins.ts +0 -1197
  175. package/lib/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -733
  176. package/lib/front_end/models/bindings/DefaultScriptMapping.ts +0 -141
  177. package/lib/front_end/models/bindings/FileUtils.ts +0 -228
  178. package/lib/front_end/models/bindings/LiveLocation.ts +0 -81
  179. package/lib/front_end/models/bindings/NetworkProject.ts +0 -157
  180. package/lib/front_end/models/bindings/PresentationConsoleMessageHelper.ts +0 -312
  181. package/lib/front_end/models/bindings/ResourceMapping.ts +0 -539
  182. package/lib/front_end/models/bindings/ResourceScriptMapping.ts +0 -491
  183. package/lib/front_end/models/bindings/ResourceUtils.ts +0 -103
  184. package/lib/front_end/models/bindings/SASSSourceMapping.ts +0 -222
  185. package/lib/front_end/models/bindings/StylesSourceMapping.ts +0 -316
  186. package/lib/front_end/models/bindings/TempFile.ts +0 -67
  187. package/lib/front_end/models/bindings/bindings.ts +0 -39
  188. package/lib/front_end/models/cpu_profile/CPUProfileDataModel.ts +0 -571
  189. package/lib/front_end/models/cpu_profile/ProfileTreeModel.ts +0 -103
  190. package/lib/front_end/models/cpu_profile/cpu_profile.ts +0 -11
  191. package/lib/front_end/models/formatter/FormatterWorkerPool.ts +0 -219
  192. package/lib/front_end/models/formatter/ScriptFormatter.ts +0 -112
  193. package/lib/front_end/models/formatter/formatter.ts +0 -8
  194. package/lib/front_end/models/source_map_scopes/NamesResolver.ts +0 -765
  195. package/lib/front_end/models/source_map_scopes/ScopeChainModel.ts +0 -84
  196. package/lib/front_end/models/source_map_scopes/source_map_scopes.ts +0 -11
  197. package/lib/front_end/models/stack_trace/StackTrace.ts +0 -53
  198. package/lib/front_end/models/stack_trace/StackTraceImpl.ts +0 -85
  199. package/lib/front_end/models/stack_trace/StackTraceModel.ts +0 -128
  200. package/lib/front_end/models/stack_trace/Trie.ts +0 -163
  201. package/lib/front_end/models/stack_trace/stack_trace.ts +0 -9
  202. package/lib/front_end/models/stack_trace/stack_trace_impl.ts +0 -13
  203. package/lib/front_end/models/text_utils/CodeMirrorUtils.ts +0 -37
  204. package/lib/front_end/models/text_utils/ContentData.ts +0 -199
  205. package/lib/front_end/models/text_utils/ContentProvider.ts +0 -68
  206. package/lib/front_end/models/text_utils/StaticContentProvider.ts +0 -49
  207. package/lib/front_end/models/text_utils/StreamingContentData.ts +0 -108
  208. package/lib/front_end/models/text_utils/Text.ts +0 -90
  209. package/lib/front_end/models/text_utils/TextCursor.ts +0 -44
  210. package/lib/front_end/models/text_utils/TextRange.ts +0 -266
  211. package/lib/front_end/models/text_utils/TextUtils.ts +0 -401
  212. package/lib/front_end/models/text_utils/WasmDisassembly.ts +0 -87
  213. package/lib/front_end/models/text_utils/text_utils.ts +0 -27
  214. package/lib/front_end/models/trace/EntityMapper.ts +0 -141
  215. package/lib/front_end/models/trace/EventsSerializer.ts +0 -101
  216. package/lib/front_end/models/trace/LanternComputationData.ts +0 -438
  217. package/lib/front_end/models/trace/ModelImpl.ts +0 -236
  218. package/lib/front_end/models/trace/Name.ts +0 -136
  219. package/lib/front_end/models/trace/Processor.ts +0 -652
  220. package/lib/front_end/models/trace/Styles.ts +0 -1138
  221. package/lib/front_end/models/trace/extras/FilmStrip.ts +0 -78
  222. package/lib/front_end/models/trace/extras/MainThreadActivity.ts +0 -86
  223. package/lib/front_end/models/trace/extras/ScriptDuplication.ts +0 -236
  224. package/lib/front_end/models/trace/extras/StackTraceForEvent.ts +0 -203
  225. package/lib/front_end/models/trace/extras/ThirdParties.ts +0 -164
  226. package/lib/front_end/models/trace/extras/TraceFilter.ts +0 -62
  227. package/lib/front_end/models/trace/extras/TraceTree.ts +0 -701
  228. package/lib/front_end/models/trace/extras/extras.ts +0 -11
  229. package/lib/front_end/models/trace/handlers/AnimationFramesHandler.ts +0 -128
  230. package/lib/front_end/models/trace/handlers/AnimationHandler.ts +0 -36
  231. package/lib/front_end/models/trace/handlers/AsyncJSCallsHandler.ts +0 -239
  232. package/lib/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
  233. package/lib/front_end/models/trace/handlers/DOMStatsHandler.ts +0 -31
  234. package/lib/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -306
  235. package/lib/front_end/models/trace/handlers/FlowsHandler.ts +0 -175
  236. package/lib/front_end/models/trace/handlers/FramesHandler.ts +0 -571
  237. package/lib/front_end/models/trace/handlers/GPUHandler.ts +0 -50
  238. package/lib/front_end/models/trace/handlers/ImagePaintingHandler.ts +0 -183
  239. package/lib/front_end/models/trace/handlers/InitiatorsHandler.ts +0 -193
  240. package/lib/front_end/models/trace/handlers/InvalidationsHandler.ts +0 -168
  241. package/lib/front_end/models/trace/handlers/LargestImagePaintHandler.ts +0 -109
  242. package/lib/front_end/models/trace/handlers/LargestTextPaintHandler.ts +0 -35
  243. package/lib/front_end/models/trace/handlers/LayerTreeHandler.ts +0 -123
  244. package/lib/front_end/models/trace/handlers/LayoutShiftsHandler.ts +0 -573
  245. package/lib/front_end/models/trace/handlers/MemoryHandler.ts +0 -31
  246. package/lib/front_end/models/trace/handlers/MetaHandler.ts +0 -525
  247. package/lib/front_end/models/trace/handlers/ModelHandlers.ts +0 -34
  248. package/lib/front_end/models/trace/handlers/NetworkRequestsHandler.ts +0 -672
  249. package/lib/front_end/models/trace/handlers/PageFramesHandler.ts +0 -52
  250. package/lib/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +0 -460
  251. package/lib/front_end/models/trace/handlers/RendererHandler.ts +0 -428
  252. package/lib/front_end/models/trace/handlers/SamplesHandler.ts +0 -271
  253. package/lib/front_end/models/trace/handlers/ScreenshotsHandler.ts +0 -122
  254. package/lib/front_end/models/trace/handlers/ScriptsHandler.ts +0 -336
  255. package/lib/front_end/models/trace/handlers/SelectorStatsHandler.ts +0 -110
  256. package/lib/front_end/models/trace/handlers/Threads.ts +0 -139
  257. package/lib/front_end/models/trace/handlers/UserInteractionsHandler.ts +0 -400
  258. package/lib/front_end/models/trace/handlers/UserTimingsHandler.ts +0 -233
  259. package/lib/front_end/models/trace/handlers/WarningsHandler.ts +0 -162
  260. package/lib/front_end/models/trace/handlers/WorkersHandler.ts +0 -45
  261. package/lib/front_end/models/trace/handlers/handlers.ts +0 -8
  262. package/lib/front_end/models/trace/handlers/helpers.ts +0 -196
  263. package/lib/front_end/models/trace/handlers/types.ts +0 -75
  264. package/lib/front_end/models/trace/helpers/Extensions.ts +0 -54
  265. package/lib/front_end/models/trace/helpers/Network.ts +0 -129
  266. package/lib/front_end/models/trace/helpers/SamplesIntegrator.ts +0 -544
  267. package/lib/front_end/models/trace/helpers/SyntheticEvents.ts +0 -87
  268. package/lib/front_end/models/trace/helpers/Timing.ts +0 -248
  269. package/lib/front_end/models/trace/helpers/Trace.ts +0 -928
  270. package/lib/front_end/models/trace/helpers/TreeHelpers.ts +0 -320
  271. package/lib/front_end/models/trace/helpers/helpers.ts +0 -11
  272. package/lib/front_end/models/trace/insights/CLSCulprits.ts +0 -668
  273. package/lib/front_end/models/trace/insights/Cache.ts +0 -269
  274. package/lib/front_end/models/trace/insights/Common.ts +0 -453
  275. package/lib/front_end/models/trace/insights/DOMSize.ts +0 -223
  276. package/lib/front_end/models/trace/insights/DocumentLatency.ts +0 -319
  277. package/lib/front_end/models/trace/insights/DuplicatedJavaScript.ts +0 -126
  278. package/lib/front_end/models/trace/insights/FontDisplay.ts +0 -119
  279. package/lib/front_end/models/trace/insights/ForcedReflow.ts +0 -220
  280. package/lib/front_end/models/trace/insights/INPBreakdown.ts +0 -171
  281. package/lib/front_end/models/trace/insights/ImageDelivery.ts +0 -348
  282. package/lib/front_end/models/trace/insights/LCPBreakdown.ts +0 -268
  283. package/lib/front_end/models/trace/insights/LCPDiscovery.ts +0 -237
  284. package/lib/front_end/models/trace/insights/LegacyJavaScript.ts +0 -138
  285. package/lib/front_end/models/trace/insights/Models.ts +0 -22
  286. package/lib/front_end/models/trace/insights/ModernHTTP.ts +0 -257
  287. package/lib/front_end/models/trace/insights/NetworkDependencyTree.ts +0 -726
  288. package/lib/front_end/models/trace/insights/RenderBlocking.ts +0 -257
  289. package/lib/front_end/models/trace/insights/SlowCSSSelector.ts +0 -175
  290. package/lib/front_end/models/trace/insights/Statistics.ts +0 -101
  291. package/lib/front_end/models/trace/insights/ThirdParties.ts +0 -130
  292. package/lib/front_end/models/trace/insights/Viewport.ts +0 -138
  293. package/lib/front_end/models/trace/insights/insights.ts +0 -10
  294. package/lib/front_end/models/trace/insights/types.ts +0 -157
  295. package/lib/front_end/models/trace/lantern/core/LanternError.ts +0 -7
  296. package/lib/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +0 -619
  297. package/lib/front_end/models/trace/lantern/core/core.ts +0 -6
  298. package/lib/front_end/models/trace/lantern/graph/BaseNode.ts +0 -345
  299. package/lib/front_end/models/trace/lantern/graph/CPUNode.ts +0 -80
  300. package/lib/front_end/models/trace/lantern/graph/NetworkNode.ts +0 -101
  301. package/lib/front_end/models/trace/lantern/graph/PageDependencyGraph.ts +0 -636
  302. package/lib/front_end/models/trace/lantern/graph/graph.ts +0 -8
  303. package/lib/front_end/models/trace/lantern/lantern.ts +0 -17
  304. package/lib/front_end/models/trace/lantern/metrics/FirstContentfulPaint.ts +0 -187
  305. package/lib/front_end/models/trace/lantern/metrics/Interactive.ts +0 -88
  306. package/lib/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +0 -92
  307. package/lib/front_end/models/trace/lantern/metrics/MaxPotentialFID.ts +0 -72
  308. package/lib/front_end/models/trace/lantern/metrics/Metric.ts +0 -126
  309. package/lib/front_end/models/trace/lantern/metrics/SpeedIndex.ts +0 -126
  310. package/lib/front_end/models/trace/lantern/metrics/TBTUtils.ts +0 -82
  311. package/lib/front_end/models/trace/lantern/metrics/TotalBlockingTime.ts +0 -112
  312. package/lib/front_end/models/trace/lantern/metrics/metrics.ts +0 -12
  313. package/lib/front_end/models/trace/lantern/simulation/ConnectionPool.ts +0 -150
  314. package/lib/front_end/models/trace/lantern/simulation/Constants.ts +0 -46
  315. package/lib/front_end/models/trace/lantern/simulation/DNSCache.ts +0 -61
  316. package/lib/front_end/models/trace/lantern/simulation/SimulationTimingMap.ts +0 -196
  317. package/lib/front_end/models/trace/lantern/simulation/Simulator.ts +0 -556
  318. package/lib/front_end/models/trace/lantern/simulation/TCPConnection.ts +0 -192
  319. package/lib/front_end/models/trace/lantern/simulation/simulation.ts +0 -10
  320. package/lib/front_end/models/trace/lantern/types/Lantern.ts +0 -220
  321. package/lib/front_end/models/trace/lantern/types/types.ts +0 -5
  322. package/lib/front_end/models/trace/trace.ts +0 -33
  323. package/lib/front_end/models/trace/types/Configuration.ts +0 -110
  324. package/lib/front_end/models/trace/types/Extensions.ts +0 -136
  325. package/lib/front_end/models/trace/types/File.ts +0 -281
  326. package/lib/front_end/models/trace/types/Overlays.ts +0 -138
  327. package/lib/front_end/models/trace/types/Timing.ts +0 -30
  328. package/lib/front_end/models/trace/types/TraceEvents.ts +0 -3277
  329. package/lib/front_end/models/trace/types/types.ts +0 -10
  330. package/lib/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +0 -240
  331. package/lib/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +0 -5
  332. package/lib/front_end/models/workspace/FileManager.ts +0 -97
  333. package/lib/front_end/models/workspace/IgnoreListManager.ts +0 -628
  334. package/lib/front_end/models/workspace/SearchConfig.ts +0 -149
  335. package/lib/front_end/models/workspace/UISourceCode.ts +0 -698
  336. package/lib/front_end/models/workspace/WorkspaceImpl.ts +0 -339
  337. package/lib/front_end/models/workspace/workspace.ts +0 -17
  338. package/lib/front_end/panels/timeline/TimelineUIUtils.ts +0 -1029
  339. package/lib/front_end/panels/timeline/extensions/ExtensionUI.ts +0 -49
  340. package/lib/front_end/panels/timeline/extensions/extensions.ts +0 -9
  341. package/lib/front_end/third_party/codemirror.next/LICENSE +0 -21
  342. package/lib/front_end/third_party/codemirror.next/README.chromium +0 -30
  343. package/lib/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
  344. package/lib/front_end/third_party/codemirror.next/bundle.ts +0 -135
  345. package/lib/front_end/third_party/codemirror.next/chunk/angular.js +0 -2
  346. package/lib/front_end/third_party/codemirror.next/chunk/angular.js.map +0 -1
  347. package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js +0 -2
  348. package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js.map +0 -1
  349. package/lib/front_end/third_party/codemirror.next/chunk/cpp.js +0 -2
  350. package/lib/front_end/third_party/codemirror.next/chunk/cpp.js.map +0 -1
  351. package/lib/front_end/third_party/codemirror.next/chunk/css.js +0 -2
  352. package/lib/front_end/third_party/codemirror.next/chunk/html.js +0 -4
  353. package/lib/front_end/third_party/codemirror.next/chunk/java.js +0 -2
  354. package/lib/front_end/third_party/codemirror.next/chunk/java.js.map +0 -1
  355. package/lib/front_end/third_party/codemirror.next/chunk/javascript.js +0 -2
  356. package/lib/front_end/third_party/codemirror.next/chunk/legacy.js +0 -2
  357. package/lib/front_end/third_party/codemirror.next/chunk/legacy.js.map +0 -1
  358. package/lib/front_end/third_party/codemirror.next/chunk/less.js +0 -2
  359. package/lib/front_end/third_party/codemirror.next/chunk/less.js.map +0 -1
  360. package/lib/front_end/third_party/codemirror.next/chunk/markdown.js +0 -2
  361. package/lib/front_end/third_party/codemirror.next/chunk/markdown.js.map +0 -1
  362. package/lib/front_end/third_party/codemirror.next/chunk/php.js +0 -2
  363. package/lib/front_end/third_party/codemirror.next/chunk/php.js.map +0 -1
  364. package/lib/front_end/third_party/codemirror.next/chunk/python.js +0 -2
  365. package/lib/front_end/third_party/codemirror.next/chunk/python.js.map +0 -1
  366. package/lib/front_end/third_party/codemirror.next/chunk/sass.js +0 -2
  367. package/lib/front_end/third_party/codemirror.next/chunk/sass.js.map +0 -1
  368. package/lib/front_end/third_party/codemirror.next/chunk/svelte.js +0 -2
  369. package/lib/front_end/third_party/codemirror.next/chunk/svelte.js.map +0 -1
  370. package/lib/front_end/third_party/codemirror.next/chunk/vue.js +0 -2
  371. package/lib/front_end/third_party/codemirror.next/chunk/vue.js.map +0 -1
  372. package/lib/front_end/third_party/codemirror.next/chunk/wast.js +0 -2
  373. package/lib/front_end/third_party/codemirror.next/chunk/wast.js.map +0 -1
  374. package/lib/front_end/third_party/codemirror.next/chunk/xml.js +0 -2
  375. package/lib/front_end/third_party/codemirror.next/chunk/xml.js.map +0 -1
  376. package/lib/front_end/third_party/codemirror.next/codemirror.next.d.ts +0 -8057
  377. package/lib/front_end/third_party/codemirror.next/codemirror.next.js +0 -2
  378. package/lib/front_end/third_party/codemirror.next/codemirror.next.js.map +0 -1
  379. package/lib/front_end/third_party/codemirror.next/package.json +0 -43
  380. package/lib/front_end/third_party/codemirror.next/rebuild.sh +0 -6
  381. package/lib/front_end/third_party/codemirror.next/rollup.config.mjs +0 -49
  382. package/lib/front_end/third_party/i18n/LICENSE +0 -202
  383. package/lib/front_end/third_party/i18n/README.chromium +0 -15
  384. package/lib/front_end/third_party/i18n/i18n-impl.ts +0 -61
  385. package/lib/front_end/third_party/i18n/i18n.ts +0 -11
  386. package/lib/front_end/third_party/i18n/localized-string-set.ts +0 -129
  387. package/lib/front_end/third_party/intl-messageformat/LICENSE +0 -33
  388. package/lib/front_end/third_party/intl-messageformat/README.chromium +0 -24
  389. package/lib/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
  390. package/lib/front_end/third_party/intl-messageformat/intl-messageformat.ts +0 -6
  391. package/lib/front_end/third_party/intl-messageformat/package/LICENSE.md +0 -33
  392. package/lib/front_end/third_party/intl-messageformat/package/README.md +0 -3
  393. package/lib/front_end/third_party/intl-messageformat/package/index.d.ts +0 -6
  394. package/lib/front_end/third_party/intl-messageformat/package/index.d.ts.map +0 -1
  395. package/lib/front_end/third_party/intl-messageformat/package/index.js +0 -13
  396. package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.d.ts +0 -5
  397. package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.esm.js +0 -1710
  398. package/lib/front_end/third_party/intl-messageformat/package/intl-messageformat.iife.js +0 -1815
  399. package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts +0 -6
  400. package/lib/front_end/third_party/intl-messageformat/package/lib/index.d.ts.map +0 -1
  401. package/lib/front_end/third_party/intl-messageformat/package/lib/index.js +0 -10
  402. package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts +0 -34
  403. package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.d.ts.map +0 -1
  404. package/lib/front_end/third_party/intl-messageformat/package/lib/src/core.js +0 -229
  405. package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts +0 -28
  406. package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.d.ts.map +0 -1
  407. package/lib/front_end/third_party/intl-messageformat/package/lib/src/error.js +0 -48
  408. package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts +0 -34
  409. package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.d.ts.map +0 -1
  410. package/lib/front_end/third_party/intl-messageformat/package/lib/src/formatters.js +0 -179
  411. package/lib/front_end/third_party/intl-messageformat/package/package.json +0 -42
  412. package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts +0 -34
  413. package/lib/front_end/third_party/intl-messageformat/package/src/core.d.ts.map +0 -1
  414. package/lib/front_end/third_party/intl-messageformat/package/src/core.js +0 -230
  415. package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts +0 -28
  416. package/lib/front_end/third_party/intl-messageformat/package/src/error.d.ts.map +0 -1
  417. package/lib/front_end/third_party/intl-messageformat/package/src/error.js +0 -51
  418. package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts +0 -34
  419. package/lib/front_end/third_party/intl-messageformat/package/src/formatters.d.ts.map +0 -1
  420. package/lib/front_end/third_party/intl-messageformat/package/src/formatters.js +0 -182
  421. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/error.d.ts +0 -79
  422. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/index.d.ts +0 -15
  423. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/parser.d.ts +0 -153
  424. package/lib/front_end/third_party/intl-messageformat/package/src/icu-messageformat-parser/types.d.ts +0 -139
  425. package/lib/front_end/third_party/legacy-javascript/LICENSE +0 -202
  426. package/lib/front_end/third_party/legacy-javascript/README.chromium +0 -13
  427. package/lib/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
  428. package/lib/front_end/third_party/legacy-javascript/legacy-javascript.ts +0 -3
  429. package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.d.ts +0 -18
  430. package/lib/front_end/third_party/legacy-javascript/lib/legacy-javascript.js +0 -943
  431. package/lib/front_end/third_party/legacy-javascript/package.json +0 -8
  432. package/lib/front_end/third_party/legacy-javascript/rebuild.sh +0 -9
  433. package/lib/front_end/third_party/source-map-scopes-codec/LICENSE +0 -26
  434. package/lib/front_end/third_party/source-map-scopes-codec/README.chromium +0 -31
  435. package/lib/front_end/third_party/source-map-scopes-codec/package/CONTRIBUTING.md +0 -33
  436. package/lib/front_end/third_party/source-map-scopes-codec/package/LICENSE +0 -26
  437. package/lib/front_end/third_party/source-map-scopes-codec/package/README.md +0 -64
  438. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts +0 -62
  439. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts.map +0 -1
  440. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts +0 -37
  441. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts.map +0 -1
  442. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +0 -29
  443. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +0 -1
  444. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts +0 -8
  445. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts.map +0 -1
  446. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +0 -6
  447. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +0 -1
  448. package/lib/front_end/third_party/source-map-scopes-codec/package/deno.json +0 -21
  449. package/lib/front_end/third_party/source-map-scopes-codec/package/package.json +0 -14
  450. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js +0 -196
  451. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js.map +0 -1
  452. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.ts +0 -262
  453. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js +0 -235
  454. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js.map +0 -1
  455. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.ts +0 -359
  456. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js +0 -39
  457. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js.map +0 -1
  458. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.ts +0 -53
  459. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +0 -438
  460. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +0 -1
  461. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +0 -539
  462. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js +0 -23
  463. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js.map +0 -1
  464. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.ts +0 -35
  465. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +0 -257
  466. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +0 -1
  467. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +0 -348
  468. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js +0 -8
  469. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js.map +0 -1
  470. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +0 -20
  471. package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes-tsconfig.json +0 -8
  472. package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes.d.ts +0 -184
  473. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js +0 -9
  474. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js.map +0 -1
  475. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.ts +0 -12
  476. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js +0 -82
  477. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js.map +0 -1
  478. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.ts +0 -99
  479. package/lib/front_end/third_party/source-map-scopes-codec/source-map-scopes-codec.ts +0 -5
  480. package/lib/front_end/third_party/third-party-web/LICENSE +0 -20
  481. package/lib/front_end/third_party/third-party-web/README.chromium +0 -13
  482. package/lib/front_end/third_party/third-party-web/lib/nostats-subset.d.ts +0 -2
  483. package/lib/front_end/third_party/third-party-web/lib/nostats-subset.js +0 -149
  484. package/lib/front_end/third_party/third-party-web/package/LICENSE +0 -20
  485. package/lib/front_end/third_party/third-party-web/package/README.md +0 -929
  486. package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive-nostats.json +0 -1
  487. package/lib/front_end/third_party/third-party-web/package/dist/entities-httparchive.json +0 -1
  488. package/lib/front_end/third_party/third-party-web/package/dist/entities-nostats.json +0 -1
  489. package/lib/front_end/third_party/third-party-web/package/dist/entities.json +0 -1
  490. package/lib/front_end/third_party/third-party-web/package/facades.md +0 -46
  491. package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.d.ts +0 -1
  492. package/lib/front_end/third_party/third-party-web/package/httparchive-nostats-subset.js +0 -1
  493. package/lib/front_end/third_party/third-party-web/package/httparchive-subset.d.ts +0 -1
  494. package/lib/front_end/third_party/third-party-web/package/httparchive-subset.js +0 -1
  495. package/lib/front_end/third_party/third-party-web/package/lib/__snapshots__/index.test.js.snap +0 -1006
  496. package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.js +0 -139
  497. package/lib/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.test.js +0 -44
  498. package/lib/front_end/third_party/third-party-web/package/lib/entities.test.js +0 -27
  499. package/lib/front_end/third_party/third-party-web/package/lib/index.d.ts +0 -34
  500. package/lib/front_end/third_party/third-party-web/package/lib/index.js +0 -3
  501. package/lib/front_end/third_party/third-party-web/package/lib/index.test.js +0 -246
  502. package/lib/front_end/third_party/third-party-web/package/lib/markdown/faqs.partial.md +0 -36
  503. package/lib/front_end/third_party/third-party-web/package/lib/markdown/goals.partial.md +0 -9
  504. package/lib/front_end/third_party/third-party-web/package/lib/markdown/methodology.partial.md +0 -5
  505. package/lib/front_end/third_party/third-party-web/package/lib/markdown/template.md +0 -151
  506. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-02-01.md +0 -1
  507. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-03-01.md +0 -1
  508. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-06.md +0 -1
  509. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2019-05-13.md +0 -14
  510. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2021-01-01.md +0 -1
  511. package/lib/front_end/third_party/third-party-web/package/lib/markdown/updates/2024-07-01.md +0 -3
  512. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.d.ts +0 -1
  513. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.js +0 -3
  514. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.d.ts +0 -1
  515. package/lib/front_end/third_party/third-party-web/package/lib/subsets/httparchive.js +0 -3
  516. package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.d.ts +0 -1
  517. package/lib/front_end/third_party/third-party-web/package/lib/subsets/nostats.js +0 -3
  518. package/lib/front_end/third_party/third-party-web/package/nostats-subset.d.ts +0 -1
  519. package/lib/front_end/third_party/third-party-web/package/nostats-subset.js +0 -1
  520. package/lib/front_end/third_party/third-party-web/package/package.json +0 -46
  521. package/lib/front_end/third_party/third-party-web/package.json +0 -8
  522. package/lib/front_end/third_party/third-party-web/rebuild.sh +0 -13
  523. package/lib/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
  524. package/lib/front_end/third_party/third-party-web/third-party-web.ts +0 -3
  525. package/lib/front_end/ui/legacy/theme_support/ThemeSupport.ts +0 -222
  526. package/lib/front_end/ui/legacy/theme_support/theme_support.ts +0 -5
  527. package/patches/chrome-devtools-frontend+1.0.1533544.patch +0 -1716
@@ -1,619 +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 type * as Lantern from '../types/types.js';
6
-
7
- import {LanternError} from './LanternError.js';
8
-
9
- class UrlUtils {
10
- /**
11
- * There is fancy URL rewriting logic for the chrome://settings page that we need to work around.
12
- * Why? Special handling was added by Chrome team to allow a pushState transition between chrome:// pages.
13
- * As a result, the network URL (chrome://chrome/settings/) doesn't match the final document URL (chrome://settings/).
14
- */
15
- static rewriteChromeInternalUrl(url: string): string {
16
- if (!url?.startsWith('chrome://')) {
17
- return url;
18
- }
19
- // Chrome adds a trailing slash to `chrome://` URLs, but the spec does not.
20
- // https://github.com/GoogleChrome/lighthouse/pull/3941#discussion_r154026009
21
- if (url.endsWith('/')) {
22
- url = url.replace(/\/$/, '');
23
- }
24
- return url.replace(/^chrome:\/\/chrome\//, 'chrome://');
25
- }
26
-
27
- /**
28
- * Determine if url1 equals url2, ignoring URL fragments.
29
- */
30
- static equalWithExcludedFragments(url1: string, url2: string): boolean {
31
- [url1, url2] = [url1, url2].map(this.rewriteChromeInternalUrl);
32
- try {
33
- const urla = new URL(url1);
34
- urla.hash = '';
35
-
36
- const urlb = new URL(url2);
37
- urlb.hash = '';
38
-
39
- return urla.href === urlb.href;
40
- } catch {
41
- return false;
42
- }
43
- }
44
- }
45
-
46
- interface Summary {
47
- min: number;
48
- max: number;
49
- avg: number;
50
- median: number;
51
- }
52
-
53
- interface RTTEstimateOptions {
54
- /**
55
- * TCP connection handshake information will be used when available, but in
56
- * some circumstances this data can be unreliable. This flag exposes an
57
- * option to ignore the handshake data and use the coarse download/TTFB timing data.
58
- */
59
- forceCoarseEstimates?: boolean;
60
- /**
61
- * Coarse estimates include lots of extra time and noise multiply by some factor
62
- * to deflate the estimates a bit.
63
- */
64
- coarseEstimateMultiplier?: number;
65
- /** Useful for testing to isolate the different methods of estimation. */
66
- useDownloadEstimates?: boolean;
67
- /** Useful for testing to isolate the different methods of estimation. */
68
- useSendStartEstimates?: boolean;
69
- /** Useful for testing to isolate the different methods of estimation. */
70
- useHeadersEndEstimates?: boolean;
71
- }
72
-
73
- interface RequestInfo {
74
- request: Lantern.NetworkRequest;
75
- timing: Lantern.ResourceTiming;
76
- connectionReused?: boolean;
77
- }
78
-
79
- const INITIAL_CWD = 14 * 1024;
80
-
81
- // Assume that 40% of TTFB was server response time by default for static assets
82
- const DEFAULT_SERVER_RESPONSE_PERCENTAGE = 0.4;
83
-
84
- /**
85
- * For certain resource types, server response time takes up a greater percentage of TTFB (dynamic
86
- * assets like HTML documents, XHR/API calls, etc)
87
- */
88
- const SERVER_RESPONSE_PERCENTAGE_OF_TTFB: Partial<Record<Lantern.ResourceType, number>> = {
89
- Document: 0.9,
90
- XHR: 0.9,
91
- Fetch: 0.9,
92
- };
93
-
94
- class NetworkAnalyzer {
95
- static get summary(): string {
96
- return '__SUMMARY__';
97
- }
98
-
99
- static groupByOrigin(records: Lantern.NetworkRequest[]): Map<string, Lantern.NetworkRequest[]> {
100
- const grouped = new Map();
101
- records.forEach(item => {
102
- const key = item.parsedURL.securityOrigin;
103
- const group = grouped.get(key) || [];
104
- group.push(item);
105
- grouped.set(key, group);
106
- });
107
- return grouped;
108
- }
109
-
110
- static getSummary(values: number[]): Summary {
111
- values.sort((a, b) => a - b);
112
-
113
- let median;
114
- if (values.length === 0) {
115
- median = values[0];
116
- } else if (values.length % 2 === 0) {
117
- const a = values[Math.floor((values.length - 1) / 2)];
118
- const b = values[Math.floor((values.length - 1) / 2) + 1];
119
- median = (a + b) / 2;
120
- } else {
121
- median = values[Math.floor((values.length - 1) / 2)];
122
- }
123
-
124
- return {
125
- min: values[0],
126
- max: values[values.length - 1],
127
- avg: values.reduce((a, b) => a + b, 0) / values.length,
128
- median,
129
- };
130
- }
131
-
132
- static summarize(values: Map<string, number[]>): Map<string, Summary> {
133
- const summaryByKey = new Map();
134
- const allEstimates = [];
135
- for (const [key, estimates] of values) {
136
- summaryByKey.set(key, NetworkAnalyzer.getSummary(estimates));
137
- allEstimates.push(...estimates);
138
- }
139
-
140
- summaryByKey.set(NetworkAnalyzer.summary, NetworkAnalyzer.getSummary(allEstimates));
141
- return summaryByKey;
142
- }
143
-
144
- static estimateValueByOrigin(
145
- requests: Lantern.NetworkRequest[],
146
- iteratee: (e: RequestInfo) => number | number[] | undefined): Map<string, number[]> {
147
- const connectionWasReused = NetworkAnalyzer.estimateIfConnectionWasReused(requests);
148
- const groupedByOrigin = NetworkAnalyzer.groupByOrigin(requests);
149
-
150
- const estimates = new Map();
151
- for (const [origin, originRequests] of groupedByOrigin.entries()) {
152
- let originEstimates: number[] = [];
153
-
154
- for (const request of originRequests) {
155
- const timing = request.timing;
156
- if (!timing) {
157
- continue;
158
- }
159
-
160
- const value = iteratee({
161
- request,
162
- timing,
163
- connectionReused: connectionWasReused.get(request.requestId),
164
- });
165
- if (typeof value !== 'undefined') {
166
- originEstimates = originEstimates.concat(value);
167
- }
168
- }
169
-
170
- if (!originEstimates.length) {
171
- continue;
172
- }
173
- estimates.set(origin, originEstimates);
174
- }
175
-
176
- return estimates;
177
- }
178
-
179
- /**
180
- * Estimates the observed RTT to each origin based on how long the connection setup.
181
- * For h1 and h2, this could includes two estimates - one for the TCP handshake, another for
182
- * SSL negotiation.
183
- * For h3, we get only one estimate since QUIC establishes a secure connection in a
184
- * single handshake.
185
- * This is the most accurate and preferred method of measurement when the data is available.
186
- */
187
- static estimateRTTViaConnectionTiming(info: RequestInfo): number[]|number|undefined {
188
- const {timing, connectionReused, request} = info;
189
- if (connectionReused) {
190
- return;
191
- }
192
-
193
- const {connectStart, sslStart, sslEnd, connectEnd} = timing;
194
- if (connectEnd >= 0 && connectStart >= 0 && request.protocol.startsWith('h3')) {
195
- // These values are equal to sslStart and sslEnd for h3.
196
- return connectEnd - connectStart;
197
- }
198
- if (sslStart >= 0 && sslEnd >= 0 && sslStart !== connectStart) {
199
- // SSL can also be more than 1 RT but assume False Start was used.
200
- return [connectEnd - sslStart, sslStart - connectStart];
201
- }
202
- if (connectStart >= 0 && connectEnd >= 0) {
203
- return connectEnd - connectStart;
204
- }
205
-
206
- return;
207
- }
208
-
209
- /**
210
- * Estimates the observed RTT to each origin based on how long a download took on a fresh connection.
211
- * NOTE: this will tend to overestimate the actual RTT quite significantly as the download can be
212
- * slow for other reasons as well such as bandwidth constraints.
213
- */
214
- static estimateRTTViaDownloadTiming(info: RequestInfo): number|undefined {
215
- const {timing, connectionReused, request} = info;
216
- if (connectionReused) {
217
- return;
218
- }
219
-
220
- // Only look at downloads that went past the initial congestion window
221
- if (request.transferSize <= INITIAL_CWD) {
222
- return;
223
- }
224
- if (!Number.isFinite(timing.receiveHeadersEnd) || timing.receiveHeadersEnd < 0) {
225
- return;
226
- }
227
-
228
- // Compute the amount of time downloading everything after the first congestion window took
229
- const totalTime = request.networkEndTime - request.networkRequestTime;
230
- const downloadTimeAfterFirstByte = totalTime - timing.receiveHeadersEnd;
231
- const numberOfRoundTrips = Math.log2(request.transferSize / INITIAL_CWD);
232
-
233
- // Ignore requests that required a high number of round trips since bandwidth starts to play
234
- // a larger role than latency
235
- if (numberOfRoundTrips > 5) {
236
- return;
237
- }
238
-
239
- return downloadTimeAfterFirstByte / numberOfRoundTrips;
240
- }
241
-
242
- /**
243
- * Estimates the observed RTT to each origin based on how long it took until Chrome could
244
- * start sending the actual request when a new connection was required.
245
- * NOTE: this will tend to overestimate the actual RTT as the request can be delayed for other
246
- * reasons as well such as more SSL handshakes if TLS False Start is not enabled.
247
- */
248
- static estimateRTTViaSendStartTiming(info: RequestInfo): number|undefined {
249
- const {timing, connectionReused, request} = info;
250
- if (connectionReused) {
251
- return;
252
- }
253
-
254
- if (!Number.isFinite(timing.sendStart) || timing.sendStart < 0) {
255
- return;
256
- }
257
-
258
- // Assume everything before sendStart was just DNS + (SSL)? + TCP handshake
259
- // 1 RT for DNS, 1 RT (maybe) for SSL, 1 RT for TCP
260
- let roundTrips = 1;
261
- // TCP
262
- if (!request.protocol.startsWith('h3')) {
263
- roundTrips += 1;
264
- }
265
- if (request.parsedURL.scheme === 'https') {
266
- roundTrips += 1;
267
- }
268
- return timing.sendStart / roundTrips;
269
- }
270
-
271
- /**
272
- * Estimates the observed RTT to each origin based on how long it took until Chrome received the
273
- * headers of the response (~TTFB).
274
- * NOTE: this is the most inaccurate way to estimate the RTT, but in some environments it's all
275
- * we have access to :(
276
- */
277
- static estimateRTTViaHeadersEndTiming(info: RequestInfo): number|undefined {
278
- const {timing, connectionReused, request} = info;
279
- if (!Number.isFinite(timing.receiveHeadersEnd) || timing.receiveHeadersEnd < 0) {
280
- return;
281
- }
282
- if (!request.resourceType) {
283
- return;
284
- }
285
-
286
- const serverResponseTimePercentage =
287
- SERVER_RESPONSE_PERCENTAGE_OF_TTFB[request.resourceType] || DEFAULT_SERVER_RESPONSE_PERCENTAGE;
288
- const estimatedServerResponseTime = timing.receiveHeadersEnd * serverResponseTimePercentage;
289
-
290
- // When connection was reused...
291
- // TTFB = 1 RT for request + server response time
292
- let roundTrips = 1;
293
-
294
- // When connection was fresh...
295
- // TTFB = DNS + (SSL)? + TCP handshake + 1 RT for request + server response time
296
- if (!connectionReused) {
297
- roundTrips += 1; // DNS
298
- if (!request.protocol.startsWith('h3')) {
299
- roundTrips += 1; // TCP
300
- }
301
- if (request.parsedURL.scheme === 'https') {
302
- roundTrips += 1; // SSL
303
- }
304
- }
305
-
306
- // subtract out our estimated server response time
307
- return Math.max((timing.receiveHeadersEnd - estimatedServerResponseTime) / roundTrips, 3);
308
- }
309
-
310
- /**
311
- * Given the RTT to each origin, estimates the observed server response times.
312
- */
313
- static estimateResponseTimeByOrigin(records: Lantern.NetworkRequest[], rttByOrigin: Map<string, number>):
314
- Map<string, number[]> {
315
- return NetworkAnalyzer.estimateValueByOrigin(records, ({request, timing}) => {
316
- if (request.serverResponseTime !== undefined) {
317
- return request.serverResponseTime;
318
- }
319
-
320
- if (!Number.isFinite(timing.receiveHeadersEnd) || timing.receiveHeadersEnd < 0) {
321
- return;
322
- }
323
- if (!Number.isFinite(timing.sendEnd) || timing.sendEnd < 0) {
324
- return;
325
- }
326
-
327
- const ttfb = timing.receiveHeadersEnd - timing.sendEnd;
328
- const origin = request.parsedURL.securityOrigin;
329
- const rtt = rttByOrigin.get(origin) || rttByOrigin.get(NetworkAnalyzer.summary) || 0;
330
- return Math.max(ttfb - rtt, 0);
331
- });
332
- }
333
-
334
- static canTrustConnectionInformation(requests: Lantern.NetworkRequest[]): boolean {
335
- const connectionIdWasStarted = new Map();
336
- for (const request of requests) {
337
- const started = connectionIdWasStarted.get(request.connectionId) || !request.connectionReused;
338
- connectionIdWasStarted.set(request.connectionId, started);
339
- }
340
-
341
- // We probably can't trust the network information if all the connection IDs were the same
342
- if (connectionIdWasStarted.size <= 1) {
343
- return false;
344
- }
345
- // Or if there were connections that were always reused (a connection had to have started at some point)
346
- return Array.from(connectionIdWasStarted.values()).every(started => started);
347
- }
348
-
349
- /**
350
- * Returns a map of requestId -> connectionReused, estimating the information if the information
351
- * available in the records themselves appears untrustworthy.
352
- */
353
- static estimateIfConnectionWasReused(records: Lantern.NetworkRequest[], options?: {forceCoarseEstimates: boolean}):
354
- Map<string, boolean> {
355
- const {forceCoarseEstimates = false} = options || {};
356
-
357
- // Check if we can trust the connection information coming from the protocol
358
- if (!forceCoarseEstimates && NetworkAnalyzer.canTrustConnectionInformation(records)) {
359
- return new Map(records.map(request => [request.requestId, Boolean(request.connectionReused)]));
360
- }
361
-
362
- // Otherwise we're on our own, a request may not have needed a fresh connection if...
363
- // - It was not the first request to the domain
364
- // - It was H2
365
- // - It was after the first request to the domain ended
366
- const connectionWasReused = new Map();
367
- const groupedByOrigin = NetworkAnalyzer.groupByOrigin(records);
368
- for (const originRecords of groupedByOrigin.values()) {
369
- const earliestReusePossible =
370
- originRecords.map(request => request.networkEndTime).reduce((a, b) => Math.min(a, b), Infinity);
371
-
372
- for (const request of originRecords) {
373
- connectionWasReused.set(
374
- request.requestId,
375
- request.networkRequestTime >= earliestReusePossible || request.protocol === 'h2',
376
- );
377
- }
378
-
379
- const firstRecord = originRecords.reduce((a, b) => {
380
- return a.networkRequestTime > b.networkRequestTime ? b : a;
381
- });
382
- connectionWasReused.set(firstRecord.requestId, false);
383
- }
384
-
385
- return connectionWasReused;
386
- }
387
-
388
- /**
389
- * Estimates the RTT to each origin by examining observed network timing information.
390
- * Attempts to use the most accurate information first and falls back to coarser estimates when it
391
- * is unavailable.
392
- */
393
- static estimateRTTByOrigin(records: Lantern.NetworkRequest[], options?: RTTEstimateOptions): Map<string, Summary> {
394
- const {
395
- forceCoarseEstimates = false,
396
- // coarse estimates include lots of extra time and noise
397
- // multiply by some factor to deflate the estimates a bit.
398
- coarseEstimateMultiplier = 0.3,
399
- useDownloadEstimates = true,
400
- useSendStartEstimates = true,
401
- useHeadersEndEstimates = true,
402
- } = options || {};
403
-
404
- const connectionWasReused = NetworkAnalyzer.estimateIfConnectionWasReused(records);
405
- const groupedByOrigin = NetworkAnalyzer.groupByOrigin(records);
406
-
407
- const estimatesByOrigin = new Map();
408
- for (const [origin, originRequests] of groupedByOrigin.entries()) {
409
- const originEstimates: number[] = [];
410
-
411
- function collectEstimates(estimator: (e: RequestInfo) => number[] | number | undefined, multiplier = 1): void {
412
- for (const request of originRequests) {
413
- const timing = request.timing;
414
- if (!timing || !request.transferSize) {
415
- continue;
416
- }
417
-
418
- const estimates = estimator({
419
- request,
420
- timing,
421
- connectionReused: connectionWasReused.get(request.requestId),
422
- });
423
- if (estimates === undefined) {
424
- continue;
425
- }
426
-
427
- if (!Array.isArray(estimates)) {
428
- originEstimates.push(estimates * multiplier);
429
- } else {
430
- originEstimates.push(...estimates.map(e => e * multiplier));
431
- }
432
- }
433
- }
434
-
435
- if (!forceCoarseEstimates) {
436
- collectEstimates(this.estimateRTTViaConnectionTiming);
437
- }
438
-
439
- // Connection timing can be missing for a few reasons:
440
- // - Origin was preconnected, which we don't have instrumentation for.
441
- // - Trace began recording after a connection has already been established (for example, in timespan mode)
442
- // - Perhaps Chrome established a connection already in the background (service worker? Just guessing here)
443
- // - Not provided in LR netstack.
444
- if (!originEstimates.length) {
445
- if (useDownloadEstimates) {
446
- collectEstimates(this.estimateRTTViaDownloadTiming, coarseEstimateMultiplier);
447
- }
448
- if (useSendStartEstimates) {
449
- collectEstimates(this.estimateRTTViaSendStartTiming, coarseEstimateMultiplier);
450
- }
451
- if (useHeadersEndEstimates) {
452
- collectEstimates(this.estimateRTTViaHeadersEndTiming, coarseEstimateMultiplier);
453
- }
454
- }
455
-
456
- if (originEstimates.length) {
457
- estimatesByOrigin.set(origin, originEstimates);
458
- }
459
- }
460
-
461
- if (!estimatesByOrigin.size) {
462
- throw new LanternError('No timing information available');
463
- }
464
- return NetworkAnalyzer.summarize(estimatesByOrigin);
465
- }
466
-
467
- /**
468
- * Estimates the server response time of each origin. RTT times can be passed in or will be
469
- * estimated automatically if not provided.
470
- */
471
- static estimateServerResponseTimeByOrigin(records: Lantern.NetworkRequest[], options?: RTTEstimateOptions&{
472
- rttByOrigin?: Map<string, number>,
473
- }): Map<string, Summary> {
474
- let rttByOrigin = options?.rttByOrigin;
475
- if (!rttByOrigin) {
476
- rttByOrigin = new Map();
477
-
478
- const rttSummaryByOrigin = NetworkAnalyzer.estimateRTTByOrigin(records, options);
479
- for (const [origin, summary] of rttSummaryByOrigin.entries()) {
480
- rttByOrigin.set(origin, summary.min);
481
- }
482
- }
483
-
484
- const estimatesByOrigin = NetworkAnalyzer.estimateResponseTimeByOrigin(records, rttByOrigin);
485
- return NetworkAnalyzer.summarize(estimatesByOrigin);
486
- }
487
-
488
- /**
489
- * Computes the average throughput for the given requests in bits/second.
490
- * Excludes data URI, failed or otherwise incomplete, and cached requests.
491
- * Returns null if there were no analyzable network requests.
492
- */
493
- static estimateThroughput(records: Lantern.NetworkRequest[]): number|null {
494
- let totalBytes = 0;
495
-
496
- // We will measure throughput by summing the total bytes downloaded by the total time spent
497
- // downloading those bytes. We slice up all the network requests into start/end boundaries, so
498
- // it's easier to deal with the gaps in downloading.
499
- const timeBoundaries = records
500
- .reduce(
501
- (boundaries, request) => {
502
- const scheme = request.parsedURL?.scheme;
503
- // Requests whose bodies didn't come over the network or didn't completely finish will mess
504
- // with the computation, just skip over them.
505
- if (scheme === 'data' || request.failed || !request.finished ||
506
- request.statusCode > 300 || !request.transferSize) {
507
- return boundaries;
508
- }
509
-
510
- // If we've made it this far, all the times we need should be valid (i.e. not undefined/-1).
511
- totalBytes += request.transferSize;
512
- boundaries.push({time: request.responseHeadersEndTime / 1000, isStart: true});
513
- boundaries.push({time: request.networkEndTime / 1000, isStart: false});
514
- return boundaries;
515
- },
516
- [] as Array<{time: number, isStart: boolean}>)
517
- .sort((a, b) => a.time - b.time);
518
-
519
- if (!timeBoundaries.length) {
520
- return null;
521
- }
522
-
523
- let inflight = 0;
524
- let currentStart = 0;
525
- let totalDuration = 0;
526
-
527
- timeBoundaries.forEach(boundary => {
528
- if (boundary.isStart) {
529
- if (inflight === 0) {
530
- // We just ended a quiet period, keep track of when the download period started
531
- currentStart = boundary.time;
532
- }
533
- inflight++;
534
- } else {
535
- inflight--;
536
- if (inflight === 0) {
537
- // We just entered a quiet period, update our duration with the time we spent downloading
538
- totalDuration += boundary.time - currentStart;
539
- }
540
- }
541
- });
542
-
543
- return totalBytes * 8 / totalDuration;
544
- }
545
-
546
- static computeRTTAndServerResponseTime(records: Lantern.NetworkRequest[]):
547
- {rtt: number, additionalRttByOrigin: Map<string, number>, serverResponseTimeByOrigin: Map<string, number>} {
548
- // First pass compute the estimated observed RTT to each origin's servers.
549
- const rttByOrigin = new Map<string, number>();
550
- for (const [origin, summary] of NetworkAnalyzer.estimateRTTByOrigin(records).entries()) {
551
- rttByOrigin.set(origin, summary.min);
552
- }
553
-
554
- // We'll use the minimum RTT as the assumed connection latency since we care about how much addt'l
555
- // latency each origin introduces as Lantern will be simulating with its own connection latency.
556
- const minimumRtt = Math.min(...Array.from(rttByOrigin.values()));
557
- // We'll use the observed RTT information to help estimate the server response time
558
- const responseTimeSummaries = NetworkAnalyzer.estimateServerResponseTimeByOrigin(records, {
559
- rttByOrigin,
560
- });
561
-
562
- const additionalRttByOrigin = new Map<string, number>();
563
- const serverResponseTimeByOrigin = new Map<string, number>();
564
- for (const [origin, summary] of responseTimeSummaries.entries()) {
565
- // Not all origins have usable timing data, we'll default to using no additional latency.
566
- const rttForOrigin = rttByOrigin.get(origin) || minimumRtt;
567
- additionalRttByOrigin.set(origin, rttForOrigin - minimumRtt);
568
- serverResponseTimeByOrigin.set(origin, summary.median);
569
- }
570
-
571
- return {
572
- rtt: minimumRtt,
573
- additionalRttByOrigin,
574
- serverResponseTimeByOrigin,
575
- };
576
- }
577
-
578
- static analyze(records: Lantern.NetworkRequest[]): Lantern.Simulation.Settings['networkAnalysis']|null {
579
- const throughput = NetworkAnalyzer.estimateThroughput(records);
580
- if (throughput === null) {
581
- return null;
582
- }
583
-
584
- return {
585
- throughput,
586
- ...NetworkAnalyzer.computeRTTAndServerResponseTime(records),
587
- };
588
- }
589
-
590
- static findResourceForUrl<T extends Lantern.NetworkRequest>(records: T[], resourceUrl: string): T|undefined {
591
- // equalWithExcludedFragments is expensive, so check that the resourceUrl starts with the request url first
592
- return records.find(
593
- request => resourceUrl.startsWith(request.url) && UrlUtils.equalWithExcludedFragments(request.url, resourceUrl),
594
- );
595
- }
596
-
597
- static findLastDocumentForUrl<T extends Lantern.NetworkRequest>(records: T[], resourceUrl: string): T|undefined {
598
- // equalWithExcludedFragments is expensive, so check that the resourceUrl starts with the request url first
599
- const matchingRequests = records.filter(
600
- request => request.resourceType === 'Document' && !request.failed &&
601
- // Note: `request.url` should never have a fragment, else this optimization gives wrong results.
602
- resourceUrl.startsWith(request.url) && UrlUtils.equalWithExcludedFragments(request.url, resourceUrl),
603
- );
604
- return matchingRequests[matchingRequests.length - 1];
605
- }
606
-
607
- /**
608
- * Resolves redirect chain given a main document.
609
- * See: {@link NetworkAnalyzer.findLastDocumentForUrl} for how to retrieve main document.
610
- */
611
- static resolveRedirects<T extends Lantern.NetworkRequest>(request: T): T {
612
- while (request.redirectDestination) {
613
- request = request.redirectDestination as T;
614
- }
615
- return request;
616
- }
617
- }
618
-
619
- export {NetworkAnalyzer};
@@ -1,6 +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
- export * from './LanternError.js';
6
- export * from './NetworkAnalyzer.js';