@paulirish/trace_engine 0.0.58 → 0.0.60

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 (450) hide show
  1. package/.tmp/tsbuildinfo/analyze-trace.d.mts +2 -3
  2. package/.tmp/tsbuildinfo/analyze-trace.d.mts.map +1 -1
  3. package/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +1 -1
  4. package/LICENSE +1 -1
  5. package/README.md +28 -1
  6. package/analyze-trace.mjs +5 -3
  7. package/core/platform/ArrayUtilities.d.ts +1 -0
  8. package/core/platform/ArrayUtilities.js +2 -2
  9. package/core/platform/ArrayUtilities.js.map +1 -1
  10. package/core/platform/Brand.js +1 -1
  11. package/core/platform/Brand.js.map +1 -1
  12. package/core/platform/Constructor.js +1 -1
  13. package/core/platform/Constructor.js.map +1 -1
  14. package/core/platform/DOMUtilities.js +1 -1
  15. package/core/platform/DOMUtilities.js.map +1 -1
  16. package/core/platform/DateUtilities.js +1 -1
  17. package/core/platform/DateUtilities.js.map +1 -1
  18. package/core/platform/DevToolsPath.js +1 -1
  19. package/core/platform/DevToolsPath.js.map +1 -1
  20. package/core/platform/KeyboardUtilities.js +1 -1
  21. package/core/platform/KeyboardUtilities.js.map +1 -1
  22. package/core/platform/MapUtilities.js +1 -1
  23. package/core/platform/MapUtilities.js.map +1 -1
  24. package/core/platform/MimeType.js +1 -1
  25. package/core/platform/MimeType.js.map +1 -1
  26. package/core/platform/NumberUtilities.js +1 -1
  27. package/core/platform/NumberUtilities.js.map +1 -1
  28. package/core/platform/StringUtilities.d.ts +2 -1
  29. package/core/platform/StringUtilities.js +34 -32
  30. package/core/platform/StringUtilities.js.map +1 -1
  31. package/core/platform/Timing.js +1 -1
  32. package/core/platform/Timing.js.map +1 -1
  33. package/core/platform/TypedArrayUtilities.js +1 -1
  34. package/core/platform/TypedArrayUtilities.js.map +1 -1
  35. package/core/platform/TypescriptUtilities.js +1 -1
  36. package/core/platform/TypescriptUtilities.js.map +1 -1
  37. package/core/platform/UIString.js +1 -1
  38. package/core/platform/UIString.js.map +1 -1
  39. package/core/platform/UserVisibleError.js +1 -1
  40. package/core/platform/UserVisibleError.js.map +1 -1
  41. package/core/platform/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  42. package/core/platform/platform-tsconfig.json +6 -2
  43. package/core/platform/platform.js +3 -29
  44. package/core/platform/platform.js.map +1 -1
  45. package/generated/protocol.d.ts +224 -14
  46. package/generated/protocol.js +1 -1
  47. package/locales/af.json +0 -9
  48. package/locales/am.json +0 -9
  49. package/locales/ar.json +0 -9
  50. package/locales/as.json +0 -9
  51. package/locales/az.json +0 -9
  52. package/locales/be.json +0 -9
  53. package/locales/bg.json +0 -9
  54. package/locales/bn.json +1 -10
  55. package/locales/bs.json +0 -9
  56. package/locales/ca.json +0 -9
  57. package/locales/cs.json +0 -9
  58. package/locales/cy.json +0 -9
  59. package/locales/da.json +0 -9
  60. package/locales/de.json +0 -9
  61. package/locales/el.json +0 -9
  62. package/locales/en-GB.json +0 -9
  63. package/locales/en-US.json +8 -8
  64. package/locales/en-XL.json +8 -8
  65. package/locales/es-419.json +0 -9
  66. package/locales/es.json +0 -9
  67. package/locales/et.json +0 -9
  68. package/locales/eu.json +0 -9
  69. package/locales/fa.json +0 -9
  70. package/locales/fi.json +0 -9
  71. package/locales/fil.json +0 -9
  72. package/locales/fr-CA.json +0 -9
  73. package/locales/fr.json +0 -9
  74. package/locales/gl.json +0 -9
  75. package/locales/gu.json +0 -9
  76. package/locales/he.json +0 -9
  77. package/locales/hi.json +0 -9
  78. package/locales/hr.json +4 -13
  79. package/locales/hu.json +0 -9
  80. package/locales/hy.json +0 -9
  81. package/locales/id.json +0 -9
  82. package/locales/is.json +0 -9
  83. package/locales/it.json +0 -9
  84. package/locales/ja.json +0 -9
  85. package/locales/ka.json +0 -9
  86. package/locales/kk.json +0 -9
  87. package/locales/km.json +0 -9
  88. package/locales/kn.json +0 -9
  89. package/locales/ko.json +0 -9
  90. package/locales/ky.json +0 -9
  91. package/locales/lo.json +0 -9
  92. package/locales/lt.json +0 -9
  93. package/locales/lv.json +0 -9
  94. package/locales/mk.json +0 -9
  95. package/locales/ml.json +0 -9
  96. package/locales/mn.json +0 -9
  97. package/locales/mr.json +0 -9
  98. package/locales/ms.json +0 -9
  99. package/locales/my.json +1 -10
  100. package/locales/ne.json +22 -31
  101. package/locales/nl.json +0 -9
  102. package/locales/no.json +0 -9
  103. package/locales/or.json +0 -9
  104. package/locales/pa.json +0 -9
  105. package/locales/pl.json +0 -9
  106. package/locales/pt-PT.json +0 -9
  107. package/locales/pt.json +0 -9
  108. package/locales/ro.json +0 -9
  109. package/locales/ru.json +0 -9
  110. package/locales/si.json +1 -10
  111. package/locales/sk.json +0 -9
  112. package/locales/sl.json +0 -9
  113. package/locales/sq.json +0 -9
  114. package/locales/sr-Latn.json +0 -9
  115. package/locales/sr.json +0 -9
  116. package/locales/sv.json +0 -9
  117. package/locales/sw.json +0 -9
  118. package/locales/ta.json +0 -9
  119. package/locales/te.json +0 -9
  120. package/locales/th.json +0 -9
  121. package/locales/tr.json +0 -9
  122. package/locales/uk.json +0 -9
  123. package/locales/ur.json +0 -9
  124. package/locales/uz.json +0 -9
  125. package/locales/vi.json +0 -9
  126. package/locales/zh-HK.json +0 -9
  127. package/locales/zh-TW.json +0 -9
  128. package/locales/zh.json +0 -9
  129. package/locales/zu.json +0 -9
  130. package/models/cpu_profile/CPUProfileDataModel.d.ts +1 -0
  131. package/models/cpu_profile/CPUProfileDataModel.js +1 -1
  132. package/models/cpu_profile/CPUProfileDataModel.js.map +1 -1
  133. package/models/cpu_profile/ProfileTreeModel.d.ts +1 -1
  134. package/models/cpu_profile/ProfileTreeModel.js +1 -1
  135. package/models/cpu_profile/ProfileTreeModel.js.map +1 -1
  136. package/models/cpu_profile/cpu_profile-tsconfig.json +6 -2
  137. package/models/cpu_profile/cpu_profile.js +1 -1
  138. package/models/cpu_profile/cpu_profile.js.map +1 -1
  139. package/models/cpu_profile/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  140. package/models/trace/EntityMapper.d.ts +33 -0
  141. package/models/trace/EntityMapper.js +123 -0
  142. package/models/trace/EntityMapper.js.map +1 -0
  143. package/models/trace/EventsSerializer.d.ts +11 -0
  144. package/models/trace/EventsSerializer.js +82 -0
  145. package/models/trace/EventsSerializer.js.map +1 -0
  146. package/models/trace/LanternComputationData.d.ts +3 -3
  147. package/models/trace/LanternComputationData.js +12 -10
  148. package/models/trace/LanternComputationData.js.map +1 -1
  149. package/models/trace/ModelImpl.d.ts +7 -14
  150. package/models/trace/ModelImpl.js +25 -52
  151. package/models/trace/ModelImpl.js.map +1 -1
  152. package/models/trace/Name.d.ts +12 -0
  153. package/models/trace/Name.js +115 -0
  154. package/models/trace/Name.js.map +1 -0
  155. package/models/trace/Processor.d.ts +1 -1
  156. package/models/trace/Processor.js +42 -61
  157. package/models/trace/Processor.js.map +1 -1
  158. package/models/trace/Styles.d.ts +50 -0
  159. package/models/trace/Styles.js +816 -0
  160. package/models/trace/Styles.js.map +1 -0
  161. package/models/trace/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  162. package/models/trace/extras/FilmStrip.d.ts +1 -1
  163. package/models/trace/extras/FilmStrip.js +7 -7
  164. package/models/trace/extras/FilmStrip.js.map +1 -1
  165. package/models/trace/extras/MainThreadActivity.js +1 -1
  166. package/models/trace/extras/MainThreadActivity.js.map +1 -1
  167. package/models/trace/extras/ScriptDuplication.js +1 -1
  168. package/models/trace/extras/ScriptDuplication.js.map +1 -1
  169. package/models/trace/extras/StackTraceForEvent.d.ts +2 -2
  170. package/models/trace/extras/StackTraceForEvent.js +21 -21
  171. package/models/trace/extras/StackTraceForEvent.js.map +1 -1
  172. package/models/trace/extras/ThirdParties.d.ts +2 -2
  173. package/models/trace/extras/ThirdParties.js +17 -17
  174. package/models/trace/extras/ThirdParties.js.map +1 -1
  175. package/models/trace/extras/TraceFilter.d.ts +1 -1
  176. package/models/trace/extras/TraceFilter.js +1 -1
  177. package/models/trace/extras/TraceFilter.js.map +1 -1
  178. package/models/trace/extras/TraceTree.d.ts +1 -0
  179. package/models/trace/extras/TraceTree.js +2 -2
  180. package/models/trace/extras/TraceTree.js.map +1 -1
  181. package/models/trace/extras/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  182. package/models/trace/extras/extras-tsconfig.json +6 -2
  183. package/models/trace/extras/extras.js.map +1 -1
  184. package/models/trace/handlers/AnimationFramesHandler.js +11 -11
  185. package/models/trace/handlers/AnimationFramesHandler.js.map +1 -1
  186. package/models/trace/handlers/AnimationHandler.js +5 -5
  187. package/models/trace/handlers/AnimationHandler.js.map +1 -1
  188. package/models/trace/handlers/AsyncJSCallsHandler.d.ts +3 -3
  189. package/models/trace/handlers/AsyncJSCallsHandler.js +9 -9
  190. package/models/trace/handlers/AsyncJSCallsHandler.js.map +1 -1
  191. package/models/trace/handlers/AuctionWorkletsHandler.js +12 -12
  192. package/models/trace/handlers/AuctionWorkletsHandler.js.map +1 -1
  193. package/models/trace/handlers/DOMStatsHandler.js +3 -3
  194. package/models/trace/handlers/DOMStatsHandler.js.map +1 -1
  195. package/models/trace/handlers/ExtensionTraceDataHandler.d.ts +15 -2
  196. package/models/trace/handlers/ExtensionTraceDataHandler.js +53 -64
  197. package/models/trace/handlers/ExtensionTraceDataHandler.js.map +1 -1
  198. package/models/trace/handlers/FlowsHandler.js +11 -11
  199. package/models/trace/handlers/FlowsHandler.js.map +1 -1
  200. package/models/trace/handlers/FramesHandler.d.ts +7 -0
  201. package/models/trace/handlers/FramesHandler.js +12 -10
  202. package/models/trace/handlers/FramesHandler.js.map +1 -1
  203. package/models/trace/handlers/GPUHandler.js +3 -3
  204. package/models/trace/handlers/GPUHandler.js.map +1 -1
  205. package/models/trace/handlers/ImagePaintingHandler.js +13 -13
  206. package/models/trace/handlers/ImagePaintingHandler.js.map +1 -1
  207. package/models/trace/handlers/InitiatorsHandler.js +32 -41
  208. package/models/trace/handlers/InitiatorsHandler.js.map +1 -1
  209. package/models/trace/handlers/InvalidationsHandler.js +63 -44
  210. package/models/trace/handlers/InvalidationsHandler.js.map +1 -1
  211. package/models/trace/handlers/LargestImagePaintHandler.js +5 -4
  212. package/models/trace/handlers/LargestImagePaintHandler.js.map +1 -1
  213. package/models/trace/handlers/LargestTextPaintHandler.js +3 -3
  214. package/models/trace/handlers/LargestTextPaintHandler.js.map +1 -1
  215. package/models/trace/handlers/LayerTreeHandler.js +11 -11
  216. package/models/trace/handlers/LayerTreeHandler.js.map +1 -1
  217. package/models/trace/handlers/LayoutShiftsHandler.d.ts +17 -4
  218. package/models/trace/handlers/LayoutShiftsHandler.js +47 -40
  219. package/models/trace/handlers/LayoutShiftsHandler.js.map +1 -1
  220. package/models/trace/handlers/MemoryHandler.js +3 -3
  221. package/models/trace/handlers/MemoryHandler.js.map +1 -1
  222. package/models/trace/handlers/MetaHandler.d.ts +22 -1
  223. package/models/trace/handlers/MetaHandler.js +30 -29
  224. package/models/trace/handlers/MetaHandler.js.map +1 -1
  225. package/models/trace/handlers/ModelHandlers.js +1 -1
  226. package/models/trace/handlers/ModelHandlers.js.map +1 -1
  227. package/models/trace/handlers/NetworkRequestsHandler.d.ts +10 -0
  228. package/models/trace/handlers/NetworkRequestsHandler.js +44 -25
  229. package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -1
  230. package/models/trace/handlers/PageFramesHandler.js +3 -3
  231. package/models/trace/handlers/PageFramesHandler.js.map +1 -1
  232. package/models/trace/handlers/PageLoadMetricsHandler.js +5 -5
  233. package/models/trace/handlers/PageLoadMetricsHandler.js.map +1 -1
  234. package/models/trace/handlers/RendererHandler.d.ts +1 -1
  235. package/models/trace/handlers/RendererHandler.js +22 -22
  236. package/models/trace/handlers/RendererHandler.js.map +1 -1
  237. package/models/trace/handlers/SamplesHandler.d.ts +2 -2
  238. package/models/trace/handlers/SamplesHandler.js +7 -9
  239. package/models/trace/handlers/SamplesHandler.js.map +1 -1
  240. package/models/trace/handlers/ScreenshotsHandler.js +9 -10
  241. package/models/trace/handlers/ScreenshotsHandler.js.map +1 -1
  242. package/models/trace/handlers/ScriptsHandler.js +9 -8
  243. package/models/trace/handlers/ScriptsHandler.js.map +1 -1
  244. package/models/trace/handlers/SelectorStatsHandler.d.ts +2 -2
  245. package/models/trace/handlers/SelectorStatsHandler.js +13 -13
  246. package/models/trace/handlers/SelectorStatsHandler.js.map +1 -1
  247. package/models/trace/handlers/Threads.d.ts +2 -2
  248. package/models/trace/handlers/Threads.js +9 -9
  249. package/models/trace/handlers/Threads.js.map +1 -1
  250. package/models/trace/handlers/UserInteractionsHandler.d.ts +10 -3
  251. package/models/trace/handlers/UserInteractionsHandler.js +104 -84
  252. package/models/trace/handlers/UserInteractionsHandler.js.map +1 -1
  253. package/models/trace/handlers/UserTimingsHandler.d.ts +21 -0
  254. package/models/trace/handlers/UserTimingsHandler.js +67 -39
  255. package/models/trace/handlers/UserTimingsHandler.js.map +1 -1
  256. package/models/trace/handlers/WarningsHandler.js +14 -14
  257. package/models/trace/handlers/WarningsHandler.js.map +1 -1
  258. package/models/trace/handlers/WorkersHandler.js +7 -7
  259. package/models/trace/handlers/WorkersHandler.js.map +1 -1
  260. package/models/trace/handlers/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  261. package/models/trace/handlers/handlers-tsconfig.json +6 -2
  262. package/models/trace/handlers/handlers.js +1 -1
  263. package/models/trace/handlers/handlers.js.map +1 -1
  264. package/models/trace/handlers/helpers.d.ts +3 -2
  265. package/models/trace/handlers/helpers.js +10 -10
  266. package/models/trace/handlers/helpers.js.map +1 -1
  267. package/models/trace/handlers/types.d.ts +25 -2
  268. package/models/trace/handlers/types.js.map +1 -1
  269. package/models/trace/helpers/Extensions.js +8 -8
  270. package/models/trace/helpers/Extensions.js.map +1 -1
  271. package/models/trace/helpers/Network.js.map +1 -1
  272. package/models/trace/helpers/SamplesIntegrator.js +11 -9
  273. package/models/trace/helpers/SamplesIntegrator.js.map +1 -1
  274. package/models/trace/helpers/SyntheticEvents.js +1 -1
  275. package/models/trace/helpers/SyntheticEvents.js.map +1 -1
  276. package/models/trace/helpers/Timing.d.ts +4 -0
  277. package/models/trace/helpers/Timing.js +6 -4
  278. package/models/trace/helpers/Timing.js.map +1 -1
  279. package/models/trace/helpers/Trace.d.ts +21 -23
  280. package/models/trace/helpers/Trace.js +188 -67
  281. package/models/trace/helpers/Trace.js.map +1 -1
  282. package/models/trace/helpers/TreeHelpers.js +1 -1
  283. package/models/trace/helpers/TreeHelpers.js.map +1 -1
  284. package/models/trace/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  285. package/models/trace/helpers/helpers-tsconfig.json +6 -2
  286. package/models/trace/helpers/helpers.js +1 -1
  287. package/models/trace/helpers/helpers.js.map +1 -1
  288. package/models/trace/insights/CLSCulprits.d.ts +2 -2
  289. package/models/trace/insights/CLSCulprits.js +14 -14
  290. package/models/trace/insights/CLSCulprits.js.map +1 -1
  291. package/models/trace/insights/Cache.d.ts +2 -1
  292. package/models/trace/insights/Cache.js +8 -5
  293. package/models/trace/insights/Cache.js.map +1 -1
  294. package/models/trace/insights/Common.d.ts +9 -1
  295. package/models/trace/insights/Common.js +33 -1
  296. package/models/trace/insights/Common.js.map +1 -1
  297. package/models/trace/insights/DOMSize.d.ts +3 -2
  298. package/models/trace/insights/DOMSize.js +10 -7
  299. package/models/trace/insights/DOMSize.js.map +1 -1
  300. package/models/trace/insights/DocumentLatency.d.ts +2 -2
  301. package/models/trace/insights/DocumentLatency.js +18 -17
  302. package/models/trace/insights/DocumentLatency.js.map +1 -1
  303. package/models/trace/insights/DuplicatedJavaScript.d.ts +2 -2
  304. package/models/trace/insights/DuplicatedJavaScript.js +5 -5
  305. package/models/trace/insights/DuplicatedJavaScript.js.map +1 -1
  306. package/models/trace/insights/FontDisplay.d.ts +2 -1
  307. package/models/trace/insights/FontDisplay.js +7 -4
  308. package/models/trace/insights/FontDisplay.js.map +1 -1
  309. package/models/trace/insights/ForcedReflow.d.ts +2 -1
  310. package/models/trace/insights/ForcedReflow.js +6 -3
  311. package/models/trace/insights/ForcedReflow.js.map +1 -1
  312. package/models/trace/insights/INPBreakdown.d.ts +3 -3
  313. package/models/trace/insights/INPBreakdown.js +16 -5
  314. package/models/trace/insights/INPBreakdown.js.map +1 -1
  315. package/models/trace/insights/ImageDelivery.d.ts +2 -2
  316. package/models/trace/insights/ImageDelivery.js +13 -13
  317. package/models/trace/insights/ImageDelivery.js.map +1 -1
  318. package/models/trace/insights/LCPBreakdown.d.ts +3 -2
  319. package/models/trace/insights/LCPBreakdown.js +21 -15
  320. package/models/trace/insights/LCPBreakdown.js.map +1 -1
  321. package/models/trace/insights/LCPDiscovery.d.ts +2 -2
  322. package/models/trace/insights/LCPDiscovery.js +9 -11
  323. package/models/trace/insights/LCPDiscovery.js.map +1 -1
  324. package/models/trace/insights/LegacyJavaScript.d.ts +1 -1
  325. package/models/trace/insights/LegacyJavaScript.js +5 -4
  326. package/models/trace/insights/LegacyJavaScript.js.map +1 -1
  327. package/models/trace/insights/Models.js +1 -1
  328. package/models/trace/insights/Models.js.map +1 -1
  329. package/models/trace/insights/ModernHTTP.d.ts +2 -2
  330. package/models/trace/insights/ModernHTTP.js +6 -6
  331. package/models/trace/insights/ModernHTTP.js.map +1 -1
  332. package/models/trace/insights/NetworkDependencyTree.d.ts +6 -3
  333. package/models/trace/insights/NetworkDependencyTree.js +19 -16
  334. package/models/trace/insights/NetworkDependencyTree.js.map +1 -1
  335. package/models/trace/insights/RenderBlocking.d.ts +2 -2
  336. package/models/trace/insights/RenderBlocking.js +11 -11
  337. package/models/trace/insights/RenderBlocking.js.map +1 -1
  338. package/models/trace/insights/SlowCSSSelector.d.ts +3 -2
  339. package/models/trace/insights/SlowCSSSelector.js +9 -6
  340. package/models/trace/insights/SlowCSSSelector.js.map +1 -1
  341. package/models/trace/insights/Statistics.js +1 -1
  342. package/models/trace/insights/Statistics.js.map +1 -1
  343. package/models/trace/insights/ThirdParties.d.ts +2 -1
  344. package/models/trace/insights/ThirdParties.js +8 -5
  345. package/models/trace/insights/ThirdParties.js.map +1 -1
  346. package/models/trace/insights/Viewport.d.ts +2 -1
  347. package/models/trace/insights/Viewport.js +8 -5
  348. package/models/trace/insights/Viewport.js.map +1 -1
  349. package/models/trace/insights/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  350. package/models/trace/insights/insights-tsconfig.json +6 -2
  351. package/models/trace/insights/insights.d.ts +2 -0
  352. package/models/trace/insights/insights.js +3 -1
  353. package/models/trace/insights/insights.js.map +1 -1
  354. package/models/trace/insights/types.d.ts +4 -1
  355. package/models/trace/insights/types.js +2 -1
  356. package/models/trace/insights/types.js.map +1 -1
  357. package/models/trace/lantern/core/LanternError.js +1 -1
  358. package/models/trace/lantern/core/LanternError.js.map +1 -1
  359. package/models/trace/lantern/core/NetworkAnalyzer.js +1 -1
  360. package/models/trace/lantern/core/NetworkAnalyzer.js.map +1 -1
  361. package/models/trace/lantern/core/core-tsconfig.json +6 -2
  362. package/models/trace/lantern/core/core.js +1 -1
  363. package/models/trace/lantern/core/core.js.map +1 -1
  364. package/models/trace/lantern/core/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  365. package/models/trace/lantern/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  366. package/models/trace/lantern/graph/BaseNode.js +1 -1
  367. package/models/trace/lantern/graph/BaseNode.js.map +1 -1
  368. package/models/trace/lantern/graph/CPUNode.js +1 -1
  369. package/models/trace/lantern/graph/CPUNode.js.map +1 -1
  370. package/models/trace/lantern/graph/NetworkNode.js +1 -1
  371. package/models/trace/lantern/graph/NetworkNode.js.map +1 -1
  372. package/models/trace/lantern/graph/PageDependencyGraph.js +1 -1
  373. package/models/trace/lantern/graph/PageDependencyGraph.js.map +1 -1
  374. package/models/trace/lantern/graph/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  375. package/models/trace/lantern/graph/graph-tsconfig.json +6 -2
  376. package/models/trace/lantern/graph/graph.js +1 -1
  377. package/models/trace/lantern/graph/graph.js.map +1 -1
  378. package/models/trace/lantern/lantern-tsconfig.json +6 -2
  379. package/models/trace/lantern/lantern.js +1 -1
  380. package/models/trace/lantern/lantern.js.map +1 -1
  381. package/models/trace/lantern/metrics/FirstContentfulPaint.js +1 -1
  382. package/models/trace/lantern/metrics/FirstContentfulPaint.js.map +1 -1
  383. package/models/trace/lantern/metrics/Interactive.js +1 -1
  384. package/models/trace/lantern/metrics/Interactive.js.map +1 -1
  385. package/models/trace/lantern/metrics/LargestContentfulPaint.js +1 -1
  386. package/models/trace/lantern/metrics/LargestContentfulPaint.js.map +1 -1
  387. package/models/trace/lantern/metrics/MaxPotentialFID.js +1 -1
  388. package/models/trace/lantern/metrics/MaxPotentialFID.js.map +1 -1
  389. package/models/trace/lantern/metrics/Metric.js +1 -1
  390. package/models/trace/lantern/metrics/Metric.js.map +1 -1
  391. package/models/trace/lantern/metrics/SpeedIndex.js +1 -1
  392. package/models/trace/lantern/metrics/SpeedIndex.js.map +1 -1
  393. package/models/trace/lantern/metrics/TBTUtils.js +1 -1
  394. package/models/trace/lantern/metrics/TBTUtils.js.map +1 -1
  395. package/models/trace/lantern/metrics/TotalBlockingTime.js +1 -1
  396. package/models/trace/lantern/metrics/TotalBlockingTime.js.map +1 -1
  397. package/models/trace/lantern/metrics/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  398. package/models/trace/lantern/metrics/metrics-tsconfig.json +6 -2
  399. package/models/trace/lantern/metrics/metrics.js +1 -1
  400. package/models/trace/lantern/metrics/metrics.js.map +1 -1
  401. package/models/trace/lantern/simulation/ConnectionPool.js +1 -1
  402. package/models/trace/lantern/simulation/ConnectionPool.js.map +1 -1
  403. package/models/trace/lantern/simulation/Constants.js +1 -1
  404. package/models/trace/lantern/simulation/Constants.js.map +1 -1
  405. package/models/trace/lantern/simulation/DNSCache.js +1 -1
  406. package/models/trace/lantern/simulation/DNSCache.js.map +1 -1
  407. package/models/trace/lantern/simulation/SimulationTimingMap.js +1 -1
  408. package/models/trace/lantern/simulation/SimulationTimingMap.js.map +1 -1
  409. package/models/trace/lantern/simulation/Simulator.js +1 -1
  410. package/models/trace/lantern/simulation/Simulator.js.map +1 -1
  411. package/models/trace/lantern/simulation/TCPConnection.js +1 -1
  412. package/models/trace/lantern/simulation/TCPConnection.js.map +1 -1
  413. package/models/trace/lantern/simulation/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  414. package/models/trace/lantern/simulation/simulation-tsconfig.json +6 -2
  415. package/models/trace/lantern/simulation/simulation.js +1 -1
  416. package/models/trace/lantern/simulation/simulation.js.map +1 -1
  417. package/models/trace/lantern/types/Lantern.js +1 -1
  418. package/models/trace/lantern/types/Lantern.js.map +1 -1
  419. package/models/trace/lantern/types/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  420. package/models/trace/lantern/types/types-tsconfig.json +6 -2
  421. package/models/trace/lantern/types/types.js +1 -1
  422. package/models/trace/lantern/types/types.js.map +1 -1
  423. package/models/trace/trace-tsconfig.json +10 -2
  424. package/models/trace/trace.d.ts +5 -1
  425. package/models/trace/trace.js +6 -2
  426. package/models/trace/trace.js.map +1 -1
  427. package/models/trace/types/Configuration.d.ts +11 -0
  428. package/models/trace/types/Configuration.js +1 -1
  429. package/models/trace/types/Configuration.js.map +1 -1
  430. package/models/trace/types/Extensions.d.ts +25 -13
  431. package/models/trace/types/Extensions.js +6 -3
  432. package/models/trace/types/Extensions.js.map +1 -1
  433. package/models/trace/types/File.d.ts +13 -2
  434. package/models/trace/types/File.js +1 -1
  435. package/models/trace/types/File.js.map +1 -1
  436. package/models/trace/types/Overlays.d.ts +5 -4
  437. package/models/trace/types/Overlays.js +1 -1
  438. package/models/trace/types/Overlays.js.map +1 -1
  439. package/models/trace/types/Timing.d.ts +1 -0
  440. package/models/trace/types/Timing.js +1 -1
  441. package/models/trace/types/Timing.js.map +1 -1
  442. package/models/trace/types/TraceEvents.d.ts +81 -61
  443. package/models/trace/types/TraceEvents.js +42 -29
  444. package/models/trace/types/TraceEvents.js.map +1 -1
  445. package/models/trace/types/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  446. package/models/trace/types/types-tsconfig.json +6 -2
  447. package/models/trace/types/types.js +1 -1
  448. package/models/trace/types/types.js.map +1 -1
  449. package/package.json +1 -1
  450. package/test/test-trace-engine.mjs +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"File.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/File.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as SDK from '../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport type * as CrUXManager from '../../../models/crux-manager/crux-manager.js';\n\nimport type {TraceWindowMicro} from './Timing.js';\nimport type {Event, LegacyTimelineFrame, ProcessID, SampleIndex, ThreadID} from './TraceEvents.js';\n\nexport interface TraceFile {\n traceEvents: readonly Event[];\n metadata: MetaData;\n}\n\nexport interface Breadcrumb {\n window: TraceWindowMicro;\n child: Breadcrumb|null;\n}\n\nexport enum DataOrigin {\n CPU_PROFILE = 'CPUProfile',\n TRACE_EVENTS = 'TraceEvents',\n}\n\n/**\n * The Entries link can have 3 stated:\n * 1. The Link creation is not started yet, meaning only the button that needs to be clicked to start creating the link is visible.\n * 2. Pending to event - the creation is started, but the entry that the link points to has not been chosen yet\n * 3. Link connected - final state, both entries present\n */\nexport enum EntriesLinkState {\n CREATION_NOT_STARTED = 'creation_not_started',\n PENDING_TO_EVENT = 'pending_to_event',\n CONNECTED = 'connected',\n}\n\nexport enum EventKeyType {\n RAW_EVENT = 'r',\n SYNTHETIC_EVENT = 's',\n PROFILE_CALL = 'p',\n LEGACY_TIMELINE_FRAME = 'l',\n}\n\n/**\n * Represents an object that is saved in the file when user created annotations in the timeline.\n *\n * Expected to add more annotations.\n */\nexport interface SerializedAnnotations {\n entryLabels: EntryLabelAnnotationSerialized[];\n labelledTimeRanges: TimeRangeAnnotationSerialized[];\n linksBetweenEntries: EntriesLinkAnnotationSerialized[];\n}\n\n/**\n * Represents an object that is used to store the Entry Label annotation that is created when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabelAnnotation {\n type: 'ENTRY_LABEL';\n entry: Event|LegacyTimelineFrame;\n label: string;\n}\n\n/**\n * Represents an object that is used to store the Labelled Time Range Annotation that is created when a user creates a Time Range Selection in the timeline.\n */\nexport interface TimeRangeAnnotation {\n type: 'TIME_RANGE';\n label: string;\n bounds: TraceWindowMicro;\n}\n\nexport interface EntriesLinkAnnotation {\n type: 'ENTRIES_LINK';\n state: EntriesLinkState;\n entryFrom: Event;\n entryTo?: Event;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabelAnnotationSerialized {\n entry: SerializableKey;\n label: string;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a time range with a label in the timeline.\n */\nexport interface TimeRangeAnnotationSerialized {\n bounds: TraceWindowMicro;\n label: string;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a link between entries in the timeline.\n */\nexport interface EntriesLinkAnnotationSerialized {\n entryFrom: SerializableKey;\n entryTo: SerializableKey;\n}\n\n/**\n * `Annotation` are the user-created annotations that are saved into the metadata.\n * Those annotations are rendered on the timeline by `Overlays.ts`\n *\n * TODO: Implement other OverlayAnnotations (annotated time ranges, links between entries).\n * TODO: Save/load overlay annotations to/from the trace file.\n */\nexport type Annotation = EntryLabelAnnotation|TimeRangeAnnotation|EntriesLinkAnnotation;\n\nexport function isTimeRangeAnnotation(annotation: Annotation): annotation is TimeRangeAnnotation {\n return annotation.type === 'TIME_RANGE';\n}\n\nexport function isEntryLabelAnnotation(annotation: Annotation): annotation is EntryLabelAnnotation {\n return annotation.type === 'ENTRY_LABEL';\n}\n\nexport function isEntriesLinkAnnotation(annotation: Annotation): annotation is EntriesLinkAnnotation {\n return annotation.type === 'ENTRIES_LINK';\n}\n\n// Serializable keys are created for trace events to be able to save\n// references to timeline events in a trace file. These keys enable\n// user modifications that can be saved. See go/cpq:event-data-json for\n// more details on the key format.\nexport type RawEventKey = `${EventKeyType.RAW_EVENT}-${number}`;\nexport type SyntheticEventKey = `${EventKeyType.SYNTHETIC_EVENT}-${number}`;\nexport type ProfileCallKey = `${EventKeyType.PROFILE_CALL}-${ProcessID}-${ThreadID}-${SampleIndex}-${Protocol.integer}`;\nexport type LegacyTimelineFrameKey = `${EventKeyType.LEGACY_TIMELINE_FRAME}-${number}`;\nexport type SerializableKey = RawEventKey|ProfileCallKey|SyntheticEventKey|LegacyTimelineFrameKey;\n\n// Serializable keys values objects contain data that maps the keys to original Trace Events\nexport interface RawEventKeyValues {\n type: EventKeyType.RAW_EVENT;\n rawIndex: number;\n}\n\nexport interface SyntheticEventKeyValues {\n type: EventKeyType.SYNTHETIC_EVENT;\n rawIndex: number;\n}\n\nexport interface ProfileCallKeyValues {\n type: EventKeyType.PROFILE_CALL;\n processID: ProcessID;\n threadID: ThreadID;\n sampleIndex: SampleIndex;\n protocol: Protocol.integer;\n}\n\nexport interface LegacyTimelineFrameKeyValues {\n type: EventKeyType.LEGACY_TIMELINE_FRAME;\n rawIndex: number;\n}\n\nexport type SerializableKeyValues =\n RawEventKeyValues|ProfileCallKeyValues|SyntheticEventKeyValues|LegacyTimelineFrameKeyValues;\n\nexport interface Modifications {\n entriesModifications: {\n // Entries hidden by the user\n hiddenEntries: SerializableKey[],\n // Entries that parent a hiddenEntry\n expandableEntries: SerializableKey[],\n };\n initialBreadcrumb: Breadcrumb;\n annotations: SerializedAnnotations;\n}\n\n// IMPORTANT: this is the same as PerfUI.FlameChart.PersistedGroupConfig\n// However, the PerfUI code should not depend on the model/trace, and similarly\n// this model cannot depend on that code, so we duplicate it.\nexport interface TrackVisualConfig {\n hidden: boolean;\n expanded: boolean;\n originalIndex: number;\n visualIndex: number;\n trackName: string;\n}\n\n/**\n * Stores the visual config if the user has modified it. Split into \"main\" and\n * \"network\" so we can pass the relevant config into the right data provider.\n * NOTE: as of August 2025 (M141) we currently do not export this in new\n * traces, or use it if an existing trace is imported with it.\n */\nexport interface PersistedTraceVisualConfig {\n main: TrackVisualConfig[]|null;\n network: TrackVisualConfig[]|null;\n}\n\n/**\n * Trace metadata that we persist to the file. This will allow us to\n * store specifics for the trace, e.g., which tracks should be visible\n * on load.\n */\nexport interface MetaData {\n source?: 'DevTools';\n startTime?: string;\n emulatedDeviceTitle?: string;\n // Only set if network throttling is active.\n networkThrottling?: string;\n // Only set if network throttling is active.\n networkThrottlingConditions?: Omit<SDK.NetworkManager.Conditions, 'title'>;\n // Only set if CPU throttling is active.\n cpuThrottling?: number;\n dataOrigin?: DataOrigin;\n enhancedTraceVersion?: number;\n modifications?: Modifications;\n cruxFieldData?: CrUXManager.PageResult[];\n /** Currently only stores JS maps, not CSS. This never stores data url source maps. */\n sourceMaps?: MetadataSourceMap[];\n visualTrackConfig?: PersistedTraceVisualConfig;\n hostDPR?: number;\n}\n\ninterface MetadataSourceMap {\n url: string;\n /** If not defined, then this was a data url. */\n sourceMapUrl?: string;\n sourceMap: SDK.SourceMap.SourceMapV3;\n}\n\nexport type Contents = TraceFile|Event[];\n\nexport function traceEventKeyToValues(key: SerializableKey): SerializableKeyValues {\n const parts = key.split('-');\n const type = parts[0];\n\n switch (type) {\n case EventKeyType.PROFILE_CALL:\n if (parts.length !== 5 ||\n !(parts.every((part, i) => i === 0 || typeof part === 'number' || !isNaN(parseInt(part, 10))))) {\n throw new Error(`Invalid ProfileCallKey: ${key}`);\n }\n return {\n type: parts[0],\n processID: parseInt(parts[1], 10),\n threadID: parseInt(parts[2], 10),\n sampleIndex: parseInt(parts[3], 10),\n protocol: parseInt(parts[4], 10),\n } as ProfileCallKeyValues;\n case EventKeyType.RAW_EVENT:\n if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {\n throw new Error(`Invalid RawEvent Key: ${key}`);\n }\n return {\n type: parts[0],\n rawIndex: parseInt(parts[1], 10),\n } as RawEventKeyValues;\n case EventKeyType.SYNTHETIC_EVENT:\n if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {\n throw new Error(`Invalid SyntheticEvent Key: ${key}`);\n }\n return {\n type: parts[0],\n rawIndex: parseInt(parts[1], 10),\n } as SyntheticEventKeyValues;\n case EventKeyType.LEGACY_TIMELINE_FRAME: {\n if (parts.length !== 2 || Number.isNaN(parseInt(parts[1], 10))) {\n throw new Error(`Invalid LegacyTimelineFrame Key: ${key}`);\n }\n return {\n type,\n rawIndex: parseInt(parts[1], 10),\n };\n }\n\n default:\n throw new Error(`Unknown trace event key: ${key}`);\n }\n}\n"]}
1
+ {"version":3,"file":"File.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/File.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2023 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as SDK from '../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport type * as CrUXManager from '../../../models/crux-manager/crux-manager.js';\n\nimport type {TraceWindowMicro} from './Timing.js';\nimport type {Event, LegacyTimelineFrame, ProcessID, SampleIndex, ThreadID} from './TraceEvents.js';\n\nexport interface TraceFile {\n traceEvents: readonly Event[];\n metadata: MetaData;\n}\n\nexport interface Breadcrumb {\n window: TraceWindowMicro;\n child: Breadcrumb|null;\n}\n\nexport enum DataOrigin {\n CPU_PROFILE = 'CPUProfile',\n TRACE_EVENTS = 'TraceEvents',\n}\n\n/**\n * The Entries link can have 3 stated:\n * 1. The Link creation is not started yet, meaning only the button that needs to be clicked to start creating the link is visible.\n * 2. Pending to event - the creation is started, but the entry that the link points to has not been chosen yet\n * 3. Link connected - final state, both entries present\n */\nexport enum EntriesLinkState {\n CREATION_NOT_STARTED = 'creation_not_started',\n PENDING_TO_EVENT = 'pending_to_event',\n CONNECTED = 'connected',\n}\n\nexport enum EventKeyType {\n RAW_EVENT = 'r',\n SYNTHETIC_EVENT = 's',\n PROFILE_CALL = 'p',\n LEGACY_TIMELINE_FRAME = 'l',\n}\n\n/**\n * Represents an object that is saved in the file when user created annotations in the timeline.\n *\n * Expected to add more annotations.\n */\nexport interface SerializedAnnotations {\n entryLabels: EntryLabelAnnotationSerialized[];\n labelledTimeRanges: TimeRangeAnnotationSerialized[];\n linksBetweenEntries: EntriesLinkAnnotationSerialized[];\n}\n\n/**\n * Represents an object that is used to store the Entry Label annotation that is created when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabelAnnotation {\n type: 'ENTRY_LABEL';\n entry: Event|LegacyTimelineFrame;\n label: string;\n}\n\n/**\n * Represents an object that is used to store the Labelled Time Range Annotation that is created when a user creates a Time Range Selection in the timeline.\n */\nexport interface TimeRangeAnnotation {\n type: 'TIME_RANGE';\n label: string;\n bounds: TraceWindowMicro;\n}\n\nexport interface EntriesLinkAnnotation {\n type: 'ENTRIES_LINK';\n state: EntriesLinkState;\n entryFrom: Event;\n entryTo?: Event;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabelAnnotationSerialized {\n entry: SerializableKey;\n label: string;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a time range with a label in the timeline.\n */\nexport interface TimeRangeAnnotationSerialized {\n bounds: TraceWindowMicro;\n label: string;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a link between entries in the timeline.\n */\nexport interface EntriesLinkAnnotationSerialized {\n entryFrom: SerializableKey;\n entryTo: SerializableKey;\n}\n\n/**\n * `Annotation` are the user-created annotations that are saved into the metadata.\n * Those annotations are rendered on the timeline by `Overlays.ts`\n *\n * TODO: Implement other OverlayAnnotations (annotated time ranges, links between entries).\n * TODO: Save/load overlay annotations to/from the trace file.\n */\nexport type Annotation = EntryLabelAnnotation|TimeRangeAnnotation|EntriesLinkAnnotation;\n\nexport function isTimeRangeAnnotation(annotation: Annotation): annotation is TimeRangeAnnotation {\n return annotation.type === 'TIME_RANGE';\n}\n\nexport function isEntryLabelAnnotation(annotation: Annotation): annotation is EntryLabelAnnotation {\n return annotation.type === 'ENTRY_LABEL';\n}\n\nexport function isEntriesLinkAnnotation(annotation: Annotation): annotation is EntriesLinkAnnotation {\n return annotation.type === 'ENTRIES_LINK';\n}\n\n/**\n * Serializable keys are created for trace events to be able to save\n * references to timeline events in a trace file. These keys enable\n * user modifications that can be saved. See go/cpq:event-data-json for\n * more details on the key format.\n **/\nexport type RawEventKey = `${EventKeyType.RAW_EVENT}-${number}`;\nexport type SyntheticEventKey = `${EventKeyType.SYNTHETIC_EVENT}-${number}`;\nexport type ProfileCallKey = `${EventKeyType.PROFILE_CALL}-${ProcessID}-${ThreadID}-${SampleIndex}-${Protocol.integer}`;\nexport type LegacyTimelineFrameKey = `${EventKeyType.LEGACY_TIMELINE_FRAME}-${number}`;\nexport type SerializableKey = RawEventKey|ProfileCallKey|SyntheticEventKey|LegacyTimelineFrameKey;\n\n/** Serializable keys values objects contain data that maps the keys to original Trace Events **/\nexport interface RawEventKeyValues {\n type: EventKeyType.RAW_EVENT;\n rawIndex: number;\n}\n\nexport interface SyntheticEventKeyValues {\n type: EventKeyType.SYNTHETIC_EVENT;\n rawIndex: number;\n}\n\nexport interface ProfileCallKeyValues {\n type: EventKeyType.PROFILE_CALL;\n processID: ProcessID;\n threadID: ThreadID;\n sampleIndex: SampleIndex;\n protocol: Protocol.integer;\n}\n\nexport interface LegacyTimelineFrameKeyValues {\n type: EventKeyType.LEGACY_TIMELINE_FRAME;\n rawIndex: number;\n}\n\nexport type SerializableKeyValues =\n RawEventKeyValues|ProfileCallKeyValues|SyntheticEventKeyValues|LegacyTimelineFrameKeyValues;\n\nexport interface Modifications {\n entriesModifications: {\n // Entries hidden by the user\n hiddenEntries: SerializableKey[],\n // Entries that parent a hiddenEntry\n expandableEntries: SerializableKey[],\n };\n initialBreadcrumb: Breadcrumb;\n annotations: SerializedAnnotations;\n}\n\n/**\n * IMPORTANT: this is the same as PerfUI.FlameChart.PersistedGroupConfig\n * However, the PerfUI code should not depend on the model/trace, and similarly\n * this model cannot depend on that code, so we duplicate it.\n **/\nexport interface TrackVisualConfig {\n hidden: boolean;\n expanded: boolean;\n originalIndex: number;\n visualIndex: number;\n trackName: string;\n}\n\n/**\n * Stores the visual config if the user has modified it. Split into \"main\" and\n * \"network\" so we can pass the relevant config into the right data provider.\n * NOTE: as of August 2025 (M141) we currently do not export this in new\n * traces, or use it if an existing trace is imported with it.\n */\nexport interface PersistedTraceVisualConfig {\n main: TrackVisualConfig[]|null;\n network: TrackVisualConfig[]|null;\n}\n\n/**\n * Trace metadata that we persist to the file. This will allow us to\n * store specifics for the trace, e.g., which tracks should be visible\n * on load.\n */\nexport interface MetaData {\n source?: 'DevTools';\n startTime?: string;\n emulatedDeviceTitle?: string;\n // Only set if network throttling is active.\n networkThrottling?: string;\n // Only set if network throttling is active.\n networkThrottlingConditions?: Omit<SDK.NetworkManager.Conditions, 'title'>;\n // Only set if CPU throttling is active.\n cpuThrottling?: number;\n dataOrigin?: DataOrigin;\n enhancedTraceVersion?: number;\n modifications?: Modifications;\n cruxFieldData?: CrUXManager.PageResult[];\n /** Currently only stores JS maps, not CSS. This never stores data url source maps. */\n sourceMaps?: MetadataSourceMap[];\n visualTrackConfig?: PersistedTraceVisualConfig;\n hostDPR?: number;\n}\n\nexport interface MetadataSourceMap {\n url: string;\n /** If not defined, then this was a data url. */\n sourceMapUrl?: string;\n sourceMap: SDK.SourceMap.SourceMapV3;\n}\n\nexport type Contents = TraceFile|Event[];\n\nexport function traceEventKeyToValues(key: SerializableKey): SerializableKeyValues {\n const parts = key.split('-');\n const type = parts[0];\n\n switch (type) {\n case EventKeyType.PROFILE_CALL:\n if (parts.length !== 5 ||\n !(parts.every((part, i) => i === 0 || typeof part === 'number' || !isNaN(parseInt(part, 10))))) {\n throw new Error(`Invalid ProfileCallKey: ${key}`);\n }\n return {\n type: parts[0],\n processID: parseInt(parts[1], 10),\n threadID: parseInt(parts[2], 10),\n sampleIndex: parseInt(parts[3], 10),\n protocol: parseInt(parts[4], 10),\n } as ProfileCallKeyValues;\n case EventKeyType.RAW_EVENT:\n if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {\n throw new Error(`Invalid RawEvent Key: ${key}`);\n }\n return {\n type: parts[0],\n rawIndex: parseInt(parts[1], 10),\n } as RawEventKeyValues;\n case EventKeyType.SYNTHETIC_EVENT:\n if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {\n throw new Error(`Invalid SyntheticEvent Key: ${key}`);\n }\n return {\n type: parts[0],\n rawIndex: parseInt(parts[1], 10),\n } as SyntheticEventKeyValues;\n case EventKeyType.LEGACY_TIMELINE_FRAME: {\n if (parts.length !== 2 || Number.isNaN(parseInt(parts[1], 10))) {\n throw new Error(`Invalid LegacyTimelineFrame Key: ${key}`);\n }\n return {\n type,\n rawIndex: parseInt(parts[1], 10),\n };\n }\n\n default:\n throw new Error(`Unknown trace event key: ${key}`);\n }\n}\n"]}
@@ -1,5 +1,3 @@
1
- // import type * as UI from '../../../ui/legacy/legacy.js';
2
- // import type * as Lit from '../../../ui/lit/lit.js';
3
1
  import type { EntriesLinkState } from './File.js';
4
2
  import type { Micro, TraceWindowMicro } from './Timing.js';
5
3
  import type { Event, LegacyTimelineFrame, PageLoadEvent } from './TraceEvents.js';
@@ -73,7 +71,7 @@ export interface CandyStripedTimeRange {
73
71
  */
74
72
  export interface TimespanBreakdownEntryBreakdown {
75
73
  bounds: TraceWindowMicro;
76
- label: string | any;
74
+ label: string | HTMLElement;
77
75
  showDuration: boolean;
78
76
  }
79
77
  /**
@@ -107,7 +105,10 @@ export interface TimingsMarkerFieldResult {
107
105
  }
108
106
  export interface BottomInfoBar {
109
107
  type: 'BOTTOM_INFO_BAR';
110
- infobar: any;
108
+ infobar: {
109
+ element: HTMLElement;
110
+ dispose: () => void;
111
+ };
111
112
  }
112
113
  /**
113
114
  * All supported overlay types.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Chromium Authors. All rights reserved.
1
+ // Copyright 2025 The Chromium Authors
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Overlays.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Overlays.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B","sourcesContent":["// Copyright 2025 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as UI from '../../../ui/legacy/legacy.js';\nimport type * as Lit from '../../../ui/lit/lit.js';\n\nimport type {EntriesLinkState} from './File.js';\nimport type {Micro, TraceWindowMicro} from './Timing.js';\nimport type {Event, LegacyTimelineFrame, PageLoadEvent} from './TraceEvents.js';\n\n/**\n * Represents which flamechart an entry is rendered in.\n * We need to know this because when we place an overlay for an entry we need\n * to adjust its Y value if it's in the main chart which is drawn below the\n * network chart\n */\nexport type EntryChartLocation = 'main'|'network';\n\n/**\n * You can add overlays to trace events, but also right now frames are drawn on\n * the timeline but they are not trace events, so we need to allow for that.\n * In the future when the frames track has been migrated to be powered by\n * animation frames (crbug.com/345144583), we can remove the requirement to\n * support TimelineFrame instances (which themselves will be removed from the\n * codebase.)\n */\nexport type OverlayEntry = Event|LegacyTimelineFrame;\n\n/**\n * Represents when a user has selected an entry in the timeline\n */\nexport interface EntrySelected {\n type: 'ENTRY_SELECTED';\n entry: OverlayEntry;\n}\n\n/**\n * Drawn around an entry when we want to highlight it to the user.\n */\nexport interface EntryOutline {\n type: 'ENTRY_OUTLINE';\n entry: OverlayEntry;\n outlineReason: 'ERROR'|'INFO';\n}\n\n/**\n * Represents an object created when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabel {\n type: 'ENTRY_LABEL';\n entry: OverlayEntry;\n label: string;\n}\n\nexport interface EntriesLink {\n type: 'ENTRIES_LINK';\n state: EntriesLinkState;\n entryFrom: OverlayEntry;\n entryTo?: OverlayEntry;\n}\n\n/**\n * Represents a time range on the trace. Also used when the user shift+clicks\n * and drags to create a time range.\n */\nexport interface TimeRangeLabel {\n type: 'TIME_RANGE';\n bounds: TraceWindowMicro;\n label: string;\n showDuration: boolean;\n}\n\n/**\n * Used to highlight with a red-candy stripe a time range. It takes an entry\n * because this entry is the row that will be used to place the candy stripe,\n * and its height will be set to the height of that row.\n */\nexport interface CandyStripedTimeRange {\n type: 'CANDY_STRIPED_TIME_RANGE';\n bounds: TraceWindowMicro;\n entry: Event;\n}\n\n/**\n * An EntryBreakdown, or section, that makes up a TimespanBreakdown.\n */\nexport interface TimespanBreakdownEntryBreakdown {\n bounds: TraceWindowMicro;\n label: string|Lit.LitTemplate;\n showDuration: boolean;\n}\n\n/**\n * Represents a timespan on a trace broken down into parts. Each part has a label to it.\n * If an entry is defined, the breakdown will be vertically positioned based on it.\n */\nexport interface TimespanBreakdown {\n type: 'TIMESPAN_BREAKDOWN';\n sections: TimespanBreakdownEntryBreakdown[];\n entry?: Event;\n renderLocation?: 'BOTTOM_OF_TIMELINE'|'BELOW_EVENT'|'ABOVE_EVENT';\n}\n\nexport interface TimestampMarker {\n type: 'TIMESTAMP_MARKER';\n timestamp: Micro;\n}\n\n/**\n * Represents a timings marker. This has a line that runs up the whole canvas.\n * We can hold an array of entries, in the case we want to hold more than one with the same timestamp.\n * The adjusted timestamp being the timestamp for the event adjusted by closest navigation.\n */\nexport interface TimingsMarker {\n type: 'TIMINGS_MARKER';\n entries: PageLoadEvent[];\n entryToFieldResult: Map<PageLoadEvent, TimingsMarkerFieldResult>;\n adjustedTimestamp: Micro;\n}\n\nexport interface TimingsMarkerFieldResult {\n value: Micro;\n pageScope: 'url'|'origin';\n}\n\nexport interface BottomInfoBar {\n type: 'BOTTOM_INFO_BAR';\n infobar: UI.Infobar.Infobar;\n}\n\n/**\n * All supported overlay types.\n */\nexport type Overlay = EntrySelected|EntryOutline|TimeRangeLabel|EntryLabel|EntriesLink|TimespanBreakdown|\n TimestampMarker|CandyStripedTimeRange|TimingsMarker|BottomInfoBar;\n"]}
1
+ {"version":3,"file":"Overlays.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Overlays.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B","sourcesContent":["// Copyright 2025 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type {EntriesLinkState} from './File.js';\nimport type {Micro, TraceWindowMicro} from './Timing.js';\nimport type {Event, LegacyTimelineFrame, PageLoadEvent} from './TraceEvents.js';\n\n/**\n * Represents which flamechart an entry is rendered in.\n * We need to know this because when we place an overlay for an entry we need\n * to adjust its Y value if it's in the main chart which is drawn below the\n * network chart\n */\nexport type EntryChartLocation = 'main'|'network';\n\n/**\n * You can add overlays to trace events, but also right now frames are drawn on\n * the timeline but they are not trace events, so we need to allow for that.\n * In the future when the frames track has been migrated to be powered by\n * animation frames (crbug.com/345144583), we can remove the requirement to\n * support TimelineFrame instances (which themselves will be removed from the\n * codebase.)\n */\nexport type OverlayEntry = Event|LegacyTimelineFrame;\n\n/**\n * Represents when a user has selected an entry in the timeline\n */\nexport interface EntrySelected {\n type: 'ENTRY_SELECTED';\n entry: OverlayEntry;\n}\n\n/**\n * Drawn around an entry when we want to highlight it to the user.\n */\nexport interface EntryOutline {\n type: 'ENTRY_OUTLINE';\n entry: OverlayEntry;\n outlineReason: 'ERROR'|'INFO';\n}\n\n/**\n * Represents an object created when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabel {\n type: 'ENTRY_LABEL';\n entry: OverlayEntry;\n label: string;\n}\n\nexport interface EntriesLink {\n type: 'ENTRIES_LINK';\n state: EntriesLinkState;\n entryFrom: OverlayEntry;\n entryTo?: OverlayEntry;\n}\n\n/**\n * Represents a time range on the trace. Also used when the user shift+clicks\n * and drags to create a time range.\n */\nexport interface TimeRangeLabel {\n type: 'TIME_RANGE';\n bounds: TraceWindowMicro;\n label: string;\n showDuration: boolean;\n}\n\n/**\n * Used to highlight with a red-candy stripe a time range. It takes an entry\n * because this entry is the row that will be used to place the candy stripe,\n * and its height will be set to the height of that row.\n */\nexport interface CandyStripedTimeRange {\n type: 'CANDY_STRIPED_TIME_RANGE';\n bounds: TraceWindowMicro;\n entry: Event;\n}\n\n/**\n * An EntryBreakdown, or section, that makes up a TimespanBreakdown.\n */\nexport interface TimespanBreakdownEntryBreakdown {\n bounds: TraceWindowMicro;\n label: string|HTMLElement;\n showDuration: boolean;\n}\n\n/**\n * Represents a timespan on a trace broken down into parts. Each part has a label to it.\n * If an entry is defined, the breakdown will be vertically positioned based on it.\n */\nexport interface TimespanBreakdown {\n type: 'TIMESPAN_BREAKDOWN';\n sections: TimespanBreakdownEntryBreakdown[];\n entry?: Event;\n renderLocation?: 'BOTTOM_OF_TIMELINE'|'BELOW_EVENT'|'ABOVE_EVENT';\n}\n\nexport interface TimestampMarker {\n type: 'TIMESTAMP_MARKER';\n timestamp: Micro;\n}\n\n/**\n * Represents a timings marker. This has a line that runs up the whole canvas.\n * We can hold an array of entries, in the case we want to hold more than one with the same timestamp.\n * The adjusted timestamp being the timestamp for the event adjusted by closest navigation.\n */\nexport interface TimingsMarker {\n type: 'TIMINGS_MARKER';\n entries: PageLoadEvent[];\n entryToFieldResult: Map<PageLoadEvent, TimingsMarkerFieldResult>;\n adjustedTimestamp: Micro;\n}\n\nexport interface TimingsMarkerFieldResult {\n value: Micro;\n pageScope: 'url'|'origin';\n}\n\nexport interface BottomInfoBar {\n type: 'BOTTOM_INFO_BAR';\n // In DevTools, this infobar is a UI.Infobar.Infobar but we can't refer to\n // the type here.\n infobar: {\n element: HTMLElement,\n dispose: () => void,\n };\n}\n\n/**\n * All supported overlay types.\n */\nexport type Overlay = EntrySelected|EntryOutline|TimeRangeLabel|EntryLabel|EntriesLink|TimespanBreakdown|\n TimestampMarker|CandyStripedTimeRange|TimingsMarker|BottomInfoBar;\n"]}
@@ -15,5 +15,6 @@ export interface TraceWindow<TimeFormat extends Micro | Milli> {
15
15
  max: TimeFormat;
16
16
  range: TimeFormat;
17
17
  }
18
+ /** See front_end/models/trace/helpers/Timing.ts for helpful utility functions like traceWindowFromMicroSeconds **/
18
19
  export type TraceWindowMicro = TraceWindow<Micro>;
19
20
  export type TraceWindowMilli = TraceWindow<Milli>;
@@ -1,4 +1,4 @@
1
- // Copyright 2022 The Chromium Authors. All rights reserved.
1
+ // Copyright 2022 The Chromium Authors
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -1 +1 @@
1
- {"version":3,"file":"Timing.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Timing.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,gEAAgE;AAChE,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,KAAc,CAAC;AACxB,CAAC;AAGD,gEAAgE;AAChE,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,KAAc,CAAC;AACxB,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,OAAO,KAAgB,CAAC;AAC1B,CAAC","sourcesContent":["// Copyright 2022 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport type Micro = number&{_tag: 'MicroSeconds'};\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function Micro(value: number): Micro {\n return value as Micro;\n}\n\nexport type Milli = number&{_tag: 'MilliSeconds'};\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function Milli(value: number): Milli {\n return value as Milli;\n}\nexport type Seconds = number&{_tag: 'Seconds'};\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function Seconds(value: number): Seconds {\n return value as Seconds;\n}\n\nexport interface TraceWindow<TimeFormat extends Micro|Milli> {\n min: TimeFormat;\n max: TimeFormat;\n range: TimeFormat;\n}\n\n// See front_end/models/trace/helpers/Timing.ts for helpful utility functions like traceWindowFromMicroSeconds\nexport type TraceWindowMicro = TraceWindow<Micro>;\nexport type TraceWindowMilli = TraceWindow<Milli>;\n"]}
1
+ {"version":3,"file":"Timing.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Timing.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAG7B,gEAAgE;AAChE,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,KAAc,CAAC;AACxB,CAAC;AAGD,gEAAgE;AAChE,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,KAAc,CAAC;AACxB,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,OAAO,KAAgB,CAAC;AAC1B,CAAC","sourcesContent":["// Copyright 2022 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport type Micro = number&{_tag: 'MicroSeconds'};\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function Micro(value: number): Micro {\n return value as Micro;\n}\n\nexport type Milli = number&{_tag: 'MilliSeconds'};\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function Milli(value: number): Milli {\n return value as Milli;\n}\nexport type Seconds = number&{_tag: 'Seconds'};\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function Seconds(value: number): Seconds {\n return value as Seconds;\n}\n\nexport interface TraceWindow<TimeFormat extends Micro|Milli> {\n min: TimeFormat;\n max: TimeFormat;\n range: TimeFormat;\n}\n\n/** See front_end/models/trace/helpers/Timing.ts for helpful utility functions like traceWindowFromMicroSeconds **/\nexport type TraceWindowMicro = TraceWindow<Micro>;\nexport type TraceWindowMilli = TraceWindow<Milli>;\n"]}
@@ -1,7 +1,8 @@
1
1
  import type * as Platform from '../../../core/platform/platform.js';
2
+ // import type * as SDK from '../../../core/sdk/sdk.js';
2
3
  import type * as Protocol from '../../../generated/protocol.js';
3
- import type { ExtensionTrackEntryPayloadDeeplink } from './Extensions.js';
4
4
  import type { Micro, Milli, Seconds, TraceWindowMicro } from './Timing.js';
5
+ /** Trace Events. **/
5
6
  export declare enum Phase {
6
7
  BEGIN = "B",
7
8
  END = "E",
@@ -203,6 +204,10 @@ export interface End extends Event {
203
204
  * the RendererHandler.
204
205
  */
205
206
  export type SyntheticComplete = Complete;
207
+ /**
208
+ * TODO(paulirish): Migrate to the new (Sept 2024) EventTiming trace events.
209
+ * See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/timing/window_performance.cc;l=900-901;drc=b503c262e425eae59ced4a80d59d176ed07152c7
210
+ **/
206
211
  export type EventTimingBeginOrEnd = EventTimingBegin | EventTimingEnd;
207
212
  export interface EventTimingBegin extends Event {
208
213
  ph: Phase.ASYNC_NESTABLE_START;
@@ -248,6 +253,11 @@ export interface SyntheticNetworkRedirect {
248
253
  ts: Micro;
249
254
  dur: Micro;
250
255
  }
256
+ /**
257
+ * ProcessedArgsData is used to store the processed data of a network
258
+ * request. Which is used to distinguish from the date we extract from the
259
+ * trace event directly.
260
+ **/
251
261
  interface SyntheticArgsData {
252
262
  dnsLookup: Micro;
253
263
  download: Micro;
@@ -268,8 +278,10 @@ interface SyntheticArgsData {
268
278
  ssl: Micro;
269
279
  stalled: Micro;
270
280
  totalTime: Micro;
271
- /** Server response time (receiveHeadersEnd - sendEnd) */
281
+ /** receiveHeadersEnd - sendEnd */
272
282
  waiting: Micro;
283
+ /** receiveHeadersStart - sendEnd */
284
+ serverResponseTime: Micro;
273
285
  }
274
286
  export interface SyntheticNetworkRequest extends Complete, SyntheticBased<Phase.COMPLETE> {
275
287
  rawSourceEvent: ResourceSendRequest;
@@ -295,7 +307,7 @@ export interface SyntheticNetworkRequest extends Complete, SyntheticBased<Phase.
295
307
  *
296
308
  * Note, this is not the same as URL.protocol.
297
309
  *
298
- * Example values (not exhaustive): http/0.9, http/1.0, http/1.1, http, h2, h3-Q050, data, blob
310
+ * Example values (not exhaustive): http/0.9, http/1.0, http/1.1, http, h2, h3-Q050, data, blob, file
299
311
  */
300
312
  protocol: string;
301
313
  redirects: SyntheticNetworkRedirect[];
@@ -323,6 +335,8 @@ export interface SyntheticNetworkRequest extends Complete, SyntheticBased<Phase.
323
335
  initiator?: Initiator;
324
336
  requestMethod?: string;
325
337
  timing?: ResourceReceiveResponseTimingData;
338
+ /** Server response time according to Lightrider. */
339
+ lrServerResponseTime?: Milli;
326
340
  };
327
341
  };
328
342
  cat: 'loading';
@@ -763,16 +777,16 @@ export interface SyntheticLayoutShift extends Omit<LayoutShift, 'name'>, Synthet
763
777
  }
764
778
  export declare const NO_NAVIGATION = "NO_NAVIGATION";
765
779
  /**
766
- * This maybe be a navigation id string from Chromium, or `NO_NAVIGATION`, which represents the
780
+ * This maybe be a navigation id string from Chrome, or `NO_NAVIGATION`, which represents the
767
781
  * portion of the trace for which we don't have any navigation event for (as it happeneded prior
768
782
  * to the trace start).
769
783
  */
770
784
  export type NavigationId = string | typeof NO_NAVIGATION;
771
785
  /**
772
- * This is a synthetic Layout shift cluster. Not based on a raw event as there's no concept
773
- * of this as a trace event.
786
+ * This is a synthetic Layout shift cluster. The rawSourceEvent is the worst layout shift event
787
+ * in the cluster.
774
788
  */
775
- export interface SyntheticLayoutShiftCluster {
789
+ export interface SyntheticLayoutShiftCluster extends SyntheticBased<Phase.COMPLETE> {
776
790
  name: 'SyntheticLayoutShiftCluster';
777
791
  clusterWindow: TraceWindowMicro;
778
792
  clusterCumulativeScore: number;
@@ -870,7 +884,8 @@ interface ResourceReceiveResponseTimingData {
870
884
  pushEnd: Milli;
871
885
  pushStart: Milli;
872
886
  receiveHeadersEnd: Milli;
873
- receiveHeadersStart: Milli;
887
+ /** M116. */
888
+ receiveHeadersStart?: Milli;
874
889
  /** When the network service is about to handle a request, ie. just before going to the HTTP cache or going to the network for DNS/connection setup. */
875
890
  requestTime: Seconds;
876
891
  sendEnd: Milli;
@@ -1077,6 +1092,9 @@ export interface PairableAsyncInstant extends PairableAsync {
1077
1092
  export interface PairableAsyncEnd extends PairableAsync {
1078
1093
  ph: Phase.ASYNC_NESTABLE_END;
1079
1094
  }
1095
+ export declare function isPairableAsyncBegin(e: Event): e is PairableAsyncBegin;
1096
+ export declare function isPairableAsyncEnd(e: Event): e is PairableAsyncEnd;
1097
+ export declare function isPairableAsyncInstant(e: Event): e is PairableAsyncInstant;
1080
1098
  export interface AnimationFrame extends PairableAsync {
1081
1099
  name: Name.ANIMATION_FRAME;
1082
1100
  args?: AnimationFrameArgs;
@@ -1174,9 +1192,7 @@ export interface ConsoleTimeStamp extends Event {
1174
1192
  track?: string | number;
1175
1193
  trackGroup?: string | number;
1176
1194
  color?: string | number;
1177
- devtools?: {
1178
- link: ExtensionTrackEntryPayloadDeeplink;
1179
- };
1195
+ devtools?: string;
1180
1196
  sampleTraceId?: number;
1181
1197
  };
1182
1198
  };
@@ -1295,6 +1311,10 @@ declare const enum FrameType {
1295
1311
  FORKED = "FORKED",
1296
1312
  BACKFILL = "BACKFILL"
1297
1313
  }
1314
+ /**
1315
+ * TODO(crbug.com/409484302): Remove once Chrome migrates from
1316
+ * ChromeTrackEvent.chrome_frame_reporter to ChromeTrackEvent.frame_reporter.
1317
+ **/
1298
1318
  export interface OldChromeFrameReporterArgs {
1299
1319
  chrome_frame_reporter: ChromeFrameReporter;
1300
1320
  }
@@ -1309,12 +1329,26 @@ export interface PipelineReporter extends Event {
1309
1329
  args: Args & (OldChromeFrameReporterArgs | NewChromeFrameReporterArgs);
1310
1330
  }
1311
1331
  export declare function isPipelineReporter(event: Event): event is PipelineReporter;
1332
+ /**
1333
+ * A type used for synthetic events created based on a raw trace event.
1334
+ * A branded type is used to ensure not all events can be typed as
1335
+ * SyntheticBased and prevent places different to the
1336
+ * SyntheticEventsManager from creating synthetic events. This is
1337
+ * because synthetic events need to be registered in order to resolve
1338
+ * serialized event keys into event objects, so we ensure events are
1339
+ * registered at the time they are created by the SyntheticEventsManager.
1340
+ **/
1312
1341
  export interface SyntheticBased<Ph extends Phase = Phase, T extends Event = Event> extends Event {
1313
1342
  ph: Ph;
1314
1343
  rawSourceEvent: T;
1315
1344
  _tag: 'SyntheticEntryTag';
1316
1345
  }
1317
1346
  export declare function isSyntheticBased(event: Event): event is SyntheticBased;
1347
+ /**
1348
+ * Nestable async events with a duration are made up of two distinct
1349
+ * events: the begin, and the end. We need both of them to be able to
1350
+ * display the right information, so we create these synthetic events.
1351
+ **/
1318
1352
  export interface SyntheticEventPair<T extends PairableAsync = PairableAsync> extends SyntheticBased<Phase, T> {
1319
1353
  rawSourceEvent: T;
1320
1354
  name: T['name'];
@@ -1455,6 +1489,7 @@ export interface RasterTask extends Complete {
1455
1489
  };
1456
1490
  }
1457
1491
  export declare function isRasterTask(event: Event): event is RasterTask;
1492
+ /** CompositeLayers has been replaced by "Commit", but we support both to not break old traces being imported. **/
1458
1493
  export interface CompositeLayers extends Instant {
1459
1494
  name: Name.COMPOSITE_LAYERS;
1460
1495
  args: Args & {
@@ -1526,8 +1561,8 @@ export interface SelectorStats extends Complete {
1526
1561
  };
1527
1562
  }
1528
1563
  export declare function isSelectorStats(event: Event): event is SelectorStats;
1529
- export interface UpdateLayoutTree extends Complete {
1530
- name: Name.UPDATE_LAYOUT_TREE;
1564
+ export interface RecalcStyle extends Complete {
1565
+ name: Name.RECALC_STYLE;
1531
1566
  args: Args & {
1532
1567
  elementCount: number;
1533
1568
  beginData?: {
@@ -1537,7 +1572,8 @@ export interface UpdateLayoutTree extends Complete {
1537
1572
  };
1538
1573
  };
1539
1574
  }
1540
- export declare function isUpdateLayoutTree(event: Event): event is UpdateLayoutTree;
1575
+ /** The real trace event is called 'UpdateLayoutTree' but we've aliased it for convenience. */
1576
+ export declare function isRecalcStyle(event: Event): event is RecalcStyle;
1541
1577
  export interface Layout extends Complete {
1542
1578
  name: Name.LAYOUT;
1543
1579
  args: Args & {
@@ -1634,6 +1670,7 @@ export declare function isResourceMarkAsCached(event: Event): event is ResourceM
1634
1670
  export declare function isResourceFinish(event: Event): event is ResourceFinish;
1635
1671
  export declare function isResourceWillSendRequest(event: Event): event is ResourceWillSendRequest;
1636
1672
  export declare function isResourceReceivedData(event: Event): event is ResourceReceivedData;
1673
+ /** Any event where we receive data (and get an encodedDataLength) **/
1637
1674
  export declare function isReceivedDataEvent(event: Event): event is ResourceReceivedData | ResourceFinish | ResourceReceiveResponse;
1638
1675
  export declare function isSyntheticNetworkRequest(event: Event): event is SyntheticNetworkRequest;
1639
1676
  export declare function isSyntheticWebSocketConnection(event: Event): event is SyntheticWebSocketConnection;
@@ -1671,7 +1708,7 @@ export interface Async extends Event {
1671
1708
  export declare function isSyntheticLayoutShift(event: Event): event is SyntheticLayoutShift;
1672
1709
  export declare function isSyntheticLayoutShiftCluster(event: Event): event is SyntheticLayoutShiftCluster;
1673
1710
  export declare function isProfileCall(event: Event): event is SyntheticProfileCall;
1674
- export interface Paint extends Complete {
1711
+ export interface Paint extends Event {
1675
1712
  name: Name.PAINT;
1676
1713
  args: Args & {
1677
1714
  data: ArgsData & {
@@ -1727,7 +1764,7 @@ export interface SetLayerTreeId extends Instant {
1727
1764
  };
1728
1765
  }
1729
1766
  export declare function isSetLayerId(event: Event): event is SetLayerTreeId;
1730
- export interface UpdateLayer extends Complete {
1767
+ export interface UpdateLayer extends Event {
1731
1768
  name: Name.UPDATE_LAYER;
1732
1769
  args: Args & {
1733
1770
  layerId: number;
@@ -1851,7 +1888,7 @@ export interface RequestIdleCallback extends Instant {
1851
1888
  data: {
1852
1889
  frame: string;
1853
1890
  id: number;
1854
- timeout: number;
1891
+ timeout: Milli;
1855
1892
  stackTrace?: CallFrame;
1856
1893
  };
1857
1894
  };
@@ -1977,6 +2014,7 @@ export interface FunctionCall extends Complete {
1977
2014
  args: Args & {
1978
2015
  data?: Partial<CallFrame> & {
1979
2016
  frame?: string;
2017
+ isolate?: number;
1980
2018
  };
1981
2019
  };
1982
2020
  }
@@ -2119,7 +2157,8 @@ export declare enum Name {
2119
2157
  CPPGC_SWEEP = "CppGC.IncrementalSweep",
2120
2158
  SCHEDULE_STYLE_RECALCULATION = "ScheduleStyleRecalculation",
2121
2159
  LAYOUT = "Layout",
2122
- UPDATE_LAYOUT_TREE = "UpdateLayoutTree",
2160
+ /** The real trace event is called 'UpdateLayoutTree' but we've aliased it for convenience. */
2161
+ RECALC_STYLE = "UpdateLayoutTree",
2123
2162
  INVALIDATE_LAYOUT = "InvalidateLayout",
2124
2163
  LAYOUT_INVALIDATION_TRACKING = "LayoutInvalidationTracking",
2125
2164
  COMPUTE_INTERSECTION = "ComputeIntersections",
@@ -2225,6 +2264,10 @@ export declare enum Name {
2225
2264
  USER_TIMING_MEASURE = "UserTiming::Measure",
2226
2265
  LINK_PRECONNECT = "LinkPreconnect"
2227
2266
  }
2267
+ /**
2268
+ * NOT AN EXHAUSTIVE LIST: just some categories we use and refer
2269
+ * to in multiple places.
2270
+ **/
2228
2271
  export declare const Categories: {
2229
2272
  readonly Console: "blink.console";
2230
2273
  readonly UserTiming: "blink.user_timing";
@@ -2272,62 +2315,39 @@ export interface LegacyLayerPaintEventPicture {
2272
2315
  rect: number[];
2273
2316
  serializedPicture: string;
2274
2317
  }
2275
- export interface TargetRundownEvent extends Event {
2318
+ /** Same as `TraceEventTargetRundown` in `EnhancedTracesParser` */
2319
+ export interface RundownScriptCompiled extends Event {
2276
2320
  cat: 'disabled-by-default-devtools.target-rundown';
2277
- name: 'ScriptCompiled';
2321
+ name: any;
2278
2322
  args: Args & {
2279
- data?: {
2280
- frame: Protocol.Page.FrameId;
2281
- frameType: string;
2282
- url: string;
2283
- isolate: string;
2284
- v8context: string;
2285
- origin: string;
2286
- scriptId: number;
2287
- isDefault?: boolean;
2288
- contextType?: string;
2289
- };
2323
+ data?: any;
2290
2324
  };
2291
2325
  }
2292
- export declare function isTargetRundownEvent(event: Event): event is TargetRundownEvent;
2293
- export interface V8SourceRundownEvent extends Event {
2326
+ export declare function isRundownScriptCompiled(event: Event): event is RundownScriptCompiled;
2327
+ /** Same as `TraceEventScriptRundown` in `EnhancedTracesParser` */
2328
+ export interface RundownScript extends Event {
2294
2329
  cat: 'disabled-by-default-devtools.v8-source-rundown';
2295
- name: 'ScriptCatchup';
2330
+ name: any;
2296
2331
  args: Args & {
2297
- data: {
2298
- isolate: string;
2299
- executionContextId: Protocol.Runtime.ExecutionContextId;
2300
- scriptId: number;
2301
- hash: string;
2302
- isModule: boolean;
2303
- hasSourceUrl: boolean;
2304
- url?: string;
2305
- sourceUrl?: string;
2306
- sourceMapUrl?: string;
2307
- sourceMapUrlElided?: boolean;
2308
- };
2332
+ data: any;
2309
2333
  };
2310
2334
  }
2311
- export declare function isV8SourceRundownEvent(event: Event): event is V8SourceRundownEvent;
2312
- export interface V8SourceRundownSourcesScriptCatchupEvent extends Event {
2335
+ export declare function isRundownScript(event: Event): event is RundownScript;
2336
+ /** Same as `TraceEventScriptRundownSource` in `EnhancedTracesParser` */
2337
+ export interface RundownScriptSource extends Event {
2313
2338
  cat: 'disabled-by-default-devtools.v8-source-rundown-sources';
2314
2339
  name: 'ScriptCatchup';
2315
2340
  args: Args & {
2316
- data: {
2317
- isolate: string;
2318
- scriptId: number;
2319
- length: number;
2320
- sourceText: string;
2321
- };
2341
+ data: any;
2322
2342
  };
2323
2343
  }
2324
- export declare function isV8SourceRundownSourcesScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesScriptCatchupEvent;
2325
- export interface V8SourceRundownSourcesLargeScriptCatchupEvent extends Event {
2344
+ export declare function isRundownScriptSource(event: Event): event is RundownScriptSource;
2345
+ export interface RundownScriptSourceLarge extends Event {
2326
2346
  cat: 'disabled-by-default-devtools.v8-source-rundown-sources';
2327
2347
  name: 'LargeScriptCatchup';
2328
2348
  args: Args & {
2329
2349
  data: {
2330
- isolate: string;
2350
+ isolate: number;
2331
2351
  scriptId: number;
2332
2352
  splitIndex: number;
2333
2353
  splitCount: number;
@@ -2335,16 +2355,16 @@ export interface V8SourceRundownSourcesLargeScriptCatchupEvent extends Event {
2335
2355
  };
2336
2356
  };
2337
2357
  }
2338
- export declare function isV8SourceRundownSourcesLargeScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesLargeScriptCatchupEvent;
2339
- export interface V8SourceRundownSourcesStubScriptCatchupEvent extends Event {
2358
+ export declare function isRundownScriptSourceLarge(event: Event): event is RundownScriptSourceLarge;
2359
+ export interface RundownScriptStub extends Event {
2340
2360
  cat: 'disabled-by-default-devtools.v8-source-rundown-sources';
2341
2361
  name: 'StubScriptCatchup';
2342
2362
  args: Args & {
2343
2363
  data: {
2344
- isolate: string;
2364
+ isolate: number;
2345
2365
  scriptId: number;
2346
2366
  };
2347
2367
  };
2348
2368
  }
2349
- export declare function isAnyScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesScriptCatchupEvent | V8SourceRundownSourcesLargeScriptCatchupEvent | V8SourceRundownSourcesStubScriptCatchupEvent;
2369
+ export declare function isAnyScriptSourceEvent(event: Event): event is RundownScriptSource | RundownScriptSourceLarge | RundownScriptStub;
2350
2370
  export {};