devtools-tracing 1.2.1 → 1.3.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.
Files changed (342) hide show
  1. package/.vscode/launch.json +20 -0
  2. package/README.md +57 -2
  3. package/dist/index.d.ts +4 -1
  4. package/dist/index.js +76804 -18793
  5. package/dist/lib/front_end/core/common/App.d.ts +3 -0
  6. package/dist/lib/front_end/core/common/AppProvider.d.ts +12 -0
  7. package/dist/lib/front_end/core/common/Base64.d.ts +11 -0
  8. package/dist/lib/front_end/core/common/CharacterIdMap.d.ts +5 -0
  9. package/dist/lib/front_end/core/common/Color.d.ts +383 -0
  10. package/dist/lib/front_end/core/common/ColorConverter.d.ts +24 -0
  11. package/dist/lib/front_end/core/common/ColorUtils.d.ts +45 -0
  12. package/dist/lib/front_end/core/common/Console.d.ts +54 -0
  13. package/dist/lib/front_end/core/common/Debouncer.d.ts +6 -0
  14. package/dist/lib/front_end/core/common/EventTarget.d.ts +23 -0
  15. package/dist/lib/front_end/core/common/Gzip.d.ts +21 -0
  16. package/dist/lib/front_end/core/common/JavaScriptMetaData.d.ts +20 -0
  17. package/dist/lib/front_end/core/common/Lazy.d.ts +4 -0
  18. package/dist/lib/front_end/core/common/MapWithDefault.d.ts +9 -0
  19. package/dist/lib/front_end/core/common/Mutex.d.ts +13 -0
  20. package/dist/lib/front_end/core/common/Object.d.ts +25 -0
  21. package/dist/lib/front_end/core/common/ParsedURL.d.ts +87 -0
  22. package/dist/lib/front_end/core/common/Progress.d.ts +47 -0
  23. package/dist/lib/front_end/core/common/ResolverBase.d.ts +29 -0
  24. package/dist/lib/front_end/core/common/ResourceType.d.ts +89 -0
  25. package/dist/lib/front_end/core/common/ReturnToPanel.d.ts +10 -0
  26. package/dist/lib/front_end/core/common/Revealer.d.ts +79 -0
  27. package/dist/lib/front_end/core/common/Runnable.d.ts +14 -0
  28. package/dist/lib/front_end/core/common/SegmentedRange.d.ts +14 -0
  29. package/dist/lib/front_end/core/common/SettingRegistration.d.ts +175 -0
  30. package/dist/lib/front_end/core/common/Settings.d.ts +168 -0
  31. package/dist/lib/front_end/core/common/SimpleHistoryManager.d.ts +20 -0
  32. package/dist/lib/front_end/core/common/Srcset.d.ts +16 -0
  33. package/dist/lib/front_end/core/common/StringOutputStream.d.ts +10 -0
  34. package/dist/lib/front_end/core/common/TextDictionary.d.ts +11 -0
  35. package/dist/lib/front_end/core/common/Throttler.d.ts +12 -0
  36. package/dist/lib/front_end/core/common/Trie.d.ts +24 -0
  37. package/dist/lib/front_end/core/common/VersionController.d.ts +80 -0
  38. package/dist/lib/front_end/core/common/common.d.ts +35 -0
  39. package/dist/lib/front_end/core/host/AidaClient.d.ts +369 -0
  40. package/dist/lib/front_end/core/host/AidaGcaTranslation.d.ts +9 -0
  41. package/dist/lib/front_end/core/host/DispatchHttpRequestClient.d.ts +14 -0
  42. package/dist/lib/front_end/core/host/GcaTypes.d.ts +405 -0
  43. package/dist/lib/front_end/core/host/GdpClient.d.ts +84 -0
  44. package/dist/lib/front_end/core/host/InspectorFrontendHost.d.ts +29 -0
  45. package/dist/lib/front_end/core/host/InspectorFrontendHostAPI.d.ts +414 -0
  46. package/dist/lib/front_end/core/host/InspectorFrontendHostStub.d.ts +151 -0
  47. package/dist/lib/front_end/core/host/Platform.d.ts +11 -0
  48. package/dist/lib/front_end/core/host/ResourceLoader.d.ts +15 -0
  49. package/dist/lib/front_end/core/host/UserMetrics.d.ts +935 -0
  50. package/dist/lib/front_end/core/host/host.d.ts +12 -0
  51. package/dist/lib/front_end/core/i18n/ByteUtilities.d.ts +11 -0
  52. package/dist/lib/front_end/core/i18n/DevToolsLocale.d.ts +41 -0
  53. package/dist/lib/front_end/core/i18n/NumberFormatter.d.ts +11 -0
  54. package/dist/lib/front_end/core/i18n/i18n.d.ts +6 -0
  55. package/dist/lib/front_end/core/i18n/i18nImpl.d.ts +64 -0
  56. package/dist/lib/front_end/core/i18n/i18nTypes.d.ts +5 -0
  57. package/dist/lib/front_end/core/i18n/time-utilities.d.ts +16 -0
  58. package/dist/lib/front_end/core/platform/ArrayUtilities.d.ts +69 -0
  59. package/dist/lib/front_end/core/platform/Brand.d.ts +21 -0
  60. package/dist/lib/front_end/core/platform/Constructor.d.ts +3 -0
  61. package/dist/lib/front_end/core/platform/DateUtilities.d.ts +2 -0
  62. package/dist/lib/front_end/core/platform/DevToolsPath.d.ts +44 -0
  63. package/dist/lib/front_end/core/platform/HostRuntime.d.ts +3 -0
  64. package/dist/lib/front_end/core/platform/KeyboardUtilities.d.ts +21 -0
  65. package/dist/lib/front_end/core/platform/MapUtilities.d.ts +19 -0
  66. package/dist/lib/front_end/core/platform/MimeType.d.ts +28 -0
  67. package/dist/lib/front_end/core/platform/NumberUtilities.d.ts +14 -0
  68. package/dist/lib/front_end/core/platform/StringUtilities.d.ts +77 -0
  69. package/dist/lib/front_end/core/platform/Timing.d.ts +6 -0
  70. package/dist/lib/front_end/core/platform/TypedArrayUtilities.d.ts +34 -0
  71. package/dist/lib/front_end/core/platform/TypescriptUtilities.d.ts +66 -0
  72. package/dist/lib/front_end/core/platform/UIString.d.ts +3 -0
  73. package/dist/lib/front_end/core/platform/UserVisibleError.d.ts +12 -0
  74. package/dist/lib/front_end/core/platform/api/HostRuntime.d.ts +33 -0
  75. package/dist/lib/front_end/core/platform/api/api.d.ts +2 -0
  76. package/dist/lib/front_end/core/platform/platform.d.ts +18 -0
  77. package/dist/lib/front_end/core/protocol_client/CDPConnection.d.ts +77 -0
  78. package/dist/lib/front_end/core/protocol_client/ConnectionTransport.d.ts +9 -0
  79. package/dist/lib/front_end/core/protocol_client/DevToolsCDPConnection.d.ts +19 -0
  80. package/dist/lib/front_end/core/protocol_client/InspectorBackend.d.ts +221 -0
  81. package/dist/lib/front_end/core/protocol_client/protocol_client.d.ts +5 -0
  82. package/dist/lib/front_end/core/root/DevToolsContext.d.ts +34 -0
  83. package/dist/lib/front_end/core/root/ExperimentNames.d.ts +19 -0
  84. package/dist/lib/front_end/core/root/Runtime.d.ts +339 -0
  85. package/dist/lib/front_end/core/root/root.d.ts +4 -0
  86. package/dist/lib/front_end/core/sdk/AccessibilityModel.d.ts +68 -0
  87. package/dist/lib/front_end/core/sdk/AnimationModel.d.ts +161 -0
  88. package/dist/lib/front_end/core/sdk/AutofillModel.d.ts +23 -0
  89. package/dist/lib/front_end/core/sdk/CPUProfilerModel.d.ts +42 -0
  90. package/dist/lib/front_end/core/sdk/CPUThrottlingManager.d.ts +57 -0
  91. package/dist/lib/front_end/core/sdk/CSSContainerQuery.d.ts +41 -0
  92. package/dist/lib/front_end/core/sdk/CSSFontFace.d.ts +10 -0
  93. package/dist/lib/front_end/core/sdk/CSSLayer.d.ts +9 -0
  94. package/dist/lib/front_end/core/sdk/CSSMatchedStyles.d.ts +116 -0
  95. package/dist/lib/front_end/core/sdk/CSSMedia.d.ts +36 -0
  96. package/dist/lib/front_end/core/sdk/CSSMetadata.d.ts +85 -0
  97. package/dist/lib/front_end/core/sdk/CSSModel.d.ts +186 -0
  98. package/dist/lib/front_end/core/sdk/CSSNavigation.d.ts +10 -0
  99. package/dist/lib/front_end/core/sdk/CSSProperty.d.ts +53 -0
  100. package/dist/lib/front_end/core/sdk/CSSPropertyParser.d.ts +140 -0
  101. package/dist/lib/front_end/core/sdk/CSSPropertyParserMatchers.d.ts +599 -0
  102. package/dist/lib/front_end/core/sdk/CSSQuery.d.ts +21 -0
  103. package/dist/lib/front_end/core/sdk/CSSRule.d.ts +128 -0
  104. package/dist/lib/front_end/core/sdk/CSSScope.d.ts +9 -0
  105. package/dist/lib/front_end/core/sdk/CSSStartingStyle.d.ts +9 -0
  106. package/dist/lib/front_end/core/sdk/CSSStyleDeclaration.d.ts +38 -0
  107. package/dist/lib/front_end/core/sdk/CSSStyleSheetHeader.d.ts +53 -0
  108. package/dist/lib/front_end/core/sdk/CSSSupports.d.ts +10 -0
  109. package/dist/lib/front_end/core/sdk/CategorizedBreakpoint.d.ts +43 -0
  110. package/dist/lib/front_end/core/sdk/ChildTargetManager.d.ts +40 -0
  111. package/dist/lib/front_end/core/sdk/CompilerSourceMappingContentProvider.d.ts +12 -0
  112. package/dist/lib/front_end/core/sdk/Connections.d.ts +36 -0
  113. package/dist/lib/front_end/core/sdk/ConsoleModel.d.ts +124 -0
  114. package/dist/lib/front_end/core/sdk/ConsoleModelTypes.d.ts +6 -0
  115. package/dist/lib/front_end/core/sdk/Cookie.d.ts +68 -0
  116. package/dist/lib/front_end/core/sdk/CookieModel.d.ts +31 -0
  117. package/dist/lib/front_end/core/sdk/CookieParser.d.ts +14 -0
  118. package/dist/lib/front_end/core/sdk/DOMDebuggerModel.d.ts +123 -0
  119. package/dist/lib/front_end/core/sdk/DOMModel.d.ts +378 -0
  120. package/dist/lib/front_end/core/sdk/DebuggerModel.d.ts +269 -0
  121. package/dist/lib/front_end/core/sdk/EmulationModel.d.ts +92 -0
  122. package/dist/lib/front_end/core/sdk/EnhancedTracesParser.d.ts +105 -0
  123. package/dist/lib/front_end/core/sdk/EventBreakpointsModel.d.ts +63 -0
  124. package/dist/lib/front_end/core/sdk/FrameAssociated.d.ts +6 -0
  125. package/dist/lib/front_end/core/sdk/FrameManager.d.ts +68 -0
  126. package/dist/lib/front_end/core/sdk/HeapProfilerModel.d.ts +75 -0
  127. package/dist/lib/front_end/core/sdk/HttpReasonPhraseStrings.d.ts +5 -0
  128. package/dist/lib/front_end/core/sdk/IOModel.d.ts +10 -0
  129. package/dist/lib/front_end/core/sdk/IsolateManager.d.ts +52 -0
  130. package/dist/lib/front_end/core/sdk/IssuesModel.d.ts +28 -0
  131. package/dist/lib/front_end/core/sdk/LayerTreeBase.d.ts +70 -0
  132. package/dist/lib/front_end/core/sdk/LogModel.d.ts +20 -0
  133. package/dist/lib/front_end/core/sdk/NetworkManager.d.ts +414 -0
  134. package/dist/lib/front_end/core/sdk/NetworkRequest.d.ts +424 -0
  135. package/dist/lib/front_end/core/sdk/OverlayColorGenerator.d.ts +14 -0
  136. package/dist/lib/front_end/core/sdk/OverlayModel.d.ts +161 -0
  137. package/dist/lib/front_end/core/sdk/OverlayPersistentHighlighter.d.ts +116 -0
  138. package/dist/lib/front_end/core/sdk/PageLoad.d.ts +14 -0
  139. package/dist/lib/front_end/core/sdk/PageResourceLoader.d.ts +111 -0
  140. package/dist/lib/front_end/core/sdk/PaintProfiler.d.ts +43 -0
  141. package/dist/lib/front_end/core/sdk/PerformanceMetricsModel.d.ts +12 -0
  142. package/dist/lib/front_end/core/sdk/PreloadingModel.d.ts +146 -0
  143. package/dist/lib/front_end/core/sdk/RehydratingConnection.d.ts +57 -0
  144. package/dist/lib/front_end/core/sdk/RehydratingObject.d.ts +59 -0
  145. package/dist/lib/front_end/core/sdk/RemoteObject.d.ts +199 -0
  146. package/dist/lib/front_end/core/sdk/Resource.d.ts +34 -0
  147. package/dist/lib/front_end/core/sdk/ResourceTreeModel.d.ts +249 -0
  148. package/dist/lib/front_end/core/sdk/RuntimeModel.d.ts +158 -0
  149. package/dist/lib/front_end/core/sdk/SDKModel.d.ts +30 -0
  150. package/dist/lib/front_end/core/sdk/ScopeTreeCache.d.ts +21 -0
  151. package/dist/lib/front_end/core/sdk/ScreenCaptureModel.d.ts +69 -0
  152. package/dist/lib/front_end/core/sdk/Script.d.ts +125 -0
  153. package/dist/lib/front_end/core/sdk/SecurityOriginManager.d.ts +23 -0
  154. package/dist/lib/front_end/core/sdk/ServerSentEvents.d.ts +18 -0
  155. package/dist/lib/front_end/core/sdk/ServerSentEventsProtocol.d.ts +18 -0
  156. package/dist/lib/front_end/core/sdk/ServerTiming.d.ts +24 -0
  157. package/dist/lib/front_end/core/sdk/ServiceWorkerCacheModel.d.ts +79 -0
  158. package/dist/lib/front_end/core/sdk/ServiceWorkerManager.d.ts +130 -0
  159. package/dist/lib/front_end/core/sdk/SourceMap.d.ts +173 -0
  160. package/dist/lib/front_end/core/sdk/SourceMapCache.d.ts +11 -0
  161. package/dist/lib/front_end/core/sdk/SourceMapFunctionRanges.d.ts +26 -0
  162. package/dist/lib/front_end/core/sdk/SourceMapManager.d.ts +44 -0
  163. package/dist/lib/front_end/core/sdk/SourceMapScopeChainEntry.d.ts +20 -0
  164. package/dist/lib/front_end/core/sdk/SourceMapScopesInfo.d.ts +123 -0
  165. package/dist/lib/front_end/core/sdk/StorageBucketsModel.d.ts +56 -0
  166. package/dist/lib/front_end/core/sdk/StorageKeyManager.d.ts +38 -0
  167. package/dist/lib/front_end/core/sdk/Target.d.ts +71 -0
  168. package/dist/lib/front_end/core/sdk/TargetManager.d.ts +84 -0
  169. package/dist/lib/front_end/core/sdk/TraceObject.d.ts +37 -0
  170. package/dist/lib/front_end/core/sdk/WebAuthnModel.d.ts +29 -0
  171. package/dist/lib/front_end/core/sdk/WebMCPModel.d.ts +21 -0
  172. package/dist/lib/front_end/core/sdk/sdk.d.ts +90 -0
  173. package/dist/lib/front_end/entrypoints/formatter_worker/FormatterActions.d.ts +48 -0
  174. package/dist/lib/front_end/generated/InspectorBackendCommands.d.ts +14 -0
  175. package/dist/lib/front_end/generated/protocol.d.ts +21618 -0
  176. package/dist/lib/front_end/models/cpu_profile/CPUProfileDataModel.d.ts +104 -0
  177. package/dist/lib/front_end/models/cpu_profile/ProfileTreeModel.d.ts +29 -0
  178. package/dist/lib/front_end/models/cpu_profile/cpu_profile.d.ts +3 -0
  179. package/dist/lib/front_end/models/crux-manager/CrUXManager.d.ts +104 -0
  180. package/dist/lib/front_end/models/crux-manager/crux-manager.d.ts +1 -0
  181. package/dist/lib/front_end/models/emulation/DeviceModeModel.d.ts +135 -0
  182. package/dist/lib/front_end/models/emulation/EmulatedDevices.d.ts +680 -0
  183. package/dist/lib/front_end/models/emulation/emulation.d.ts +3 -0
  184. package/dist/lib/front_end/models/formatter/FormatterWorkerPool.d.ts +58 -0
  185. package/dist/lib/front_end/models/formatter/ScriptFormatter.d.ts +11 -0
  186. package/dist/lib/front_end/models/formatter/formatter.d.ts +3 -0
  187. package/dist/lib/front_end/models/geometry/GeometryImpl.d.ts +105 -0
  188. package/dist/lib/front_end/models/geometry/geometry.d.ts +1 -0
  189. package/dist/lib/front_end/models/text_utils/CodeMirrorUtils.d.ts +3 -0
  190. package/dist/lib/front_end/models/text_utils/ContentData.d.ts +74 -0
  191. package/dist/lib/front_end/models/text_utils/ContentProvider.d.ts +42 -0
  192. package/dist/lib/front_end/models/text_utils/StaticContentProvider.d.ts +13 -0
  193. package/dist/lib/front_end/models/text_utils/StreamingContentData.d.ts +49 -0
  194. package/dist/lib/front_end/models/text_utils/Text.d.ts +19 -0
  195. package/dist/lib/front_end/models/text_utils/TextCursor.d.ts +9 -0
  196. package/dist/lib/front_end/models/text_utils/TextRange.d.ts +80 -0
  197. package/dist/lib/front_end/models/text_utils/TextUtils.d.ts +97 -0
  198. package/dist/lib/front_end/models/text_utils/WasmDisassembly.d.ts +29 -0
  199. package/dist/lib/front_end/models/text_utils/text_utils.d.ts +11 -0
  200. package/dist/lib/front_end/models/trace/EntityMapper.d.ts +33 -0
  201. package/dist/lib/front_end/models/trace/EventsSerializer.d.ts +11 -0
  202. package/dist/lib/front_end/models/trace/LanternComputationData.d.ts +8 -0
  203. package/dist/lib/front_end/models/trace/ModelImpl.d.ts +103 -0
  204. package/dist/lib/front_end/models/trace/Name.d.ts +12 -0
  205. package/dist/lib/front_end/models/trace/Processor.d.ts +39 -0
  206. package/dist/lib/front_end/models/trace/Styles.d.ts +50 -0
  207. package/dist/lib/front_end/models/trace/extras/FilmStrip.d.ts +19 -0
  208. package/dist/lib/front_end/models/trace/extras/Initiators.d.ts +12 -0
  209. package/dist/lib/front_end/models/trace/extras/MainThreadActivity.d.ts +2 -0
  210. package/dist/lib/front_end/models/trace/extras/ScriptDuplication.d.ts +52 -0
  211. package/dist/lib/front_end/models/trace/extras/StackTraceForEvent.d.ts +12 -0
  212. package/dist/lib/front_end/models/trace/extras/ThirdParties.d.ts +22 -0
  213. package/dist/lib/front_end/models/trace/extras/TraceFilter.d.ts +21 -0
  214. package/dist/lib/front_end/models/trace/extras/TraceTree.d.ts +125 -0
  215. package/dist/lib/front_end/models/trace/extras/extras.d.ts +8 -0
  216. package/dist/lib/front_end/models/trace/handlers/AnimationFramesHandler.d.ts +12 -0
  217. package/dist/lib/front_end/models/trace/handlers/AnimationHandler.d.ts +8 -0
  218. package/dist/lib/front_end/models/trace/handlers/AsyncJSCallsHandler.d.ts +20 -0
  219. package/dist/lib/front_end/models/trace/handlers/AuctionWorkletsHandler.d.ts +8 -0
  220. package/dist/lib/front_end/models/trace/handlers/DOMStatsHandler.d.ts +8 -0
  221. package/dist/lib/front_end/models/trace/handlers/ExtensionTraceDataHandler.d.ts +106 -0
  222. package/dist/lib/front_end/models/trace/handlers/FlowsHandler.d.ts +7 -0
  223. package/dist/lib/front_end/models/trace/handlers/FramesHandler.d.ts +94 -0
  224. package/dist/lib/front_end/models/trace/handlers/GPUHandler.d.ts +10 -0
  225. package/dist/lib/front_end/models/trace/handlers/ImagePaintingHandler.d.ts +17 -0
  226. package/dist/lib/front_end/models/trace/handlers/InitiatorsHandler.d.ts +20 -0
  227. package/dist/lib/front_end/models/trace/handlers/InvalidationsHandler.d.ts +11 -0
  228. package/dist/lib/front_end/models/trace/handlers/LargestImagePaintHandler.d.ts +10 -0
  229. package/dist/lib/front_end/models/trace/handlers/LargestTextPaintHandler.d.ts +6 -0
  230. package/dist/lib/front_end/models/trace/handlers/LayerTreeHandler.d.ts +12 -0
  231. package/dist/lib/front_end/models/trace/handlers/LayoutShiftsHandler.d.ts +58 -0
  232. package/dist/lib/front_end/models/trace/handlers/MemoryHandler.d.ts +8 -0
  233. package/dist/lib/front_end/models/trace/handlers/MetaHandler.d.ts +82 -0
  234. package/dist/lib/front_end/models/trace/handlers/ModelHandlers.d.ts +30 -0
  235. package/dist/lib/front_end/models/trace/handlers/NetworkRequestsHandler.d.ts +56 -0
  236. package/dist/lib/front_end/models/trace/handlers/PageFramesHandler.d.ts +8 -0
  237. package/dist/lib/front_end/models/trace/handlers/PageLoadMetricsHandler.d.ts +86 -0
  238. package/dist/lib/front_end/models/trace/handlers/RendererHandler.d.ts +100 -0
  239. package/dist/lib/front_end/models/trace/handlers/SamplesHandler.d.ts +46 -0
  240. package/dist/lib/front_end/models/trace/handlers/ScreenshotsHandler.d.ts +12 -0
  241. package/dist/lib/front_end/models/trace/handlers/ScriptsHandler.d.ts +43 -0
  242. package/dist/lib/front_end/models/trace/handlers/SelectorStatsHandler.d.ts +27 -0
  243. package/dist/lib/front_end/models/trace/handlers/Threads.d.ts +34 -0
  244. package/dist/lib/front_end/models/trace/handlers/UserInteractionsHandler.d.ts +78 -0
  245. package/dist/lib/front_end/models/trace/handlers/UserTimingsHandler.d.ts +54 -0
  246. package/dist/lib/front_end/models/trace/handlers/WarningsHandler.d.ts +14 -0
  247. package/dist/lib/front_end/models/trace/handlers/WorkersHandler.d.ts +10 -0
  248. package/dist/lib/front_end/models/trace/handlers/handlers.d.ts +4 -0
  249. package/dist/lib/front_end/models/trace/handlers/helpers.d.ts +21 -0
  250. package/dist/lib/front_end/models/trace/handlers/types.d.ts +54 -0
  251. package/dist/lib/front_end/models/trace/helpers/Extensions.d.ts +6 -0
  252. package/dist/lib/front_end/models/trace/helpers/Network.d.ts +26 -0
  253. package/dist/lib/front_end/models/trace/helpers/SamplesIntegrator.d.ts +62 -0
  254. package/dist/lib/front_end/models/trace/helpers/SyntheticEvents.d.ts +13 -0
  255. package/dist/lib/front_end/models/trace/helpers/Timing.d.ts +59 -0
  256. package/dist/lib/front_end/models/trace/helpers/Trace.d.ts +148 -0
  257. package/dist/lib/front_end/models/trace/helpers/TreeHelpers.d.ts +109 -0
  258. package/dist/lib/front_end/models/trace/helpers/helpers.d.ts +7 -0
  259. package/dist/lib/front_end/models/trace/insights/CLSCulprits.d.ts +137 -0
  260. package/dist/lib/front_end/models/trace/insights/Cache.d.ts +71 -0
  261. package/dist/lib/front_end/models/trace/insights/CharacterSet.d.ts +49 -0
  262. package/dist/lib/front_end/models/trace/insights/Common.d.ts +77 -0
  263. package/dist/lib/front_end/models/trace/insights/DOMSize.d.ts +71 -0
  264. package/dist/lib/front_end/models/trace/insights/DocumentLatency.d.ts +66 -0
  265. package/dist/lib/front_end/models/trace/insights/DuplicatedJavaScript.d.ts +29 -0
  266. package/dist/lib/front_end/models/trace/insights/FontDisplay.d.ts +28 -0
  267. package/dist/lib/front_end/models/trace/insights/ForcedReflow.d.ts +56 -0
  268. package/dist/lib/front_end/models/trace/insights/INPBreakdown.d.ts +50 -0
  269. package/dist/lib/front_end/models/trace/insights/ImageDelivery.d.ts +95 -0
  270. package/dist/lib/front_end/models/trace/insights/LCPBreakdown.d.ts +85 -0
  271. package/dist/lib/front_end/models/trace/insights/LCPDiscovery.d.ts +64 -0
  272. package/dist/lib/front_end/models/trace/insights/LegacyJavaScript.d.ts +35 -0
  273. package/dist/lib/front_end/models/trace/insights/Models.d.ts +19 -0
  274. package/dist/lib/front_end/models/trace/insights/ModernHTTP.d.ts +53 -0
  275. package/dist/lib/front_end/models/trace/insights/NetworkDependencyTree.d.ts +135 -0
  276. package/dist/lib/front_end/models/trace/insights/RenderBlocking.d.ts +34 -0
  277. package/dist/lib/front_end/models/trace/insights/SlowCSSSelector.d.ts +56 -0
  278. package/dist/lib/front_end/models/trace/insights/Statistics.d.ts +18 -0
  279. package/dist/lib/front_end/models/trace/insights/ThirdParties.d.ts +33 -0
  280. package/dist/lib/front_end/models/trace/insights/Viewport.d.ts +24 -0
  281. package/dist/lib/front_end/models/trace/insights/insights.d.ts +6 -0
  282. package/dist/lib/front_end/models/trace/insights/types.d.ts +143 -0
  283. package/dist/lib/front_end/models/trace/lantern/core/LanternError.d.ts +3 -0
  284. package/dist/lib/front_end/models/trace/lantern/core/NetworkAnalyzer.d.ts +112 -0
  285. package/dist/lib/front_end/models/trace/lantern/core/core.d.ts +2 -0
  286. package/dist/lib/front_end/models/trace/lantern/graph/BaseNode.d.ts +98 -0
  287. package/dist/lib/front_end/models/trace/lantern/graph/CPUNode.d.ts +24 -0
  288. package/dist/lib/front_end/models/trace/lantern/graph/NetworkNode.d.ts +22 -0
  289. package/dist/lib/front_end/models/trace/lantern/graph/PageDependencyGraph.d.ts +43 -0
  290. package/dist/lib/front_end/models/trace/lantern/graph/graph.d.ts +4 -0
  291. package/dist/lib/front_end/models/trace/lantern/lantern.d.ts +6 -0
  292. package/dist/lib/front_end/models/trace/lantern/metrics/FirstContentfulPaint.d.ts +40 -0
  293. package/dist/lib/front_end/models/trace/lantern/metrics/Interactive.d.ts +12 -0
  294. package/dist/lib/front_end/models/trace/lantern/metrics/LargestContentfulPaint.d.ts +17 -0
  295. package/dist/lib/front_end/models/trace/lantern/metrics/MaxPotentialFID.d.ts +14 -0
  296. package/dist/lib/front_end/models/trace/lantern/metrics/Metric.d.ts +44 -0
  297. package/dist/lib/front_end/models/trace/lantern/metrics/SpeedIndex.d.ts +25 -0
  298. package/dist/lib/front_end/models/trace/lantern/metrics/TBTUtils.d.ts +31 -0
  299. package/dist/lib/front_end/models/trace/lantern/metrics/TotalBlockingTime.d.ts +16 -0
  300. package/dist/lib/front_end/models/trace/lantern/metrics/metrics.d.ts +8 -0
  301. package/dist/lib/front_end/models/trace/lantern/simulation/ConnectionPool.d.ts +26 -0
  302. package/dist/lib/front_end/models/trace/lantern/simulation/Constants.d.ts +31 -0
  303. package/dist/lib/front_end/models/trace/lantern/simulation/DNSCache.d.ts +22 -0
  304. package/dist/lib/front_end/models/trace/lantern/simulation/SimulationTimingMap.d.ts +62 -0
  305. package/dist/lib/front_end/models/trace/lantern/simulation/Simulator.d.ts +84 -0
  306. package/dist/lib/front_end/models/trace/lantern/simulation/TCPConnection.d.ts +47 -0
  307. package/dist/lib/front_end/models/trace/lantern/simulation/simulation.d.ts +6 -0
  308. package/dist/lib/front_end/models/trace/lantern/types/Lantern.d.ts +196 -0
  309. package/dist/lib/front_end/models/trace/lantern/types/types.d.ts +1 -0
  310. package/dist/lib/front_end/models/trace/trace.d.ts +14 -0
  311. package/dist/lib/front_end/models/trace/types/Configuration.d.ts +87 -0
  312. package/dist/lib/front_end/models/trace/types/Extensions.d.ts +77 -0
  313. package/dist/lib/front_end/models/trace/types/File.d.ts +197 -0
  314. package/dist/lib/front_end/models/trace/types/Overlays.d.ts +116 -0
  315. package/dist/lib/front_end/models/trace/types/Timing.d.ts +20 -0
  316. package/dist/lib/front_end/models/trace/types/TraceEvents.d.ts +2452 -0
  317. package/dist/lib/front_end/models/trace/types/types.d.ts +6 -0
  318. package/dist/lib/front_end/third_party/codemirror.next/bundle.d.ts +39 -0
  319. package/dist/lib/front_end/third_party/i18n/i18n-impl.d.ts +25 -0
  320. package/dist/lib/front_end/third_party/i18n/i18n.d.ts +3 -0
  321. package/dist/lib/front_end/third_party/i18n/localized-string-set.d.ts +49 -0
  322. package/dist/lib/front_end/third_party/intl-messageformat/intl-messageformat.d.ts +2 -0
  323. package/dist/lib/front_end/third_party/legacy-javascript/legacy-javascript.d.ts +2 -0
  324. package/dist/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.d.ts +67 -0
  325. package/dist/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.d.ts +38 -0
  326. package/dist/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.d.ts +48 -0
  327. package/dist/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.d.ts +31 -0
  328. package/dist/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.d.ts +8 -0
  329. package/dist/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.d.ts +6 -0
  330. package/dist/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.d.ts +5 -0
  331. package/dist/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes.d.ts +168 -0
  332. package/dist/lib/front_end/third_party/source-map-scopes-codec/package/src/util.d.ts +5 -0
  333. package/dist/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.d.ts +14 -0
  334. package/dist/lib/front_end/third_party/source-map-scopes-codec/source-map-scopes-codec.d.ts +1 -0
  335. package/dist/lib/front_end/third_party/third-party-web/third-party-web.d.ts +2 -0
  336. package/dist/src/init.d.ts +1 -0
  337. package/dist/src/sourcemap.d.ts +27 -0
  338. package/dist/src/timeline.d.ts +5 -0
  339. package/examples/inp.ts +34 -0
  340. package/examples/sourcemap.ts +121 -0
  341. package/examples/stats.ts +66 -0
  342. package/package.json +2 -1
@@ -0,0 +1,100 @@
1
+ import * as Helpers from '../helpers/helpers.js';
2
+ import * as Types from '../types/types.js';
3
+ import * as HandlerHelpers from './helpers.js';
4
+ import { type FrameProcessData } from './MetaHandler.js';
5
+ import type { HandlerName } from './types.js';
6
+ export declare function handleUserConfig(userConfig: Types.Configuration.Configuration): void;
7
+ export declare function reset(): void;
8
+ export declare function handleEvent(event: Types.Events.Event): void;
9
+ export declare function finalize(): Promise<void>;
10
+ export declare function data(): RendererHandlerData;
11
+ /**
12
+ * Steps through all the renderer processes we've located so far in the meta
13
+ * handler, obtaining their URL, checking whether they are the main frame, and
14
+ * collecting each one of their threads' name. This meta handler's data is
15
+ * assigned to the renderer handler's data.
16
+ */
17
+ export declare function assignMeta(processes: Map<Types.Events.ProcessID, RendererProcess>, mainFrameId: string, rendererProcessesByFrame: FrameProcessData, threadsInProcess: Map<Types.Events.ProcessID, Map<Types.Events.ThreadID, Types.Events.ThreadName>>): void;
18
+ /**
19
+ * Assigns origins to all threads in all processes.
20
+ * @see assignMeta
21
+ */
22
+ export declare function assignOrigin(processes: Map<Types.Events.ProcessID, RendererProcess>, rendererProcessesByFrame: FrameProcessData): void;
23
+ /**
24
+ * Assigns whether or not a thread is the main frame to all threads in all processes.
25
+ * @see assignMeta
26
+ */
27
+ export declare function assignIsMainFrame(processes: Map<Types.Events.ProcessID, RendererProcess>, mainFrameId: string, rendererProcessesByFrame: FrameProcessData): void;
28
+ /**
29
+ * Assigns the thread name to all threads in all processes.
30
+ * @see assignMeta
31
+ */
32
+ export declare function assignThreadName(processes: Map<Types.Events.ProcessID, RendererProcess>, threadsInProcess: Map<Types.Events.ProcessID, Map<Types.Events.ThreadID, Types.Events.ThreadName>>): void;
33
+ /**
34
+ * Removes unneeded trace data opportunistically stored while handling events.
35
+ * This currently does the following:
36
+ * - Deletes processes with an unknown origin.
37
+ */
38
+ export declare function sanitizeProcesses(processes: Map<Types.Events.ProcessID, RendererProcess>): void;
39
+ /**
40
+ * Removes unneeded trace data opportunistically stored while handling events.
41
+ * This currently does the following:
42
+ * - Deletes threads with no roots.
43
+ */
44
+ export declare function sanitizeThreads(processes: Map<Types.Events.ProcessID, RendererProcess>): void;
45
+ /**
46
+ * Creates a hierarchical structure from the trace events. Each thread in each
47
+ * process will contribute to their own individual hierarchy.
48
+ *
49
+ * The trace data comes in as a contiguous array of events, against which we
50
+ * make a couple of assumptions:
51
+ *
52
+ * 1. Events are temporally-ordered in terms of start time (though they're
53
+ * not necessarily ordered as such in the data stream).
54
+ * 2. If event B's start and end times are within event A's time boundaries
55
+ * we assume that A is the parent of B.
56
+ *
57
+ * Therefore we expect to reformulate something like:
58
+ *
59
+ * [ Task A ][ Task B ][ Task C ][ Task D ][ Task E ]
60
+ *
61
+ * Into something hierarchically-arranged like below:
62
+ *
63
+ * |------------- Task A -------------||-- Task E --|
64
+ * |-- Task B --||-- Task D --|
65
+ * |- Task C -|
66
+ */
67
+ export declare function buildHierarchy(processes: Map<Types.Events.ProcessID, RendererProcess>, options?: {
68
+ filter: {
69
+ has: (name: Types.Events.Name) => boolean;
70
+ };
71
+ }): void;
72
+ export declare function makeCompleteEvent(event: Types.Events.Begin | Types.Events.End): Types.Events.SyntheticComplete | null;
73
+ export declare function deps(): HandlerName[];
74
+ export interface RendererHandlerData {
75
+ processes: Map<Types.Events.ProcessID, RendererProcess>;
76
+ /**
77
+ * A map of all compositor workers (which we show in the UI as Rasterizers)
78
+ * by the process ID.
79
+ */
80
+ compositorTileWorkers: Map<Types.Events.ProcessID, Types.Events.ThreadID[]>;
81
+ entryToNode: Map<Types.Events.Event, Helpers.TreeHelpers.TraceEntryNode>;
82
+ entityMappings: HandlerHelpers.EntityMappings;
83
+ }
84
+ export interface RendererProcess {
85
+ url: string | null;
86
+ isOnMainFrame: boolean;
87
+ threads: Map<Types.Events.ThreadID, RendererThread>;
88
+ }
89
+ export interface RendererThread {
90
+ name: string | null;
91
+ /**
92
+ * Contains trace events and synthetic profile calls made from
93
+ * samples.
94
+ */
95
+ entries: Types.Events.Event[];
96
+ profileCalls: Types.Events.SyntheticProfileCall[];
97
+ layoutEvents: Types.Events.Layout[];
98
+ recalcStyleEvents: Types.Events.RecalcStyle[];
99
+ tree?: Helpers.TreeHelpers.TraceEntryTree;
100
+ }
@@ -0,0 +1,46 @@
1
+ import * as CPUProfile from '../../cpu_profile/cpu_profile.js';
2
+ import * as Helpers from '../helpers/helpers.js';
3
+ import * as Types from '../types/types.js';
4
+ declare let profilesInProcess: Map<Types.Events.ProcessID, Map<Types.Events.ThreadID, ProfileData>>;
5
+ declare let entryToNode: Map<Types.Events.Event, Helpers.TreeHelpers.TraceEntryNode>;
6
+ export declare function reset(): void;
7
+ export declare function handleEvent(event: Types.Events.Event): void;
8
+ export declare function finalize(parseOptions?: Types.Configuration.ParseOptions): Promise<void>;
9
+ export declare function data(): SamplesHandlerData;
10
+ export interface SamplesHandlerData {
11
+ profilesInProcess: typeof profilesInProcess;
12
+ entryToNode: typeof entryToNode;
13
+ }
14
+ export interface ProfileData {
15
+ profileId: Types.Events.ProfileID;
16
+ rawProfile: CPUProfile.CPUProfileDataModel.ExtendedProfile;
17
+ parsedProfile: CPUProfile.CPUProfileDataModel.CPUProfileDataModel;
18
+ /**
19
+ * Contains the calls built from the CPU profile samples.
20
+ * Note: This doesn't contain real trace events coming from the
21
+ * browser, only calls synthetically typed as trace events for
22
+ * compatibility, as such it only makes sense to use them in pure CPU
23
+ * profiles.
24
+ *
25
+ * If you need the profile calls from a CPU profile obtained from a
26
+ * web trace, use the data exported by the RendererHandler instead.
27
+ */
28
+ profileCalls: Types.Events.SyntheticProfileCall[];
29
+ /**
30
+ * Contains the call tree built from the CPU profile samples.
31
+ * Similar to the profileCalls field, this tree does not contain nor
32
+ * take into account trace events, as such it only makes sense to use
33
+ * them in pure CPU profiles.
34
+ */
35
+ profileTree?: Helpers.TreeHelpers.TraceEntryTree;
36
+ }
37
+ /**
38
+ * Returns the name of a function for a given synthetic profile call.
39
+ * We first look to find the ProfileNode representing this call, and use its
40
+ * function name. This is preferred (and should always exist) because if we
41
+ * resolve sourcemaps, we will update this name. If that name is not present,
42
+ * we fall back to the function name that was in the callframe that we got
43
+ * when parsing the profile's trace data.
44
+ */
45
+ export declare function getProfileCallFunctionName(data: SamplesHandlerData, entry: Types.Events.SyntheticProfileCall): string;
46
+ export {};
@@ -0,0 +1,12 @@
1
+ import * as Types from '../types/types.js';
2
+ import type { HandlerName } from './types.js';
3
+ export declare function reset(): void;
4
+ export declare function handleEvent(event: Types.Events.Event): void;
5
+ export declare function finalize(): Promise<void>;
6
+ export declare function screenshotImageDataUri(event: Types.Events.LegacySyntheticScreenshot | Types.Events.Screenshot): string;
7
+ export interface Data {
8
+ legacySyntheticScreenshots: Types.Events.LegacySyntheticScreenshot[] | null;
9
+ screenshots: Types.Events.Screenshot[] | null;
10
+ }
11
+ export declare function data(): Data;
12
+ export declare function deps(): HandlerName[];
@@ -0,0 +1,43 @@
1
+ import type * as SDK from '../../../core/sdk/sdk.js';
2
+ import type * as Protocol from '../../../generated/protocol.js';
3
+ import * as Types from '../types/types.js';
4
+ import type { FinalizeOptions, HandlerName } from './types.js';
5
+ export interface ScriptsData {
6
+ /** Note: this is only populated when the "Enhanced Traces" feature is enabled. */
7
+ scripts: Script[];
8
+ }
9
+ export interface Script {
10
+ isolate: string;
11
+ scriptId: Protocol.Runtime.ScriptId;
12
+ frame: string;
13
+ ts: Types.Timing.Micro;
14
+ inline: boolean;
15
+ url?: string;
16
+ sourceUrl?: string;
17
+ content?: string;
18
+ /**
19
+ * Note: this is the literal text given as the sourceMappingURL value. It has not been resolved relative to the script url.
20
+ * Since M138, data urls are never set here.
21
+ */
22
+ sourceMapUrl?: string;
23
+ /** If true, the source map url was a data URL, so it got removed from the trace event. */
24
+ sourceMapUrlElided?: boolean;
25
+ sourceMap?: SDK.SourceMap.SourceMap;
26
+ request?: Types.Events.SyntheticNetworkRequest;
27
+ /** Lazily generated - use getScriptGeneratedSizes to access. */
28
+ sizes?: GeneratedFileSizes;
29
+ }
30
+ type GeneratedFileSizes = {
31
+ errorMessage: string;
32
+ } | {
33
+ files: Record<string, number>;
34
+ unmappedBytes: number;
35
+ totalBytes: number;
36
+ };
37
+ export declare function deps(): HandlerName[];
38
+ export declare function reset(): void;
39
+ export declare function handleEvent(event: Types.Events.Event): void;
40
+ export declare function getScriptGeneratedSizes(script: Script): GeneratedFileSizes | null;
41
+ export declare function finalize(options: FinalizeOptions): Promise<void>;
42
+ export declare function data(): ScriptsData;
43
+ export {};
@@ -0,0 +1,27 @@
1
+ import type * as Protocol from '../../../generated/protocol.js';
2
+ import * as Types from '../types/types.js';
3
+ interface SelectorWithStyleSheedId {
4
+ selector: string;
5
+ styleSheetId: string;
6
+ }
7
+ interface InvalidatedNode {
8
+ frame: string;
9
+ backendNodeId: Protocol.DOM.BackendNodeId;
10
+ type: Types.Events.InvalidationEventType;
11
+ selectorList: SelectorWithStyleSheedId[];
12
+ ts: Types.Timing.Micro;
13
+ tts?: Types.Timing.Micro;
14
+ subtree: boolean;
15
+ lastRecalcStyleEventTs: Types.Timing.Micro;
16
+ }
17
+ export declare function reset(): void;
18
+ export declare function handleEvent(event: Types.Events.Event): void;
19
+ export declare function finalize(): Promise<void>;
20
+ export interface SelectorStatsData {
21
+ dataForRecalcStyleEvent: Map<Types.Events.RecalcStyle, {
22
+ timings: Types.Events.SelectorTiming[];
23
+ }>;
24
+ invalidatedNodeList: InvalidatedNode[];
25
+ }
26
+ export declare function data(): SelectorStatsData;
27
+ export {};
@@ -0,0 +1,34 @@
1
+ import type * as Helpers from '../helpers/helpers.js';
2
+ import type * as Types from '../types/types.js';
3
+ import type { AuctionWorkletsData } from './AuctionWorkletsHandler.js';
4
+ import type * as Renderer from './RendererHandler.js';
5
+ import type { HandlerData } from './types.js';
6
+ export interface ThreadData {
7
+ pid: Types.Events.ProcessID;
8
+ tid: Types.Events.ThreadID;
9
+ entries: readonly Types.Events.Event[];
10
+ processIsOnMainFrame: boolean;
11
+ tree: Helpers.TreeHelpers.TraceEntryTree;
12
+ type: ThreadType;
13
+ name: string | null;
14
+ entryToNode: Map<Types.Events.Event, Helpers.TreeHelpers.TraceEntryNode>;
15
+ }
16
+ export declare const enum ThreadType {
17
+ MAIN_THREAD = "MAIN_THREAD",
18
+ WORKER = "WORKER",
19
+ RASTERIZER = "RASTERIZER",
20
+ AUCTION_WORKLET = "AUCTION_WORKLET",
21
+ OTHER = "OTHER",
22
+ CPU_PROFILE = "CPU_PROFILE",
23
+ THREAD_POOL = "THREAD_POOL"
24
+ }
25
+ export declare function threadsInRenderer(rendererData: Renderer.RendererHandlerData, auctionWorkletsData: AuctionWorkletsData): readonly ThreadData[];
26
+ /**
27
+ * Given trace parsed data, this helper will return a high level array of
28
+ * ThreadData. This is useful because it allows you to get a list of threads
29
+ * regardless of if the trace is a CPU Profile or a Tracing profile. Thus you
30
+ * can use this helper to iterate over threads in confidence that it will work
31
+ * for both trace types.
32
+ * The resulting data is cached per-trace, so you can safely call this multiple times.
33
+ */
34
+ export declare function threadsInTrace(handlerData: HandlerData): readonly ThreadData[];
@@ -0,0 +1,78 @@
1
+ import * as Types from '../types/types.js';
2
+ import { ScoreClassification } from './PageLoadMetricsHandler.js';
3
+ import type { HandlerName } from './types.js';
4
+ export declare const LONG_INTERACTION_THRESHOLD: Types.Timing.Micro;
5
+ export interface UserInteractionsData {
6
+ /** All the BeginCommitCompositorFrame events we found in the trace */
7
+ beginCommitCompositorFrameEvents: readonly Types.Events.BeginCommitCompositorFrame[];
8
+ /** All the ParseMetaViewport events we found in the trace */
9
+ parseMetaViewportEvents: readonly Types.Events.ParseMetaViewport[];
10
+ /**
11
+ * All the interaction events we found in the trace that had an
12
+ * interactionId and a duration > 0
13
+ **/
14
+ interactionEvents: readonly Types.Events.SyntheticInteractionPair[];
15
+ /**
16
+ * If the user rapidly generates interaction events (think typing into a
17
+ * text box), in the UI we only really want to show the user the longest
18
+ * interaction in that set.
19
+ * For example picture interactions like this:
20
+ * ===[interaction A]==========
21
+ * =[interaction B]======
22
+ * =[interaction C]=
23
+ *
24
+ * These events all end at the same time, and so in this instance we only want
25
+ * to show the first interaction A on the timeline, as that is the longest one
26
+ * and the one the developer should be focusing on. So this array of events is
27
+ * all the interaction events filtered down, removing any nested interactions
28
+ * entirely.
29
+ **/
30
+ interactionEventsWithNoNesting: readonly Types.Events.SyntheticInteractionPair[];
31
+ longestInteractionEvent: Readonly<Types.Events.SyntheticInteractionPair> | null;
32
+ interactionsOverThreshold: Readonly<Set<Types.Events.SyntheticInteractionPair>>;
33
+ }
34
+ export declare function reset(): void;
35
+ export declare function handleEvent(event: Types.Events.Event): void;
36
+ export type InteractionCategory = 'KEYBOARD' | 'POINTER' | 'OTHER';
37
+ export declare function categoryOfInteraction(interaction: Types.Events.SyntheticInteractionPair): InteractionCategory;
38
+ /**
39
+ * We define a set of interactions as nested where:
40
+ * 1. Their end times align.
41
+ * 2. The longest interaction's start time is earlier than all other
42
+ * interactions with the same end time.
43
+ * 3. The interactions are of the same category [each interaction is either
44
+ * categorised as keyboard, or pointer.]
45
+ *
46
+ * =============A=[pointerup]=
47
+ * ====B=[pointerdown]=
48
+ * ===C=[pointerdown]==
49
+ * ===D=[pointerup]===
50
+ *
51
+ * In this example, B, C and D are all nested and therefore should not be
52
+ * returned from this function.
53
+ *
54
+ * However, in this example we would only consider B nested (under A) and D
55
+ * nested (under C). A and C both stay because they are of different types.
56
+ * ========A=[keydown]====
57
+ * =======B=[keyup]=====
58
+ * ====C=[pointerdown]=
59
+ * =D=[pointerup]=
60
+ *
61
+ * Additionally, this method will also maximise the processing duration of the
62
+ * events that we keep as non-nested. We want to make sure we give an accurate
63
+ * representation of main thread activity, so if we keep an event + hide its
64
+ * nested children, we set the top level event's processing start &
65
+ * processing end to be the earliest processing start & the latest processing
66
+ * end of its children. This ensures we report a more accurate main thread
67
+ * activity time which is important as we want developers to focus on fixing
68
+ * this.
69
+ **/
70
+ export declare function removeNestedInteractionsAndSetProcessingTime(interactions: readonly Types.Events.SyntheticInteractionPair[]): readonly Types.Events.SyntheticInteractionPair[];
71
+ export declare function finalize(): Promise<void>;
72
+ export declare function data(): UserInteractionsData;
73
+ export declare function deps(): HandlerName[];
74
+ /**
75
+ * Classifications sourced from
76
+ * https://web.dev/articles/inp#good-score
77
+ */
78
+ export declare function scoreClassificationForInteractionToNextPaint(timing: Types.Timing.Micro): ScoreClassification;
@@ -0,0 +1,54 @@
1
+ import * as Types from '../types/types.js';
2
+ export interface UserTimingsData {
3
+ /**
4
+ * Events triggered with the performance.measure() API.
5
+ * https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure
6
+ */
7
+ performanceMeasures: readonly Types.Events.SyntheticUserTimingPair[];
8
+ /**
9
+ * Events triggered with the performance.mark() API.
10
+ * https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark
11
+ */
12
+ performanceMarks: readonly Types.Events.PerformanceMark[];
13
+ /**
14
+ * Events triggered with the console.time(), console.timeEnd() and
15
+ * console.timeLog() API.
16
+ * https://developer.mozilla.org/en-US/docs/Web/API/console/time
17
+ */
18
+ consoleTimings: readonly Types.Events.SyntheticConsoleTimingPair[];
19
+ /**
20
+ * Events triggered with the console.timeStamp() API
21
+ * https://developer.mozilla.org/en-US/docs/Web/API/console/timeStamp
22
+ */
23
+ timestampEvents: readonly Types.Events.ConsoleTimeStamp[];
24
+ /**
25
+ * Events triggered to trace the call to performance.measure itself,
26
+ * cached by trace_id.
27
+ */
28
+ measureTraceByTraceId: Map<number, Types.Events.UserTimingMeasure>;
29
+ }
30
+ export declare function reset(): void;
31
+ /**
32
+ * Similar to the default {@link Helpers.Trace.eventTimeComparator}
33
+ * but with a twist:
34
+ * In case of equal start and end times, put the second event (within a
35
+ * track) first.
36
+ *
37
+ * Explanation:
38
+ * User timing entries come as trace events dispatched when
39
+ * performance.measure/mark is called. The trace events buffered in
40
+ * devtools frontend are sorted by the start time. If their start time
41
+ * is the same, then the event for the first call will appear first.
42
+ *
43
+ * When entries are meant to be stacked, the corresponding
44
+ * performance.measure calls usually are done in bottom-up direction:
45
+ * calls for children first and for parent later (because the call
46
+ * is usually done when the measured task is over). This means that
47
+ * when two user timing events have the same start and end time, usually
48
+ * the second event is the parent of the first. Hence the switch.
49
+ *
50
+ */
51
+ export declare function userTimingComparator<T extends Types.Events.SyntheticEventPair | Types.Events.ConsoleTimeStamp>(a: T, b: T, originalArray: readonly T[]): number;
52
+ export declare function handleEvent(event: Types.Events.Event): void;
53
+ export declare function finalize(): Promise<void>;
54
+ export declare function data(): UserTimingsData;
@@ -0,0 +1,14 @@
1
+ import * as Types from '../types/types.js';
2
+ import type { HandlerName } from './types.js';
3
+ export interface WarningsData {
4
+ perEvent: Map<Types.Events.Event, Warning[]>;
5
+ perWarning: Map<Warning, Types.Events.Event[]>;
6
+ }
7
+ export type Warning = 'LONG_TASK' | 'IDLE_CALLBACK_OVER_TIME' | 'FORCED_REFLOW' | 'LONG_INTERACTION';
8
+ export declare const FORCED_REFLOW_THRESHOLD: Types.Timing.Micro;
9
+ export declare const LONG_MAIN_THREAD_TASK_THRESHOLD: Types.Timing.Micro;
10
+ export declare function reset(): void;
11
+ export declare function handleEvent(event: Types.Events.Event): void;
12
+ export declare function deps(): HandlerName[];
13
+ export declare function finalize(): Promise<void>;
14
+ export declare function data(): WarningsData;
@@ -0,0 +1,10 @@
1
+ import * as Types from '../types/types.js';
2
+ export interface WorkersData {
3
+ workerSessionIdEvents: readonly Types.Events.TracingSessionIdForWorker[];
4
+ workerIdByThread: Map<Types.Events.ThreadID, Types.Events.WorkerId>;
5
+ workerURLById: Map<Types.Events.WorkerId, string>;
6
+ }
7
+ export declare function reset(): void;
8
+ export declare function handleEvent(event: Types.Events.Event): void;
9
+ export declare function finalize(): Promise<void>;
10
+ export declare function data(): WorkersData;
@@ -0,0 +1,4 @@
1
+ export * as Helpers from './helpers.js';
2
+ export * as ModelHandlers from './ModelHandlers.js';
3
+ export * as Threads from './Threads.js';
4
+ export * as Types from './types.js';
@@ -0,0 +1,21 @@
1
+ import type * as Platform from '../../../core/platform/platform.js';
2
+ import * as ThirdPartyWeb from '../../../third_party/third-party-web/third-party-web.js';
3
+ import * as Types from '../types/types.js';
4
+ import type { TraceEventsForNetworkRequest } from './NetworkRequestsHandler.js';
5
+ import type { HandlerData } from './types.js';
6
+ export type Entity = typeof ThirdPartyWeb.ThirdPartyWeb.entities[number] & {
7
+ isUnrecognized?: boolean;
8
+ };
9
+ export interface EntityMappings {
10
+ createdEntityCache: Map<string, Entity>;
11
+ entityByEvent: Map<Types.Events.Event, Entity>;
12
+ eventsByEntity: Map<Entity, Types.Events.Event[]>;
13
+ entityByUrlCache: Map<string, Entity>;
14
+ }
15
+ export declare function getEntityForEvent(event: Types.Events.Event, entityMappings: EntityMappings): Entity | undefined;
16
+ export declare function getEntityForUrl(url: string, entityMappings: EntityMappings): Entity | undefined;
17
+ export declare function getNonResolvedURL(entry: Types.Events.Event, handlerData?: HandlerData): Platform.DevToolsPath.UrlString | null;
18
+ export declare function makeUpEntity(entityCache: Map<string, Entity>, url: string): Entity | undefined;
19
+ export declare function addEventToEntityMapping(event: Types.Events.Event, entityMappings: EntityMappings): void;
20
+ /** A slight upgrade of addEventToEntityMapping to handle the sub-events of a network request. **/
21
+ export declare function addNetworkRequestToEntityMapping(networkRequest: Types.Events.SyntheticNetworkRequest, entityMappings: EntityMappings, requestTraceEvents: TraceEventsForNetworkRequest): void;
@@ -0,0 +1,54 @@
1
+ import type * as Types from './../types/types.js';
2
+ import type * as ModelHandlers from './ModelHandlers.js';
3
+ export type FinalizeOptions = Types.Configuration.ParseOptions & {
4
+ allTraceEvents: readonly Types.Events.Event[];
5
+ };
6
+ export interface Handler {
7
+ reset(): void;
8
+ handleEvent(data: object): void;
9
+ finalize(options?: FinalizeOptions): Promise<void>;
10
+ data(): unknown;
11
+ deps?(): HandlerName[];
12
+ handleUserConfig?(config: Types.Configuration.Configuration): void;
13
+ }
14
+ export type HandlerName = keyof typeof ModelHandlers;
15
+ /**
16
+ * This type maps Handler names to the return type of their data
17
+ * function. So, for example, if we are given an object with a key of 'foo'
18
+ * and a value which is a TraceHandler containing a data() function that
19
+ * returns a string, this type will be { foo: string }.
20
+ *
21
+ * This allows us to model the behavior of the TraceProcessor in the model,
22
+ * which takes an object with Handlers as part of its config, and
23
+ * which ultimately returns an object keyed off the names of the
24
+ * Handlers, and with values that are derived from each
25
+ * Handler's data function.
26
+ *
27
+ * So, concretely, we provide a Handler for calculating the #time
28
+ * bounds of a trace called TraceBounds, whose data() function returns a
29
+ * TraceWindow. The HandlerData, therefore, would determine that the
30
+ * TraceProcessor would contain a key called 'TraceBounds' whose value is
31
+ * a TraceWindow.
32
+ **/
33
+ export type EnabledHandlerDataWithMeta<T extends Record<string, Handler>> = {
34
+ Meta: Readonly<ReturnType<typeof ModelHandlers['Meta']['data']>>;
35
+ } & {
36
+ [K in keyof T]: Readonly<ReturnType<T[K]['data']>>;
37
+ };
38
+ export type HandlersWithMeta<T extends Record<string, Handler>> = {
39
+ Meta: typeof ModelHandlers.Meta;
40
+ } & {
41
+ [K in keyof T]: T[K];
42
+ };
43
+ /**
44
+ * Represents the final data from all of the handlers. If you instantiate a
45
+ * TraceProcessor with a subset of handlers, you should instead use
46
+ * `EnabledHandlerDataWithMeta<>`.
47
+ **/
48
+ export type HandlerData = Readonly<EnabledHandlerDataWithMeta<typeof ModelHandlers>>;
49
+ type DeepWriteable<T> = {
50
+ -readonly [P in keyof T]: DeepWriteable<T[P]>;
51
+ };
52
+ export type HandlerDataMutable = DeepWriteable<HandlerData>;
53
+ export type Handlers = typeof ModelHandlers;
54
+ export {};
@@ -0,0 +1,6 @@
1
+ import type * as Types from '../types/types.js';
2
+ import { type TraceEntryNode } from './TreeHelpers.js';
3
+ export declare function buildTrackDataFromExtensionEntries(extensionEntries: Types.Extensions.SyntheticExtensionTrackEntry[], extensionTrackData: Types.Extensions.ExtensionTrackData[], entryToNode: Map<Types.Events.Event, TraceEntryNode>): {
4
+ extensionTrackData: Types.Extensions.ExtensionTrackData[];
5
+ entryToNode?: Map<Types.Events.Event, TraceEntryNode>;
6
+ };
@@ -0,0 +1,26 @@
1
+ import * as Protocol from '../../../generated/protocol.js';
2
+ import type { SyntheticNetworkRequest } from '../types/TraceEvents.js';
3
+ export declare function isSyntheticNetworkRequestEventRenderBlocking(event: SyntheticNetworkRequest): boolean;
4
+ export declare function isSyntheticNetworkRequestHighPriority(event: SyntheticNetworkRequest): boolean;
5
+ export interface CacheControl {
6
+ 'max-age'?: number;
7
+ 'no-cache'?: boolean;
8
+ 'no-store'?: boolean;
9
+ 'must-revalidate'?: boolean;
10
+ 'private'?: boolean;
11
+ }
12
+ export declare const CACHEABLE_STATUS_CODES: Set<number>;
13
+ /** @type {Set<LH.Crdp.Network.ResourceType>} */
14
+ export declare const STATIC_RESOURCE_TYPES: Set<Protocol.Network.ResourceType>;
15
+ export declare const NON_NETWORK_SCHEMES: string[];
16
+ /**
17
+ * Parses Cache-Control directives based on https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
18
+ * eg. 'no-cache, no-store, max-age=0, no-transform, private' will return
19
+ * {no-cache: true, no-store: true, max-age: 0, no-transform: true, private: true}
20
+ */
21
+ export declare function parseCacheControl(header: string | null): CacheControl | null;
22
+ /**
23
+ * Is the host localhost-enough to satisfy the "secure context" definition
24
+ * https://github.com/GoogleChrome/lighthouse/pull/11766#discussion_r582340683
25
+ */
26
+ export declare function isSyntheticNetworkRequestLocalhost(event: SyntheticNetworkRequest): boolean;
@@ -0,0 +1,62 @@
1
+ import type * as Protocol from '../../../generated/protocol.js';
2
+ import type * as CPUProfile from '../../cpu_profile/cpu_profile.js';
3
+ import * as Types from '../types/types.js';
4
+ /**
5
+ * This is a helper that integrates CPU profiling data coming in the
6
+ * shape of samples, with trace events. Samples indicate what the JS
7
+ * stack trace looked at a given point in time, but they don't have
8
+ * duration. The SamplesIntegrator task is to make an approximation
9
+ * of what the duration of each JS call was, given the sample data and
10
+ * given the trace events profiled during that time. At the end of its
11
+ * execution, the SamplesIntegrator returns an array of ProfileCalls
12
+ * (under SamplesIntegrator::buildProfileCalls()), which
13
+ * represent JS calls, with a call frame and duration. These calls have
14
+ * the shape of a complete trace events and can be treated as flame
15
+ * chart entries in the timeline.
16
+ *
17
+ * The approach to build the profile calls consists in tracking the
18
+ * current stack as the following events happen (in order):
19
+ * 1. A sample was done.
20
+ * 2. A trace event started.
21
+ * 3. A trace event ended.
22
+ * Depending on the event and on the data that's coming with it the
23
+ * stack is updated by adding or removing JS calls to it and updating
24
+ * the duration of the calls in the tracking stack.
25
+ *
26
+ * note: Although this approach has been implemented since long ago, and
27
+ * is relatively efficient (adds a complexity over the trace parsing of
28
+ * O(n) where n is the number of samples) it has proven to be faulty.
29
+ * It might be worthwhile experimenting with improvements or with a
30
+ * completely different approach. Improving the approach is tracked in
31
+ * crbug.com/1417439
32
+ */
33
+ export declare class SamplesIntegrator {
34
+ #private;
35
+ /**
36
+ * Keeps track of the individual samples from the CPU Profile.
37
+ * Only used with Debug Mode experiment enabled.
38
+ */
39
+ jsSampleEvents: Types.Events.SyntheticJSSample[];
40
+ constructor(profileModel: CPUProfile.CPUProfileDataModel.CPUProfileDataModel, profileId: Types.Events.ProfileID, pid: Types.Events.ProcessID, tid: Types.Events.ThreadID, configuration?: Types.Configuration.Configuration);
41
+ buildProfileCalls(traceEvents: Types.Events.Event[]): Types.Events.SyntheticProfileCall[];
42
+ /**
43
+ * Builds the initial calls with no duration from samples. Their
44
+ * purpose is to be merged with the trace event array being parsed so
45
+ * that they can be traversed in order with them and their duration
46
+ * can be updated as the SampleIntegrator callbacks are invoked.
47
+ */
48
+ callsFromProfileSamples(): Types.Events.SyntheticProfileCall[];
49
+ static framesAreEqual(frame1: Protocol.Runtime.CallFrame, frame2: Protocol.Runtime.CallFrame): boolean;
50
+ static showNativeName(name: string, runtimeCallStatsEnabled: boolean): boolean;
51
+ static nativeGroup(nativeName: string): SamplesIntegrator.NativeGroups | null;
52
+ static isNativeRuntimeFrame(frame: Protocol.Runtime.CallFrame): boolean;
53
+ static filterStackFrames(stack: Types.Events.SyntheticProfileCall[], engineConfig: Types.Configuration.Configuration): void;
54
+ static createFakeTraceFromCpuProfile(profile: Protocol.Profiler.Profile, tid: Types.Events.ThreadID): Types.File.TraceFile;
55
+ static extractCpuProfileFromFakeTrace(traceEvents: readonly Types.Events.Event[]): Protocol.Profiler.Profile;
56
+ }
57
+ export declare namespace SamplesIntegrator {
58
+ const enum NativeGroups {
59
+ COMPILE = "Compile",
60
+ PARSE = "Parse"
61
+ }
62
+ }
@@ -0,0 +1,13 @@
1
+ import type * as Types from '../types/types.js';
2
+ export declare class SyntheticEventsManager {
3
+ #private;
4
+ static activate(manager: SyntheticEventsManager): void;
5
+ static createAndActivate(rawEvents: readonly Types.Events.Event[]): SyntheticEventsManager;
6
+ static getActiveManager(): SyntheticEventsManager;
7
+ static reset(): void;
8
+ static registerSyntheticEvent<T extends Types.Events.SyntheticBased>(syntheticEvent: Omit<T, '_tag'>): T;
9
+ private constructor();
10
+ syntheticEventForRawEventIndex(rawEventIndex: number): Types.Events.SyntheticBased;
11
+ getSyntheticTraces(): Types.Events.SyntheticBased[];
12
+ getRawTraceEvents(): readonly Types.Events.Event[];
13
+ }