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,59 @@
1
+ import * as Types from '../types/types.js';
2
+ export declare const milliToMicro: (value: Types.Timing.Milli) => Types.Timing.Micro;
3
+ export declare const secondsToMilli: (value: Types.Timing.Seconds) => Types.Timing.Milli;
4
+ export declare const secondsToMicro: (value: Types.Timing.Seconds) => Types.Timing.Micro;
5
+ export declare const microToMilli: (value: Types.Timing.Micro) => Types.Timing.Milli;
6
+ export declare const microToSeconds: (value: Types.Timing.Micro) => Types.Timing.Seconds;
7
+ export declare function timeStampForEventAdjustedByClosestNavigation(event: Types.Events.Event, traceBounds: Types.Timing.TraceWindowMicro, navigationsByNavigationId: Map<string, Types.Events.NavigationStart>, softNavigationsById: Map<number, Types.Events.SoftNavigationStart>, navigationsByFrameId: Map<string, Types.Events.NavigationStart[]>): Types.Timing.Micro;
8
+ /**
9
+ * Expands the trace window by a provided percentage or, if it the expanded window is smaller than 1 millisecond, expands it to 1 millisecond.
10
+ * If the expanded window is outside of the max trace window, cut the overflowing bound to the max trace window bound.
11
+ **/
12
+ export declare function expandWindowByPercentOrToOneMillisecond(annotationWindow: Types.Timing.TraceWindowMicro, maxTraceWindow: Types.Timing.TraceWindowMicro, percentage: number): Types.Timing.TraceWindowMicro;
13
+ export interface EventTimingsData<ValueType extends Types.Timing.Micro | Types.Timing.Milli | Types.Timing.Seconds> {
14
+ startTime: ValueType;
15
+ endTime: ValueType;
16
+ duration: ValueType;
17
+ }
18
+ export declare function eventTimingsMicroSeconds(event: Types.Events.Event): EventTimingsData<Types.Timing.Micro>;
19
+ export declare function eventTimingsMilliSeconds(event: Types.Events.Event): EventTimingsData<Types.Timing.Milli>;
20
+ export declare function traceWindowMilliSeconds(bounds: Types.Timing.TraceWindowMicro): Types.Timing.TraceWindowMilli;
21
+ export declare function traceWindowMicroSecondsToMilliSeconds(bounds: Types.Timing.TraceWindowMicro): Types.Timing.TraceWindowMilli;
22
+ export declare function traceWindowFromMilliSeconds(min: Types.Timing.Milli, max: Types.Timing.Milli): Types.Timing.TraceWindowMicro;
23
+ export declare function traceWindowFromMicroSeconds(min: Types.Timing.Micro, max: Types.Timing.Micro): Types.Timing.TraceWindowMicro;
24
+ export declare function traceWindowFromEvent(event: Types.Events.Event): Types.Timing.TraceWindowMicro;
25
+ export declare function traceWindowFromOverlay(overlay: Types.Overlays.Overlay): Types.Timing.TraceWindowMicro | null;
26
+ /**
27
+ * Combines (as in a union) multiple windows into one.
28
+ */
29
+ export declare function combineTraceWindowsMicro(windows: Types.Timing.TraceWindowMicro[]): Types.Timing.TraceWindowMicro | null;
30
+ export interface BoundsIncludeTimeRange {
31
+ timeRange: Types.Timing.TraceWindowMicro;
32
+ bounds: Types.Timing.TraceWindowMicro;
33
+ }
34
+ /**
35
+ * Checks to see if the timeRange is within the bounds. By "within" we mean
36
+ * "has any overlap":
37
+ * |------------------------|
38
+ * == no overlap (entirely before)
39
+ * ========= overlap
40
+ * ========= overlap
41
+ * ========= overlap
42
+ * ==== no overlap (entirely after)
43
+ * ============================== overlap (time range is larger than bounds)
44
+ * |------------------------|
45
+ */
46
+ export declare function boundsIncludeTimeRange(data: BoundsIncludeTimeRange): boolean;
47
+ /** Checks to see if the event is within or overlaps the bounds */
48
+ export declare function eventIsInBounds(event: Types.Events.Event, bounds: Types.Timing.TraceWindowMicro): boolean;
49
+ export declare function timestampIsInBounds(bounds: Types.Timing.TraceWindowMicro, timestamp: Types.Timing.Micro): boolean;
50
+ export interface WindowFitsInsideBounds {
51
+ window: Types.Timing.TraceWindowMicro;
52
+ bounds: Types.Timing.TraceWindowMicro;
53
+ }
54
+ /**
55
+ * Returns true if the window fits entirely within the bounds.
56
+ * Note that if the window is equivalent to the bounds, that is considered to fit
57
+ */
58
+ export declare function windowFitsInsideBounds(data: WindowFitsInsideBounds): boolean;
59
+ export declare function windowsEqual(w1: Types.Timing.TraceWindowMicro, w2: Types.Timing.TraceWindowMicro): boolean;
@@ -0,0 +1,148 @@
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
+ * Extracts the raw stack trace in known trace events. Most likely than
6
+ * not you want to use `getZeroIndexedStackTraceForEvent`, which returns
7
+ * the stack with zero based numbering. Since some trace events are
8
+ * one based this function can yield unexpected results when used
9
+ * indiscriminately.
10
+ *
11
+ * Note: this only returns the stack trace contained in the payload of
12
+ * an event, which only contains the synchronous portion of the call
13
+ * stack. If you want to obtain the whole stack trace you might need to
14
+ * use the @see Trace.Extras.StackTraceForEvent util.
15
+ */
16
+ export declare function stackTraceInEvent(event: Types.Events.Event): Types.Events.CallFrame[] | null;
17
+ export declare function extractOriginFromTrace(firstNavigationURL: string): string | null;
18
+ export type EventsInThread<T extends Types.Events.Event> = Map<Types.Events.ThreadID, T[]>;
19
+ /**
20
+ * Each thread contains events. Events indicate the thread and process IDs, which are
21
+ * used to store the event in the correct process thread entry below.
22
+ **/
23
+ export declare function addEventToProcessThread<T extends Types.Events.Event>(event: T, eventsInProcessThread: Map<Types.Events.ProcessID, EventsInThread<T>>): void;
24
+ export declare function compareBeginAndEnd(aBeginTime: number, bBeginTime: number, aEndTime: number, bEndTime: number): -1 | 0 | 1;
25
+ export declare function eventTimeComparator(a: Types.Events.Event, b: Types.Events.Event): -1 | 0 | 1;
26
+ /**
27
+ * Sorts all the events in place, in order, by their start time. If they have
28
+ * the same start time, orders them by longest first.
29
+ */
30
+ export declare function sortTraceEventsInPlace(events: Types.Events.Event[]): void;
31
+ /**
32
+ * Returns an array of ordered events that results after merging the two
33
+ * ordered input arrays.
34
+ */
35
+ export declare function mergeEventsInOrder<T1 extends Types.Events.Event, T2 extends Types.Events.Event>(eventsArray1: readonly T1[], eventsArray2: readonly T2[]): Array<T1 | T2>;
36
+ export declare function parseDevtoolsDetails(timingDetail: string, key: string): Types.Extensions.DevToolsObj | Types.Extensions.ExtensionTrackEntryPayloadDeeplink | null;
37
+ export declare function getNavigationForTraceEvent(event: Types.Events.Event, eventFrameId: string, navigationsByFrameId: Map<string, Types.Events.NavigationStart[]>): Types.Events.NavigationStart | null;
38
+ export declare function extractId(event: Types.Events.PairableAsync | Types.Events.SyntheticEventPair<Types.Events.PairableAsync>): string | undefined;
39
+ export declare function activeURLForFrameAtTime(frameId: string, time: Types.Timing.Micro, rendererProcessesByFrame: Map<string, Map<Types.Events.ProcessID, Array<{
40
+ frame: Types.Events.TraceFrame;
41
+ window: Types.Timing.TraceWindowMicro;
42
+ }>>>): string | null;
43
+ /**
44
+ * @param node the node attached to the profile call. Here a node represents a function in the call tree.
45
+ * @param profileId the profile ID that the sample came from that backs this call.
46
+ * @param sampleIndex the index of the sample in the given profile that this call was created from
47
+ * @param ts the timestamp of the profile call
48
+ * @param pid the process ID of the profile call
49
+ * @param tid the thread ID of the profile call
50
+ *
51
+ * See `panels/timeline/docs/profile_calls.md` for more context on how these events are created.
52
+ */
53
+ export declare function makeProfileCall(node: CPUProfile.ProfileTreeModel.ProfileNode, profileId: Types.Events.ProfileID, sampleIndex: number, ts: Types.Timing.Micro, pid: Types.Events.ProcessID, tid: Types.Events.ThreadID): Types.Events.SyntheticProfileCall;
54
+ export declare function getSyntheticId(event: Types.Events.PairableAsync): string | undefined;
55
+ /**
56
+ * Groups up sets of async events into synthetic events.
57
+ * @param unpairedAsyncEvents the raw array of begin, end and async instant
58
+ * events. These MUST be sorted in timestamp ASC order.
59
+ */
60
+ export declare function createMatchedSortedSyntheticEvents<T extends Types.Events.PairableAsync>(unpairedAsyncEvents: T[]): Array<Types.Events.SyntheticEventPair<T>>;
61
+ /**
62
+ * Different trace events return line/column numbers that are 1 or 0 indexed.
63
+ * This function knows which events return 1 indexed numbers and normalizes
64
+ * them. The UI expects 0 indexed line numbers, so that is what we return.
65
+ */
66
+ export declare function getZeroIndexedLineAndColumnForEvent(event: Types.Events.Event): {
67
+ lineNumber?: number;
68
+ columnNumber?: number;
69
+ };
70
+ /**
71
+ * Different trace events contain stack traces with line/column numbers
72
+ * that are 1 or 0 indexed.
73
+ * This function knows which events return 1 indexed numbers and normalizes
74
+ * them. The UI expects 0 indexed line numbers, so that is what we return.
75
+ *
76
+ * Note: this only returns the stack trace contained in the payload of
77
+ * an event, which only contains the synchronous portion of the call
78
+ * stack. If you want to obtain the whole stack trace you might need to
79
+ * use the @see Trace.Extras.StackTraceForEvent util.
80
+ */
81
+ export declare function getZeroIndexedStackTraceInEventPayload(event: Types.Events.Event): Types.Events.CallFrame[] | null;
82
+ /**
83
+ * Same as getZeroIndexedStackTraceInEventPayload, but only returns the top call frame.
84
+ */
85
+ export declare function getStackTraceTopCallFrameInEventPayload(event: Types.Events.Event): Types.Events.CallFrame | null;
86
+ export declare function rawCallFrameForEntry(entry: Types.Events.Event): Protocol.Runtime.CallFrame | null;
87
+ /**
88
+ * Given a 1-based call frame creates a 0-based one.
89
+ */
90
+ export declare function makeZeroBasedCallFrame(callFrame: Types.Events.CallFrame): Types.Events.CallFrame;
91
+ export declare function frameIDForEvent(event: Types.Events.Event): string | null;
92
+ export declare function isTopLevelEvent(event: Types.Events.Event): boolean;
93
+ export declare function isExtensionUrl(url: string): boolean;
94
+ export declare function findRecalcStyleEvents(events: Types.Events.Event[], startTime: Types.Timing.Micro, endTime?: Types.Timing.Micro): Types.Events.RecalcStyle[];
95
+ export declare function findNextEventAfterTimestamp<T extends Types.Events.Event>(candidates: T[], ts: Types.Timing.Micro): T | null;
96
+ export declare function findPreviousEventBeforeTimestamp<T extends Types.Events.Event>(candidates: T[], ts: Types.Timing.Micro): T | null;
97
+ export interface ForEachEventConfig {
98
+ onStartEvent: (event: Types.Events.Event) => void;
99
+ onEndEvent: (event: Types.Events.Event) => void;
100
+ onInstantEvent?: (event: Types.Events.Event) => void;
101
+ eventFilter?: (event: Types.Events.Event) => boolean;
102
+ startTime?: Types.Timing.Micro;
103
+ endTime?: Types.Timing.Micro;
104
+ ignoreAsyncEvents?: boolean;
105
+ }
106
+ /**
107
+ * Iterates events in a tree hierarchically, from top to bottom,
108
+ * calling back on every event's start and end in the order
109
+ * dictated by the corresponding timestamp.
110
+ *
111
+ * Events are assumed to be in ascendent order by timestamp.
112
+ *
113
+ * Events with 0 duration are treated as instant events. These do not have a
114
+ * begin and end, but will be passed to the config.onInstantEvent callback as
115
+ * they are discovered. Do not provide this callback if you are not interested
116
+ * in them.
117
+ *
118
+ * For example, given this tree, the following callbacks
119
+ * are expected to be made in the following order
120
+ * |---------------A---------------|
121
+ * |------B------||-------D------|
122
+ * |---C---|
123
+ *
124
+ * 1. Start A
125
+ * 3. Start B
126
+ * 4. Start C
127
+ * 5. End C
128
+ * 6. End B
129
+ * 7. Start D
130
+ * 8. End D
131
+ * 9. End A
132
+ *
133
+ * By default, async events are skipped. This behaviour can be
134
+ * overridden making use of the config.ignoreAsyncEvents parameter.
135
+ */
136
+ export declare function forEachEvent(events: Types.Events.Event[], config: ForEachEventConfig): void;
137
+ export declare function eventHasCategory(event: Types.Events.Event, category: string): boolean;
138
+ /**
139
+ * This compares Types.Events.CallFrame with Protocol.Runtime.CallFrame and checks for equality.
140
+ */
141
+ export declare function isMatchingCallFrame(eventFrame: Types.Events.CallFrame, nodeFrame: Protocol.Runtime.CallFrame): boolean;
142
+ export declare function eventContainsTimestamp(event: Types.Events.Event, ts: Types.Timing.Micro): boolean;
143
+ export declare function extractSampleTraceId(event: Types.Events.Event): number | null;
144
+ /**
145
+ * This exactly matches Trace.Styles.visibleTypes. See the runtime verification in maybeInitStylesMap.
146
+ * TODO(crbug.com/410884528)
147
+ **/
148
+ export declare const VISIBLE_TRACE_EVENT_TYPES: Set<Types.Events.Name>;
@@ -0,0 +1,109 @@
1
+ import type * as Platform from '../../../core/platform/platform.js';
2
+ import * as Types from '../types/types.js';
3
+ export declare const makeTraceEntryNodeId: () => TraceEntryNodeId;
4
+ export declare const makeEmptyTraceEntryTree: () => TraceEntryTree;
5
+ export declare const makeEmptyTraceEntryNode: (entry: Types.Events.Event, id: TraceEntryNodeId) => TraceEntryNode;
6
+ export interface TraceEntryTree {
7
+ roots: Set<TraceEntryNode>;
8
+ maxDepth: number;
9
+ }
10
+ /** Node in the graph that defines all parent/child relationships. */
11
+ export interface TraceEntryNode {
12
+ entry: Types.Events.Event;
13
+ depth: number;
14
+ selfTime?: Types.Timing.Micro;
15
+ id: TraceEntryNodeId;
16
+ parent: TraceEntryNode | null;
17
+ children: TraceEntryNode[];
18
+ }
19
+ export type TraceEntryNodeId = Platform.Brand.Brand<number, 'traceEntryNodeIdTag'>;
20
+ /**
21
+ * Builds a hierarchy of the entries (trace events and profile calls) in
22
+ * a particular thread of a particular process, assuming that they're
23
+ * sorted, by iterating through all of the events in order.
24
+ *
25
+ * The approach is analogous to how a parser would be implemented. A
26
+ * stack maintains local context. A scanner peeks and pops from the data
27
+ * stream. Various "tokens" (events) are treated as "whitespace"
28
+ * (ignored).
29
+ *
30
+ * The tree starts out empty and is populated as the hierarchy is built.
31
+ * The nodes are also assumed to be created empty, with no known parent
32
+ * or children.
33
+ *
34
+ * Complexity: O(n), where n = number of events
35
+ */
36
+ export declare function treify(entries: readonly Types.Events.Event[], options?: {
37
+ filter: {
38
+ has: (name: Types.Events.Name) => boolean;
39
+ };
40
+ }): {
41
+ tree: TraceEntryTree;
42
+ entryToNode: Map<Types.Events.Event, TraceEntryNode>;
43
+ };
44
+ /**
45
+ * Iterates events in a tree hierarchically, from top to bottom,
46
+ * calling back on every event's start and end in the order
47
+ * as it traverses down and then up the tree.
48
+ *
49
+ * For example, given this tree, the following callbacks
50
+ * are expected to be made in the following order
51
+ * |---------------A---------------|
52
+ * |------B------||-------D------|
53
+ * |---C---|
54
+ *
55
+ * 1. Start A
56
+ * 3. Start B
57
+ * 4. Start C
58
+ * 5. End C
59
+ * 6. End B
60
+ * 7. Start D
61
+ * 8. End D
62
+ * 9. End A
63
+ *
64
+ */
65
+ export declare function walkTreeFromEntry(entryToNode: Map<Types.Events.Event, TraceEntryNode>, rootEntry: Types.Events.Event, onEntryStart: (entry: Types.Events.Event) => void, onEntryEnd: (entry: Types.Events.Event) => void): void;
66
+ /**
67
+ * Given a Helpers.TreeHelpers.RendererTree, this will iterates events in hierarchically, visiting
68
+ * each root node and working from top to bottom, calling back on every event's
69
+ * start and end in the order as it traverses down and then up the tree.
70
+ *
71
+ * For example, given this tree, the following callbacks
72
+ * are expected to be made in the following order
73
+ * |------------- Task A -------------||-- Task E --|
74
+ * |-- Task B --||-- Task D --|
75
+ * |- Task C -|
76
+ *
77
+ * 1. Start A
78
+ * 3. Start B
79
+ * 4. Start C
80
+ * 5. End C
81
+ * 6. End B
82
+ * 7. Start D
83
+ * 8. End D
84
+ * 9. End A
85
+ * 10. Start E
86
+ * 11. End E
87
+ *
88
+ */
89
+ export declare function walkEntireTree(entryToNode: Map<Types.Events.Event, TraceEntryNode>, tree: TraceEntryTree, onEntryStart: (entry: Types.Events.Event) => void, onEntryEnd: (entry: Types.Events.Event) => void, traceWindowToInclude?: Types.Timing.TraceWindowMicro, minDuration?: Types.Timing.Micro): void;
90
+ /**
91
+ * Determines if the given events, which are assumed to be ordered can
92
+ * be organized into tree structures.
93
+ * This condition is met if there is *not* a pair of async events
94
+ * e1 and e2 where:
95
+ *
96
+ * e1.startTime < e2.startTime && e1.endTime > e2.startTime && e1.endTime < e2.endTime.
97
+ * or, graphically:
98
+ * |------- e1 ------|
99
+ * |------- e2 --------|
100
+ *
101
+ * Because a parent-child relationship cannot be made from the example
102
+ * above, a tree cannot be made from the set of events.
103
+ *
104
+ * Sync events from the same thread are tree-able by definition.
105
+ *
106
+ * Note that this will also return true if multiple trees can be
107
+ * built, for example if none of the events overlap with each other.
108
+ */
109
+ export declare function canBuildTreesFromEvents(events: readonly Types.Events.Event[]): boolean;
@@ -0,0 +1,7 @@
1
+ export * as Extensions from './Extensions.js';
2
+ export * as Network from './Network.js';
3
+ export * as SamplesIntegrator from './SamplesIntegrator.js';
4
+ export * as SyntheticEvents from './SyntheticEvents.js';
5
+ export * as Timing from './Timing.js';
6
+ export * as Trace from './Trace.js';
7
+ export * as TreeHelpers from './TreeHelpers.js';
@@ -0,0 +1,137 @@
1
+ import * as Platform from '../../../core/platform/platform.js';
2
+ import type * as Protocol from '../../../generated/protocol.js';
3
+ import * as Handlers from '../handlers/handlers.js';
4
+ import * as Types from '../types/types.js';
5
+ import { type InsightModel, type InsightSetContext } from './types.js';
6
+ export declare const UIStrings: {
7
+ /** Title of an insight that provides details about why elements shift/move on the page. The causes for these shifts are referred to as culprits ("reasons"). */
8
+ readonly title: "Layout shift culprits";
9
+ /**
10
+ * @description Description of a DevTools insight that identifies the reasons that elements shift on the page.
11
+ * This is displayed after a user expands the section to see more. No character length limits.
12
+ */
13
+ readonly description: "Layout shifts occur when elements move absent any user interaction. [Investigate the causes of layout shifts](https://developer.chrome.com/docs/performance/insights/cls-culprit), such as elements being added, removed, or their fonts changing as the page loads.";
14
+ /**
15
+ * @description Text indicating the worst layout shift cluster.
16
+ */
17
+ readonly worstLayoutShiftCluster: "Worst layout shift cluster";
18
+ /**
19
+ * @description Text indicating the worst layout shift cluster.
20
+ */
21
+ readonly worstCluster: "Worst cluster";
22
+ /**
23
+ * @description Text indicating a layout shift cluster and its start time.
24
+ * @example {32 ms} PH1
25
+ */
26
+ readonly layoutShiftCluster: "Layout shift cluster @ {PH1}";
27
+ /**
28
+ * @description Text indicating the biggest reasons for the layout shifts.
29
+ */
30
+ readonly topCulprits: "Top layout shift culprits";
31
+ /**
32
+ * @description Text for a culprit type of Injected iframe.
33
+ */
34
+ readonly injectedIframe: "Injected iframe";
35
+ /**
36
+ * @description Text for a culprit type of web font request.
37
+ */
38
+ readonly webFont: "Web font";
39
+ /**
40
+ * @description Text for a culprit type of Animation.
41
+ */
42
+ readonly animation: "Animation";
43
+ /**
44
+ * @description Text for a culprit type of Unsized image.
45
+ */
46
+ readonly unsizedImage: "Unsized image element";
47
+ /**
48
+ * @description Text status when there were no layout shifts detected.
49
+ */
50
+ readonly noLayoutShifts: "No layout shifts";
51
+ /**
52
+ * @description Text status when there no layout shifts culprits/root causes were found.
53
+ */
54
+ readonly noCulprits: "Could not detect any layout shift culprits";
55
+ };
56
+ export declare const i18nString: any;
57
+ export type CLSCulpritsInsightModel = InsightModel<typeof UIStrings, {
58
+ animationFailures: readonly NoncompositedAnimationFailure[];
59
+ shifts: Map<Types.Events.SyntheticLayoutShift, LayoutShiftRootCausesData>;
60
+ clusters: Types.Events.SyntheticLayoutShiftCluster[];
61
+ worstCluster: Types.Events.SyntheticLayoutShiftCluster | undefined;
62
+ /** The top 3 shift root causes for each cluster. */
63
+ topCulpritsByCluster: Map<Types.Events.SyntheticLayoutShiftCluster, LayoutShiftItem[]>;
64
+ }>;
65
+ export declare const enum AnimationFailureReasons {
66
+ ACCELERATED_ANIMATIONS_DISABLED = "ACCELERATED_ANIMATIONS_DISABLED",
67
+ EFFECT_SUPPRESSED_BY_DEVTOOLS = "EFFECT_SUPPRESSED_BY_DEVTOOLS",
68
+ INVALID_ANIMATION_OR_EFFECT = "INVALID_ANIMATION_OR_EFFECT",
69
+ EFFECT_HAS_UNSUPPORTED_TIMING_PARAMS = "EFFECT_HAS_UNSUPPORTED_TIMING_PARAMS",
70
+ EFFECT_HAS_NON_REPLACE_COMPOSITE_MODE = "EFFECT_HAS_NON_REPLACE_COMPOSITE_MODE",
71
+ TARGET_HAS_INVALID_COMPOSITING_STATE = "TARGET_HAS_INVALID_COMPOSITING_STATE",
72
+ TARGET_HAS_INCOMPATIBLE_ANIMATIONS = "TARGET_HAS_INCOMPATIBLE_ANIMATIONS",
73
+ TARGET_HAS_CSS_OFFSET = "TARGET_HAS_CSS_OFFSET",
74
+ ANIMATION_AFFECTS_NON_CSS_PROPERTIES = "ANIMATION_AFFECTS_NON_CSS_PROPERTIES",
75
+ TRANSFORM_RELATED_PROPERTY_CANNOT_BE_ACCELERATED_ON_TARGET = "TRANSFORM_RELATED_PROPERTY_CANNOT_BE_ACCELERATED_ON_TARGET",
76
+ TRANSFROM_BOX_SIZE_DEPENDENT = "TRANSFROM_BOX_SIZE_DEPENDENT",
77
+ FILTER_RELATED_PROPERTY_MAY_MOVE_PIXELS = "FILTER_RELATED_PROPERTY_MAY_MOVE_PIXELS",
78
+ UNSUPPORTED_CSS_PROPERTY = "UNSUPPORTED_CSS_PROPERTY",
79
+ MIXED_KEYFRAME_VALUE_TYPES = "MIXED_KEYFRAME_VALUE_TYPES",
80
+ TIMELINE_SOURCE_HAS_INVALID_COMPOSITING_STATE = "TIMELINE_SOURCE_HAS_INVALID_COMPOSITING_STATE",
81
+ ANIMATION_HAS_NO_VISIBLE_CHANGE = "ANIMATION_HAS_NO_VISIBLE_CHANGE",
82
+ AFFECTS_IMPORTANT_PROPERTY = "AFFECTS_IMPORTANT_PROPERTY",
83
+ SVG_TARGET_HAS_INDEPENDENT_TRANSFORM_PROPERTY = "SVG_TARGET_HAS_INDEPENDENT_TRANSFORM_PROPERTY"
84
+ }
85
+ export declare const enum LayoutShiftType {
86
+ WEB_FONT = 0,
87
+ IFRAMES = 1,
88
+ ANIMATIONS = 2,
89
+ UNSIZED_IMAGE = 3
90
+ }
91
+ export type LayoutShiftItem = {
92
+ type: LayoutShiftType.UNSIZED_IMAGE;
93
+ description: Platform.UIString.LocalizedString;
94
+ url: string;
95
+ backendNodeId: Protocol.DOM.BackendNodeId;
96
+ frame: string;
97
+ } | {
98
+ type: Exclude<LayoutShiftType, LayoutShiftType.UNSIZED_IMAGE>;
99
+ description: Platform.UIString.LocalizedString;
100
+ };
101
+ export interface NoncompositedAnimationFailure {
102
+ /**
103
+ * Animation name.
104
+ */
105
+ name?: string;
106
+ /**
107
+ * Failure reason based on mask number defined in
108
+ * https://source.chromium.org/search?q=f:compositor_animations.h%20%22enum%20FailureReason%22.
109
+ */
110
+ failureReasons: AnimationFailureReasons[];
111
+ /**
112
+ * Unsupported properties.
113
+ */
114
+ unsupportedProperties?: Types.Events.Animation['args']['data']['unsupportedProperties'];
115
+ /**
116
+ * Animation event.
117
+ */
118
+ animation?: Types.Events.SyntheticAnimationPair;
119
+ }
120
+ export interface UnsizedImage {
121
+ backendNodeId: Protocol.DOM.BackendNodeId;
122
+ paintImageEvent: Types.Events.PaintImage;
123
+ }
124
+ export interface IframeRootCause {
125
+ frame: string;
126
+ url?: string;
127
+ }
128
+ export interface LayoutShiftRootCausesData {
129
+ iframes: IframeRootCause[];
130
+ webFonts: Types.Events.SyntheticNetworkRequest[];
131
+ nonCompositedAnimations: NoncompositedAnimationFailure[];
132
+ unsizedImages: UnsizedImage[];
133
+ }
134
+ export declare function getNonCompositedFailure(animationEvent: Types.Events.SyntheticAnimationPair): NoncompositedAnimationFailure[];
135
+ export declare function isCLSCulpritsInsight(insight: InsightModel): insight is CLSCulpritsInsightModel;
136
+ export declare function generateInsight(data: Handlers.Types.HandlerData, context: InsightSetContext): CLSCulpritsInsightModel;
137
+ export declare function createOverlays(model: CLSCulpritsInsightModel): Types.Overlays.Overlay[];
@@ -0,0 +1,71 @@
1
+ import type * as Handlers from '../handlers/handlers.js';
2
+ import * as Helpers from '../helpers/helpers.js';
3
+ import type * as Types from '../types/types.js';
4
+ import { type InsightModel, type InsightSetContext } from './types.js';
5
+ export declare const UIStrings: {
6
+ /**
7
+ * @description Title of an insight that provides information and suggestions of resources that could improve their caching.
8
+ */
9
+ readonly title: "Use efficient cache lifetimes";
10
+ /**
11
+ * @description Text to tell the user about how caching can help improve performance.
12
+ */
13
+ readonly description: "A long cache lifetime can speed up repeat visits to your page. [Learn more about caching](https://developer.chrome.com/docs/performance/insights/cache).";
14
+ /**
15
+ * @description Column for a font loaded by the page to render text.
16
+ */
17
+ readonly requestColumn: "Request";
18
+ /**
19
+ * @description Column for a resource cache's Time To Live.
20
+ */
21
+ readonly cacheTTL: "Cache TTL";
22
+ /**
23
+ * @description Text describing that there were no requests found that need caching.
24
+ */
25
+ readonly noRequestsToCache: "No requests with inefficient cache policies";
26
+ /**
27
+ * @description Table row value representing the remaining items not shown in the table due to size constraints. This row will always represent at least 2 items.
28
+ * @example {5} PH1
29
+ */
30
+ readonly others: "{PH1} others";
31
+ };
32
+ export declare const i18nString: any;
33
+ export type CacheInsightModel = InsightModel<typeof UIStrings, {
34
+ requests: Array<{
35
+ request: Types.Events.SyntheticNetworkRequest;
36
+ ttl: number;
37
+ wastedBytes: number;
38
+ }>;
39
+ }>;
40
+ /**
41
+ * Determines if a request is "cacheable".
42
+ * A request is "cacheable" if it is of the appropriate protocol and resource type
43
+ * (see Helpers.Network.NON_NETWORK_SCHEMES and Helpers.Network.STATIC_RESOURCE_TYPE)
44
+ * and has the appropriate statusCodes.
45
+ */
46
+ export declare function isCacheable(request: Types.Events.SyntheticNetworkRequest): boolean;
47
+ /**
48
+ * Returns max-age if defined, otherwise expires header if defined, and null if not.
49
+ */
50
+ export declare function computeCacheLifetimeInSeconds(headers: Array<{
51
+ name: string;
52
+ value: string;
53
+ }>, cacheControl: Helpers.Network.CacheControl | null): number | null;
54
+ export declare function getCombinedHeaders(responseHeaders: Array<{
55
+ name: string;
56
+ value: string;
57
+ }>): Map<string, string>;
58
+ /**
59
+ * Returns whether a request contains headers that disable caching.
60
+ * Disabled caching is checked on the 'cache-control' and 'pragma' headers.
61
+ */
62
+ export declare function cachingDisabled(headers: Map<string, string> | null, parsedCacheControl: Helpers.Network.CacheControl | null): boolean;
63
+ export interface CacheableRequest {
64
+ request: Types.Events.SyntheticNetworkRequest;
65
+ ttl: number;
66
+ wastedBytes: number;
67
+ }
68
+ export declare function isCacheInsight(model: InsightModel): model is CacheInsightModel;
69
+ export declare function generateInsight(data: Handlers.Types.HandlerData, context: InsightSetContext): CacheInsightModel;
70
+ export declare function createOverlayForRequest(request: Types.Events.SyntheticNetworkRequest): Types.Overlays.EntryOutline;
71
+ export declare function createOverlays(model: CacheInsightModel): Types.Overlays.Overlay[];
@@ -0,0 +1,49 @@
1
+ import type * as Handlers from '../handlers/handlers.js';
2
+ import type * as Types from '../types/types.js';
3
+ import { type Checklist, type InsightModel, type InsightSetContext } from './types.js';
4
+ export declare const UIStrings: {
5
+ /**
6
+ * @description Title of an insight that checks whether the page declares a character encoding early enough.
7
+ */
8
+ readonly title: "Declare a character encoding";
9
+ /**
10
+ * @description Description of an insight that checks whether the page has a proper character encoding declaration via HTTP header or early meta tag.
11
+ */
12
+ readonly description: "A character encoding declaration is required. It can be done with a meta charset tag in the first 1024 bytes of the HTML or in the Content-Type HTTP response header. [Learn more about declaring the character encoding](https://developer.chrome.com/docs/insights/charset/).";
13
+ /**
14
+ * @description Text to tell the user that the charset is declared in the Content-Type HTTP response header.
15
+ */
16
+ readonly passingHttpHeader: "Declares charset in HTTP header";
17
+ /**
18
+ * @description Text to tell the user that the charset is NOT declared in the Content-Type HTTP response header.
19
+ */
20
+ readonly failedHttpHeader: "Does not declare charset in HTTP header";
21
+ /**
22
+ * @description Text to tell the user that a meta charset tag was found in the first 1024 bytes of the HTML.
23
+ */
24
+ readonly passingMetaCharsetEarly: "Declares charset using a meta tag in the first 1024 bytes";
25
+ /**
26
+ * @description Text to tell the user that a meta charset tag was found, but too late in the HTML.
27
+ */
28
+ readonly failedMetaCharsetLate: "Declares charset using a meta tag after the first 1024 bytes";
29
+ /**
30
+ * @description Text to tell the user that no meta charset tag was found in the HTML.
31
+ */
32
+ readonly failedMetaCharsetMissing: "Does not declare charset using a meta tag";
33
+ /**
34
+ * @description Text to tell the user that trace data did not include the Blink signal for meta charset.
35
+ */
36
+ readonly failedMetaCharsetUnknown: "Could not determine meta charset declaration from trace";
37
+ };
38
+ export declare const i18nString: any;
39
+ export type CharacterSetInsightModel = InsightModel<typeof UIStrings, {
40
+ data?: {
41
+ hasHttpCharset: boolean;
42
+ checklist: Checklist<'httpCharset' | 'metaCharset'>;
43
+ metaCharsetDisposition?: Types.Events.MetaCharsetDisposition;
44
+ documentRequest?: Types.Events.SyntheticNetworkRequest;
45
+ };
46
+ }>;
47
+ export declare function isCharacterSetInsight(model: InsightModel): model is CharacterSetInsightModel;
48
+ export declare function generateInsight(data: Handlers.Types.HandlerData, context: InsightSetContext): CharacterSetInsightModel;
49
+ export declare function createOverlays(model: CharacterSetInsightModel): Types.Overlays.Overlay[];
@@ -0,0 +1,77 @@
1
+ import * as Protocol from '../../../generated/protocol.js';
2
+ import type * as CrUXManager from '../../crux-manager/crux-manager.js';
3
+ import type * as Handlers from '../handlers/handlers.js';
4
+ import * as Types from '../types/types.js';
5
+ import { type InsightModel, type InsightModels, type InsightSet, type InsightSetContext, type MetricSavings } from './types.js';
6
+ export declare function getInsight<InsightName extends keyof InsightModels>(insightName: InsightName, insightSet: InsightSet): InsightModels[InsightName];
7
+ export declare function getLCP(insightSet: InsightSet): {
8
+ value: Types.Timing.Micro;
9
+ event: Types.Events.AnyLargestContentfulPaintCandidate;
10
+ } | null;
11
+ export declare function getINP(insightSet: InsightSet): {
12
+ value: Types.Timing.Micro;
13
+ event: Types.Events.SyntheticInteractionPair;
14
+ } | null;
15
+ export declare function getCLS(insightSet: InsightSet): {
16
+ value: number;
17
+ worstClusterEvent: Types.Events.Event | null;
18
+ };
19
+ export declare function evaluateLCPMetricScore(value: Types.Timing.Milli): number;
20
+ export declare function evaluateINPMetricScore(value: Types.Timing.Milli): number;
21
+ export declare function evaluateCLSMetricScore(value: number): number;
22
+ export interface CrUXFieldMetricTimingResult {
23
+ value: Types.Timing.Micro;
24
+ pageScope: CrUXManager.PageScope;
25
+ }
26
+ export interface CrUXFieldMetricNumberResult {
27
+ value: number;
28
+ pageScope: CrUXManager.PageScope;
29
+ }
30
+ export interface CrUXFieldMetricResults {
31
+ fcp: CrUXFieldMetricTimingResult | null;
32
+ lcp: CrUXFieldMetricTimingResult | null;
33
+ inp: CrUXFieldMetricTimingResult | null;
34
+ cls: CrUXFieldMetricNumberResult | null;
35
+ lcpBreakdown: {
36
+ ttfb: CrUXFieldMetricTimingResult | null;
37
+ loadDelay: CrUXFieldMetricTimingResult | null;
38
+ loadDuration: CrUXFieldMetricTimingResult | null;
39
+ renderDelay: CrUXFieldMetricTimingResult | null;
40
+ };
41
+ }
42
+ export declare function getFieldMetricsForInsightSet(insightSet: InsightSet, metadata: Types.File.MetaData | null, scope?: CrUXManager.Scope | null): CrUXFieldMetricResults | null;
43
+ export declare function calculateMetricWeightsForSorting(insightSet: InsightSet, metadata: Types.File.MetaData | null): {
44
+ lcp: number;
45
+ inp: number;
46
+ cls: number;
47
+ };
48
+ /**
49
+ * Estimates the FCP & LCP savings for wasted bytes in `wastedBytesByRequestId`.
50
+ */
51
+ export declare function metricSavingsForWastedBytes(wastedBytesByRequestId: Map<string, number>, context: InsightSetContext): MetricSavings | undefined;
52
+ /**
53
+ * Returns whether the network request was sent encoded.
54
+ */
55
+ export declare function isRequestCompressed(request: Types.Events.SyntheticNetworkRequest): boolean;
56
+ export declare function isRequestServedFromBrowserCache(request: Types.Events.SyntheticNetworkRequest): boolean;
57
+ /**
58
+ * Estimates the number of bytes the content of this network record would have consumed on the network based on the
59
+ * uncompressed size (totalBytes). Uses the actual transfer size from the network record if applicable,
60
+ * minus the size of the response headers.
61
+ *
62
+ * @param totalBytes Uncompressed size of the resource
63
+ */
64
+ export declare function estimateCompressedContentSize(request: Types.Events.SyntheticNetworkRequest | undefined, totalBytes: number, resourceType: Protocol.Network.ResourceType): number;
65
+ /**
66
+ * Utility function to estimate the ratio of the compression of a script.
67
+ * This excludes the size of the response headers.
68
+ */
69
+ export declare function estimateCompressionRatioForScript(script: Handlers.ModelHandlers.Scripts.Script): number;
70
+ export declare function calculateDocFirstByteTs(docRequest: Types.Events.SyntheticNetworkRequest): Types.Timing.Micro | null;
71
+ /**
72
+ * Calculates the trace bounds for the given insight that are relevant.
73
+ *
74
+ * Uses the insight's overlays to determine the relevant trace bounds. If there are
75
+ * no overlays, falls back to the insight set's navigation bounds.
76
+ */
77
+ export declare function insightBounds(insight: InsightModel, insightSetBounds: Types.Timing.TraceWindowMicro): Types.Timing.TraceWindowMicro;