@paulirish/trace_engine 0.0.59 → 0.0.61

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 (452) 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 +188 -15
  46. package/generated/protocol.js +1 -1
  47. package/locales/af.json +3 -3
  48. package/locales/am.json +4 -4
  49. package/locales/ar.json +14 -14
  50. package/locales/as.json +3 -3
  51. package/locales/az.json +4 -4
  52. package/locales/be.json +3 -3
  53. package/locales/bg.json +3 -3
  54. package/locales/bn.json +4 -4
  55. package/locales/bs.json +4 -4
  56. package/locales/ca.json +3 -3
  57. package/locales/cs.json +3 -3
  58. package/locales/cy.json +4 -4
  59. package/locales/da.json +3 -3
  60. package/locales/de.json +3 -3
  61. package/locales/el.json +3 -3
  62. package/locales/en-GB.json +3 -3
  63. package/locales/en-US.json +26 -26
  64. package/locales/en-XL.json +26 -26
  65. package/locales/es-419.json +3 -3
  66. package/locales/es.json +3 -3
  67. package/locales/et.json +3 -3
  68. package/locales/eu.json +4 -4
  69. package/locales/fa.json +5 -5
  70. package/locales/fi.json +3 -3
  71. package/locales/fil.json +3 -3
  72. package/locales/fr-CA.json +4 -4
  73. package/locales/fr.json +3 -3
  74. package/locales/gl.json +3 -3
  75. package/locales/gu.json +3 -3
  76. package/locales/he.json +26 -26
  77. package/locales/hi.json +3 -3
  78. package/locales/hr.json +7 -7
  79. package/locales/hu.json +3 -3
  80. package/locales/hy.json +3 -3
  81. package/locales/id.json +3 -3
  82. package/locales/is.json +3 -3
  83. package/locales/it.json +3 -3
  84. package/locales/ja.json +3 -3
  85. package/locales/ka.json +4 -4
  86. package/locales/kk.json +3 -3
  87. package/locales/km.json +4 -4
  88. package/locales/kn.json +5 -5
  89. package/locales/ko.json +4 -4
  90. package/locales/ky.json +3 -3
  91. package/locales/lo.json +4 -4
  92. package/locales/lt.json +3 -3
  93. package/locales/lv.json +4 -4
  94. package/locales/mk.json +3 -3
  95. package/locales/ml.json +5 -5
  96. package/locales/mn.json +3 -3
  97. package/locales/mr.json +3 -3
  98. package/locales/ms.json +3 -3
  99. package/locales/my.json +6 -6
  100. package/locales/ne.json +25 -25
  101. package/locales/nl.json +3 -3
  102. package/locales/no.json +3 -3
  103. package/locales/or.json +3 -3
  104. package/locales/pa.json +3 -3
  105. package/locales/pl.json +3 -3
  106. package/locales/pt-PT.json +3 -3
  107. package/locales/pt.json +3 -3
  108. package/locales/ro.json +4 -4
  109. package/locales/ru.json +3 -3
  110. package/locales/si.json +4 -4
  111. package/locales/sk.json +3 -3
  112. package/locales/sl.json +3 -3
  113. package/locales/sq.json +4 -4
  114. package/locales/sr-Latn.json +3 -3
  115. package/locales/sr.json +3 -3
  116. package/locales/sv.json +3 -3
  117. package/locales/sw.json +3 -3
  118. package/locales/ta.json +3 -3
  119. package/locales/te.json +4 -4
  120. package/locales/th.json +3 -3
  121. package/locales/tr.json +3 -3
  122. package/locales/uk.json +3 -3
  123. package/locales/ur.json +4 -4
  124. package/locales/uz.json +3 -3
  125. package/locales/vi.json +3 -3
  126. package/locales/zh-HK.json +3 -3
  127. package/locales/zh-TW.json +4 -4
  128. package/locales/zh.json +3 -3
  129. package/locales/zu.json +3 -3
  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 +11 -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.d.ts +0 -3978
  184. package/models/trace/extras/extras.js +0 -3978
  185. package/models/trace/extras/extras.js.map +1 -1
  186. package/models/trace/handlers/AnimationFramesHandler.js +11 -11
  187. package/models/trace/handlers/AnimationFramesHandler.js.map +1 -1
  188. package/models/trace/handlers/AnimationHandler.js +5 -5
  189. package/models/trace/handlers/AnimationHandler.js.map +1 -1
  190. package/models/trace/handlers/AsyncJSCallsHandler.d.ts +3 -3
  191. package/models/trace/handlers/AsyncJSCallsHandler.js +9 -9
  192. package/models/trace/handlers/AsyncJSCallsHandler.js.map +1 -1
  193. package/models/trace/handlers/AuctionWorkletsHandler.js +12 -12
  194. package/models/trace/handlers/AuctionWorkletsHandler.js.map +1 -1
  195. package/models/trace/handlers/DOMStatsHandler.js +3 -3
  196. package/models/trace/handlers/DOMStatsHandler.js.map +1 -1
  197. package/models/trace/handlers/ExtensionTraceDataHandler.d.ts +15 -2
  198. package/models/trace/handlers/ExtensionTraceDataHandler.js +53 -41
  199. package/models/trace/handlers/ExtensionTraceDataHandler.js.map +1 -1
  200. package/models/trace/handlers/FlowsHandler.js +11 -11
  201. package/models/trace/handlers/FlowsHandler.js.map +1 -1
  202. package/models/trace/handlers/FramesHandler.d.ts +7 -0
  203. package/models/trace/handlers/FramesHandler.js +12 -10
  204. package/models/trace/handlers/FramesHandler.js.map +1 -1
  205. package/models/trace/handlers/GPUHandler.js +3 -3
  206. package/models/trace/handlers/GPUHandler.js.map +1 -1
  207. package/models/trace/handlers/ImagePaintingHandler.js +13 -13
  208. package/models/trace/handlers/ImagePaintingHandler.js.map +1 -1
  209. package/models/trace/handlers/InitiatorsHandler.js +32 -41
  210. package/models/trace/handlers/InitiatorsHandler.js.map +1 -1
  211. package/models/trace/handlers/InvalidationsHandler.js +63 -44
  212. package/models/trace/handlers/InvalidationsHandler.js.map +1 -1
  213. package/models/trace/handlers/LargestImagePaintHandler.js +5 -4
  214. package/models/trace/handlers/LargestImagePaintHandler.js.map +1 -1
  215. package/models/trace/handlers/LargestTextPaintHandler.js +3 -3
  216. package/models/trace/handlers/LargestTextPaintHandler.js.map +1 -1
  217. package/models/trace/handlers/LayerTreeHandler.js +11 -11
  218. package/models/trace/handlers/LayerTreeHandler.js.map +1 -1
  219. package/models/trace/handlers/LayoutShiftsHandler.d.ts +17 -4
  220. package/models/trace/handlers/LayoutShiftsHandler.js +41 -38
  221. package/models/trace/handlers/LayoutShiftsHandler.js.map +1 -1
  222. package/models/trace/handlers/MemoryHandler.js +3 -3
  223. package/models/trace/handlers/MemoryHandler.js.map +1 -1
  224. package/models/trace/handlers/MetaHandler.d.ts +16 -0
  225. package/models/trace/handlers/MetaHandler.js +29 -28
  226. package/models/trace/handlers/MetaHandler.js.map +1 -1
  227. package/models/trace/handlers/ModelHandlers.js +1 -1
  228. package/models/trace/handlers/ModelHandlers.js.map +1 -1
  229. package/models/trace/handlers/NetworkRequestsHandler.d.ts +10 -0
  230. package/models/trace/handlers/NetworkRequestsHandler.js +44 -25
  231. package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -1
  232. package/models/trace/handlers/PageFramesHandler.js +3 -3
  233. package/models/trace/handlers/PageFramesHandler.js.map +1 -1
  234. package/models/trace/handlers/PageLoadMetricsHandler.js +5 -5
  235. package/models/trace/handlers/PageLoadMetricsHandler.js.map +1 -1
  236. package/models/trace/handlers/RendererHandler.d.ts +1 -1
  237. package/models/trace/handlers/RendererHandler.js +22 -22
  238. package/models/trace/handlers/RendererHandler.js.map +1 -1
  239. package/models/trace/handlers/SamplesHandler.d.ts +2 -2
  240. package/models/trace/handlers/SamplesHandler.js +7 -9
  241. package/models/trace/handlers/SamplesHandler.js.map +1 -1
  242. package/models/trace/handlers/ScreenshotsHandler.js +9 -10
  243. package/models/trace/handlers/ScreenshotsHandler.js.map +1 -1
  244. package/models/trace/handlers/ScriptsHandler.js +9 -8
  245. package/models/trace/handlers/ScriptsHandler.js.map +1 -1
  246. package/models/trace/handlers/SelectorStatsHandler.d.ts +2 -2
  247. package/models/trace/handlers/SelectorStatsHandler.js +13 -13
  248. package/models/trace/handlers/SelectorStatsHandler.js.map +1 -1
  249. package/models/trace/handlers/Threads.d.ts +2 -2
  250. package/models/trace/handlers/Threads.js +9 -9
  251. package/models/trace/handlers/Threads.js.map +1 -1
  252. package/models/trace/handlers/UserInteractionsHandler.d.ts +10 -3
  253. package/models/trace/handlers/UserInteractionsHandler.js +104 -84
  254. package/models/trace/handlers/UserInteractionsHandler.js.map +1 -1
  255. package/models/trace/handlers/UserTimingsHandler.d.ts +1 -1
  256. package/models/trace/handlers/UserTimingsHandler.js +16 -17
  257. package/models/trace/handlers/UserTimingsHandler.js.map +1 -1
  258. package/models/trace/handlers/WarningsHandler.js +14 -14
  259. package/models/trace/handlers/WarningsHandler.js.map +1 -1
  260. package/models/trace/handlers/WorkersHandler.js +7 -7
  261. package/models/trace/handlers/WorkersHandler.js.map +1 -1
  262. package/models/trace/handlers/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  263. package/models/trace/handlers/handlers-tsconfig.json +6 -2
  264. package/models/trace/handlers/handlers.js +1 -1
  265. package/models/trace/handlers/handlers.js.map +1 -1
  266. package/models/trace/handlers/helpers.d.ts +3 -2
  267. package/models/trace/handlers/helpers.js +10 -10
  268. package/models/trace/handlers/helpers.js.map +1 -1
  269. package/models/trace/handlers/types.d.ts +25 -2
  270. package/models/trace/handlers/types.js.map +1 -1
  271. package/models/trace/helpers/Extensions.js +8 -8
  272. package/models/trace/helpers/Extensions.js.map +1 -1
  273. package/models/trace/helpers/Network.js.map +1 -1
  274. package/models/trace/helpers/SamplesIntegrator.js +11 -9
  275. package/models/trace/helpers/SamplesIntegrator.js.map +1 -1
  276. package/models/trace/helpers/SyntheticEvents.js +1 -1
  277. package/models/trace/helpers/SyntheticEvents.js.map +1 -1
  278. package/models/trace/helpers/Timing.d.ts +4 -0
  279. package/models/trace/helpers/Timing.js +6 -4
  280. package/models/trace/helpers/Timing.js.map +1 -1
  281. package/models/trace/helpers/Trace.d.ts +19 -20
  282. package/models/trace/helpers/Trace.js +148 -60
  283. package/models/trace/helpers/Trace.js.map +1 -1
  284. package/models/trace/helpers/TreeHelpers.js +1 -1
  285. package/models/trace/helpers/TreeHelpers.js.map +1 -1
  286. package/models/trace/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  287. package/models/trace/helpers/helpers-tsconfig.json +6 -2
  288. package/models/trace/helpers/helpers.js +1 -1
  289. package/models/trace/helpers/helpers.js.map +1 -1
  290. package/models/trace/insights/CLSCulprits.d.ts +3 -3
  291. package/models/trace/insights/CLSCulprits.js +16 -15
  292. package/models/trace/insights/CLSCulprits.js.map +1 -1
  293. package/models/trace/insights/Cache.d.ts +3 -2
  294. package/models/trace/insights/Cache.js +10 -6
  295. package/models/trace/insights/Cache.js.map +1 -1
  296. package/models/trace/insights/Common.d.ts +8 -1
  297. package/models/trace/insights/Common.js +16 -1
  298. package/models/trace/insights/Common.js.map +1 -1
  299. package/models/trace/insights/DOMSize.d.ts +4 -3
  300. package/models/trace/insights/DOMSize.js +12 -8
  301. package/models/trace/insights/DOMSize.js.map +1 -1
  302. package/models/trace/insights/DocumentLatency.d.ts +3 -3
  303. package/models/trace/insights/DocumentLatency.js +20 -18
  304. package/models/trace/insights/DocumentLatency.js.map +1 -1
  305. package/models/trace/insights/DuplicatedJavaScript.d.ts +3 -3
  306. package/models/trace/insights/DuplicatedJavaScript.js +7 -6
  307. package/models/trace/insights/DuplicatedJavaScript.js.map +1 -1
  308. package/models/trace/insights/FontDisplay.d.ts +3 -2
  309. package/models/trace/insights/FontDisplay.js +9 -5
  310. package/models/trace/insights/FontDisplay.js.map +1 -1
  311. package/models/trace/insights/ForcedReflow.d.ts +3 -2
  312. package/models/trace/insights/ForcedReflow.js +8 -4
  313. package/models/trace/insights/ForcedReflow.js.map +1 -1
  314. package/models/trace/insights/INPBreakdown.d.ts +4 -4
  315. package/models/trace/insights/INPBreakdown.js +18 -6
  316. package/models/trace/insights/INPBreakdown.js.map +1 -1
  317. package/models/trace/insights/ImageDelivery.d.ts +3 -3
  318. package/models/trace/insights/ImageDelivery.js +15 -14
  319. package/models/trace/insights/ImageDelivery.js.map +1 -1
  320. package/models/trace/insights/LCPBreakdown.d.ts +4 -3
  321. package/models/trace/insights/LCPBreakdown.js +19 -8
  322. package/models/trace/insights/LCPBreakdown.js.map +1 -1
  323. package/models/trace/insights/LCPDiscovery.d.ts +3 -3
  324. package/models/trace/insights/LCPDiscovery.js +8 -7
  325. package/models/trace/insights/LCPDiscovery.js.map +1 -1
  326. package/models/trace/insights/LegacyJavaScript.d.ts +2 -2
  327. package/models/trace/insights/LegacyJavaScript.js +7 -5
  328. package/models/trace/insights/LegacyJavaScript.js.map +1 -1
  329. package/models/trace/insights/Models.js +1 -1
  330. package/models/trace/insights/Models.js.map +1 -1
  331. package/models/trace/insights/ModernHTTP.d.ts +3 -3
  332. package/models/trace/insights/ModernHTTP.js +8 -7
  333. package/models/trace/insights/ModernHTTP.js.map +1 -1
  334. package/models/trace/insights/NetworkDependencyTree.d.ts +7 -4
  335. package/models/trace/insights/NetworkDependencyTree.js +21 -17
  336. package/models/trace/insights/NetworkDependencyTree.js.map +1 -1
  337. package/models/trace/insights/RenderBlocking.d.ts +2 -2
  338. package/models/trace/insights/RenderBlocking.js +13 -12
  339. package/models/trace/insights/RenderBlocking.js.map +1 -1
  340. package/models/trace/insights/SlowCSSSelector.d.ts +4 -3
  341. package/models/trace/insights/SlowCSSSelector.js +11 -7
  342. package/models/trace/insights/SlowCSSSelector.js.map +1 -1
  343. package/models/trace/insights/Statistics.js +1 -1
  344. package/models/trace/insights/Statistics.js.map +1 -1
  345. package/models/trace/insights/ThirdParties.d.ts +2 -1
  346. package/models/trace/insights/ThirdParties.js +10 -6
  347. package/models/trace/insights/ThirdParties.js.map +1 -1
  348. package/models/trace/insights/Viewport.d.ts +3 -2
  349. package/models/trace/insights/Viewport.js +10 -6
  350. package/models/trace/insights/Viewport.js.map +1 -1
  351. package/models/trace/insights/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  352. package/models/trace/insights/insights-tsconfig.json +6 -2
  353. package/models/trace/insights/insights.d.ts +2 -0
  354. package/models/trace/insights/insights.js +3 -1
  355. package/models/trace/insights/insights.js.map +1 -1
  356. package/models/trace/insights/types.d.ts +6 -2
  357. package/models/trace/insights/types.js +2 -1
  358. package/models/trace/insights/types.js.map +1 -1
  359. package/models/trace/lantern/core/LanternError.js +1 -1
  360. package/models/trace/lantern/core/LanternError.js.map +1 -1
  361. package/models/trace/lantern/core/NetworkAnalyzer.js +1 -1
  362. package/models/trace/lantern/core/NetworkAnalyzer.js.map +1 -1
  363. package/models/trace/lantern/core/core-tsconfig.json +6 -2
  364. package/models/trace/lantern/core/core.js +1 -1
  365. package/models/trace/lantern/core/core.js.map +1 -1
  366. package/models/trace/lantern/core/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  367. package/models/trace/lantern/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  368. package/models/trace/lantern/graph/BaseNode.js +1 -1
  369. package/models/trace/lantern/graph/BaseNode.js.map +1 -1
  370. package/models/trace/lantern/graph/CPUNode.js +1 -1
  371. package/models/trace/lantern/graph/CPUNode.js.map +1 -1
  372. package/models/trace/lantern/graph/NetworkNode.js +1 -1
  373. package/models/trace/lantern/graph/NetworkNode.js.map +1 -1
  374. package/models/trace/lantern/graph/PageDependencyGraph.js +1 -1
  375. package/models/trace/lantern/graph/PageDependencyGraph.js.map +1 -1
  376. package/models/trace/lantern/graph/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  377. package/models/trace/lantern/graph/graph-tsconfig.json +6 -2
  378. package/models/trace/lantern/graph/graph.js +1 -1
  379. package/models/trace/lantern/graph/graph.js.map +1 -1
  380. package/models/trace/lantern/lantern-tsconfig.json +6 -2
  381. package/models/trace/lantern/lantern.js +1 -1
  382. package/models/trace/lantern/lantern.js.map +1 -1
  383. package/models/trace/lantern/metrics/FirstContentfulPaint.js +1 -1
  384. package/models/trace/lantern/metrics/FirstContentfulPaint.js.map +1 -1
  385. package/models/trace/lantern/metrics/Interactive.js +1 -1
  386. package/models/trace/lantern/metrics/Interactive.js.map +1 -1
  387. package/models/trace/lantern/metrics/LargestContentfulPaint.js +1 -1
  388. package/models/trace/lantern/metrics/LargestContentfulPaint.js.map +1 -1
  389. package/models/trace/lantern/metrics/MaxPotentialFID.js +1 -1
  390. package/models/trace/lantern/metrics/MaxPotentialFID.js.map +1 -1
  391. package/models/trace/lantern/metrics/Metric.js +1 -1
  392. package/models/trace/lantern/metrics/Metric.js.map +1 -1
  393. package/models/trace/lantern/metrics/SpeedIndex.js +1 -1
  394. package/models/trace/lantern/metrics/SpeedIndex.js.map +1 -1
  395. package/models/trace/lantern/metrics/TBTUtils.js +1 -1
  396. package/models/trace/lantern/metrics/TBTUtils.js.map +1 -1
  397. package/models/trace/lantern/metrics/TotalBlockingTime.js +1 -1
  398. package/models/trace/lantern/metrics/TotalBlockingTime.js.map +1 -1
  399. package/models/trace/lantern/metrics/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  400. package/models/trace/lantern/metrics/metrics-tsconfig.json +6 -2
  401. package/models/trace/lantern/metrics/metrics.js +1 -1
  402. package/models/trace/lantern/metrics/metrics.js.map +1 -1
  403. package/models/trace/lantern/simulation/ConnectionPool.js +1 -1
  404. package/models/trace/lantern/simulation/ConnectionPool.js.map +1 -1
  405. package/models/trace/lantern/simulation/Constants.js +1 -1
  406. package/models/trace/lantern/simulation/Constants.js.map +1 -1
  407. package/models/trace/lantern/simulation/DNSCache.js +1 -1
  408. package/models/trace/lantern/simulation/DNSCache.js.map +1 -1
  409. package/models/trace/lantern/simulation/SimulationTimingMap.js +1 -1
  410. package/models/trace/lantern/simulation/SimulationTimingMap.js.map +1 -1
  411. package/models/trace/lantern/simulation/Simulator.js +1 -1
  412. package/models/trace/lantern/simulation/Simulator.js.map +1 -1
  413. package/models/trace/lantern/simulation/TCPConnection.js +1 -1
  414. package/models/trace/lantern/simulation/TCPConnection.js.map +1 -1
  415. package/models/trace/lantern/simulation/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  416. package/models/trace/lantern/simulation/simulation-tsconfig.json +6 -2
  417. package/models/trace/lantern/simulation/simulation.js +1 -1
  418. package/models/trace/lantern/simulation/simulation.js.map +1 -1
  419. package/models/trace/lantern/types/Lantern.js +1 -1
  420. package/models/trace/lantern/types/Lantern.js.map +1 -1
  421. package/models/trace/lantern/types/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  422. package/models/trace/lantern/types/types-tsconfig.json +6 -2
  423. package/models/trace/lantern/types/types.js +1 -1
  424. package/models/trace/lantern/types/types.js.map +1 -1
  425. package/models/trace/trace-tsconfig.json +10 -2
  426. package/models/trace/trace.d.ts +5 -1
  427. package/models/trace/trace.js +6 -2
  428. package/models/trace/trace.js.map +1 -1
  429. package/models/trace/types/Configuration.d.ts +11 -0
  430. package/models/trace/types/Configuration.js +1 -1
  431. package/models/trace/types/Configuration.js.map +1 -1
  432. package/models/trace/types/Extensions.d.ts +25 -13
  433. package/models/trace/types/Extensions.js +6 -3
  434. package/models/trace/types/Extensions.js.map +1 -1
  435. package/models/trace/types/File.d.ts +12 -0
  436. package/models/trace/types/File.js +1 -1
  437. package/models/trace/types/File.js.map +1 -1
  438. package/models/trace/types/Overlays.d.ts +1 -2
  439. package/models/trace/types/Overlays.js +1 -1
  440. package/models/trace/types/Overlays.js.map +1 -1
  441. package/models/trace/types/Timing.d.ts +1 -0
  442. package/models/trace/types/Timing.js +1 -1
  443. package/models/trace/types/Timing.js.map +1 -1
  444. package/models/trace/types/TraceEvents.d.ts +75 -56
  445. package/models/trace/types/TraceEvents.js +42 -29
  446. package/models/trace/types/TraceEvents.js.map +1 -1
  447. package/models/trace/types/devtools_entrypoint-bundle-typescript-tsconfig.json +6 -2
  448. package/models/trace/types/types-tsconfig.json +6 -2
  449. package/models/trace/types/types.js +1 -1
  450. package/models/trace/types/types.js.map +1 -1
  451. package/package.json +1 -1
  452. 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\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
+ {"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,4 +1,3 @@
1
- // import type * as Lit from '../../../ui/lit/lit.js';
2
1
  import type { EntriesLinkState } from './File.js';
3
2
  import type { Micro, TraceWindowMicro } from './Timing.js';
4
3
  import type { Event, LegacyTimelineFrame, PageLoadEvent } from './TraceEvents.js';
@@ -72,7 +71,7 @@ export interface CandyStripedTimeRange {
72
71
  */
73
72
  export interface TimespanBreakdownEntryBreakdown {
74
73
  bounds: TraceWindowMicro;
75
- label: string | any;
74
+ label: string | HTMLElement;
76
75
  showDuration: boolean;
77
76
  }
78
77
  /**
@@ -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 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 // 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"]}
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;
@@ -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,7 +777,7 @@ 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
  */
@@ -1078,6 +1092,9 @@ export interface PairableAsyncInstant extends PairableAsync {
1078
1092
  export interface PairableAsyncEnd extends PairableAsync {
1079
1093
  ph: Phase.ASYNC_NESTABLE_END;
1080
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;
1081
1098
  export interface AnimationFrame extends PairableAsync {
1082
1099
  name: Name.ANIMATION_FRAME;
1083
1100
  args?: AnimationFrameArgs;
@@ -1175,9 +1192,7 @@ export interface ConsoleTimeStamp extends Event {
1175
1192
  track?: string | number;
1176
1193
  trackGroup?: string | number;
1177
1194
  color?: string | number;
1178
- devtools?: {
1179
- link: ExtensionTrackEntryPayloadDeeplink;
1180
- };
1195
+ devtools?: string;
1181
1196
  sampleTraceId?: number;
1182
1197
  };
1183
1198
  };
@@ -1296,6 +1311,10 @@ declare const enum FrameType {
1296
1311
  FORKED = "FORKED",
1297
1312
  BACKFILL = "BACKFILL"
1298
1313
  }
1314
+ /**
1315
+ * TODO(crbug.com/409484302): Remove once Chrome migrates from
1316
+ * ChromeTrackEvent.chrome_frame_reporter to ChromeTrackEvent.frame_reporter.
1317
+ **/
1299
1318
  export interface OldChromeFrameReporterArgs {
1300
1319
  chrome_frame_reporter: ChromeFrameReporter;
1301
1320
  }
@@ -1310,12 +1329,26 @@ export interface PipelineReporter extends Event {
1310
1329
  args: Args & (OldChromeFrameReporterArgs | NewChromeFrameReporterArgs);
1311
1330
  }
1312
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
+ **/
1313
1341
  export interface SyntheticBased<Ph extends Phase = Phase, T extends Event = Event> extends Event {
1314
1342
  ph: Ph;
1315
1343
  rawSourceEvent: T;
1316
1344
  _tag: 'SyntheticEntryTag';
1317
1345
  }
1318
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
+ **/
1319
1352
  export interface SyntheticEventPair<T extends PairableAsync = PairableAsync> extends SyntheticBased<Phase, T> {
1320
1353
  rawSourceEvent: T;
1321
1354
  name: T['name'];
@@ -1456,6 +1489,7 @@ export interface RasterTask extends Complete {
1456
1489
  };
1457
1490
  }
1458
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. **/
1459
1493
  export interface CompositeLayers extends Instant {
1460
1494
  name: Name.COMPOSITE_LAYERS;
1461
1495
  args: Args & {
@@ -1527,8 +1561,8 @@ export interface SelectorStats extends Complete {
1527
1561
  };
1528
1562
  }
1529
1563
  export declare function isSelectorStats(event: Event): event is SelectorStats;
1530
- export interface UpdateLayoutTree extends Complete {
1531
- name: Name.UPDATE_LAYOUT_TREE;
1564
+ export interface RecalcStyle extends Complete {
1565
+ name: Name.RECALC_STYLE;
1532
1566
  args: Args & {
1533
1567
  elementCount: number;
1534
1568
  beginData?: {
@@ -1538,7 +1572,8 @@ export interface UpdateLayoutTree extends Complete {
1538
1572
  };
1539
1573
  };
1540
1574
  }
1541
- 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;
1542
1577
  export interface Layout extends Complete {
1543
1578
  name: Name.LAYOUT;
1544
1579
  args: Args & {
@@ -1635,6 +1670,7 @@ export declare function isResourceMarkAsCached(event: Event): event is ResourceM
1635
1670
  export declare function isResourceFinish(event: Event): event is ResourceFinish;
1636
1671
  export declare function isResourceWillSendRequest(event: Event): event is ResourceWillSendRequest;
1637
1672
  export declare function isResourceReceivedData(event: Event): event is ResourceReceivedData;
1673
+ /** Any event where we receive data (and get an encodedDataLength) **/
1638
1674
  export declare function isReceivedDataEvent(event: Event): event is ResourceReceivedData | ResourceFinish | ResourceReceiveResponse;
1639
1675
  export declare function isSyntheticNetworkRequest(event: Event): event is SyntheticNetworkRequest;
1640
1676
  export declare function isSyntheticWebSocketConnection(event: Event): event is SyntheticWebSocketConnection;
@@ -1672,7 +1708,7 @@ export interface Async extends Event {
1672
1708
  export declare function isSyntheticLayoutShift(event: Event): event is SyntheticLayoutShift;
1673
1709
  export declare function isSyntheticLayoutShiftCluster(event: Event): event is SyntheticLayoutShiftCluster;
1674
1710
  export declare function isProfileCall(event: Event): event is SyntheticProfileCall;
1675
- export interface Paint extends Complete {
1711
+ export interface Paint extends Event {
1676
1712
  name: Name.PAINT;
1677
1713
  args: Args & {
1678
1714
  data: ArgsData & {
@@ -1728,7 +1764,7 @@ export interface SetLayerTreeId extends Instant {
1728
1764
  };
1729
1765
  }
1730
1766
  export declare function isSetLayerId(event: Event): event is SetLayerTreeId;
1731
- export interface UpdateLayer extends Complete {
1767
+ export interface UpdateLayer extends Event {
1732
1768
  name: Name.UPDATE_LAYER;
1733
1769
  args: Args & {
1734
1770
  layerId: number;
@@ -1852,7 +1888,7 @@ export interface RequestIdleCallback extends Instant {
1852
1888
  data: {
1853
1889
  frame: string;
1854
1890
  id: number;
1855
- timeout: number;
1891
+ timeout: Milli;
1856
1892
  stackTrace?: CallFrame;
1857
1893
  };
1858
1894
  };
@@ -1978,6 +2014,7 @@ export interface FunctionCall extends Complete {
1978
2014
  args: Args & {
1979
2015
  data?: Partial<CallFrame> & {
1980
2016
  frame?: string;
2017
+ isolate?: number;
1981
2018
  };
1982
2019
  };
1983
2020
  }
@@ -2120,7 +2157,8 @@ export declare enum Name {
2120
2157
  CPPGC_SWEEP = "CppGC.IncrementalSweep",
2121
2158
  SCHEDULE_STYLE_RECALCULATION = "ScheduleStyleRecalculation",
2122
2159
  LAYOUT = "Layout",
2123
- UPDATE_LAYOUT_TREE = "UpdateLayoutTree",
2160
+ /** The real trace event is called 'UpdateLayoutTree' but we've aliased it for convenience. */
2161
+ RECALC_STYLE = "UpdateLayoutTree",
2124
2162
  INVALIDATE_LAYOUT = "InvalidateLayout",
2125
2163
  LAYOUT_INVALIDATION_TRACKING = "LayoutInvalidationTracking",
2126
2164
  COMPUTE_INTERSECTION = "ComputeIntersections",
@@ -2226,6 +2264,10 @@ export declare enum Name {
2226
2264
  USER_TIMING_MEASURE = "UserTiming::Measure",
2227
2265
  LINK_PRECONNECT = "LinkPreconnect"
2228
2266
  }
2267
+ /**
2268
+ * NOT AN EXHAUSTIVE LIST: just some categories we use and refer
2269
+ * to in multiple places.
2270
+ **/
2229
2271
  export declare const Categories: {
2230
2272
  readonly Console: "blink.console";
2231
2273
  readonly UserTiming: "blink.user_timing";
@@ -2273,62 +2315,39 @@ export interface LegacyLayerPaintEventPicture {
2273
2315
  rect: number[];
2274
2316
  serializedPicture: string;
2275
2317
  }
2276
- export interface TargetRundownEvent extends Event {
2318
+ /** Same as `TraceEventTargetRundown` in `EnhancedTracesParser` */
2319
+ export interface RundownScriptCompiled extends Event {
2277
2320
  cat: 'disabled-by-default-devtools.target-rundown';
2278
- name: 'ScriptCompiled';
2321
+ name: any;
2279
2322
  args: Args & {
2280
- data?: {
2281
- frame: Protocol.Page.FrameId;
2282
- frameType: string;
2283
- url: string;
2284
- isolate: string;
2285
- v8context: string;
2286
- origin: string;
2287
- scriptId: number;
2288
- isDefault?: boolean;
2289
- contextType?: string;
2290
- };
2323
+ data?: any;
2291
2324
  };
2292
2325
  }
2293
- export declare function isTargetRundownEvent(event: Event): event is TargetRundownEvent;
2294
- 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 {
2295
2329
  cat: 'disabled-by-default-devtools.v8-source-rundown';
2296
- name: 'ScriptCatchup';
2330
+ name: any;
2297
2331
  args: Args & {
2298
- data: {
2299
- isolate: string;
2300
- executionContextId: Protocol.Runtime.ExecutionContextId;
2301
- scriptId: number;
2302
- hash: string;
2303
- isModule: boolean;
2304
- hasSourceUrl: boolean;
2305
- url?: string;
2306
- sourceUrl?: string;
2307
- sourceMapUrl?: string;
2308
- sourceMapUrlElided?: boolean;
2309
- };
2332
+ data: any;
2310
2333
  };
2311
2334
  }
2312
- export declare function isV8SourceRundownEvent(event: Event): event is V8SourceRundownEvent;
2313
- 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 {
2314
2338
  cat: 'disabled-by-default-devtools.v8-source-rundown-sources';
2315
2339
  name: 'ScriptCatchup';
2316
2340
  args: Args & {
2317
- data: {
2318
- isolate: string;
2319
- scriptId: number;
2320
- length: number;
2321
- sourceText: string;
2322
- };
2341
+ data: any;
2323
2342
  };
2324
2343
  }
2325
- export declare function isV8SourceRundownSourcesScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesScriptCatchupEvent;
2326
- export interface V8SourceRundownSourcesLargeScriptCatchupEvent extends Event {
2344
+ export declare function isRundownScriptSource(event: Event): event is RundownScriptSource;
2345
+ export interface RundownScriptSourceLarge extends Event {
2327
2346
  cat: 'disabled-by-default-devtools.v8-source-rundown-sources';
2328
2347
  name: 'LargeScriptCatchup';
2329
2348
  args: Args & {
2330
2349
  data: {
2331
- isolate: string;
2350
+ isolate: number;
2332
2351
  scriptId: number;
2333
2352
  splitIndex: number;
2334
2353
  splitCount: number;
@@ -2336,16 +2355,16 @@ export interface V8SourceRundownSourcesLargeScriptCatchupEvent extends Event {
2336
2355
  };
2337
2356
  };
2338
2357
  }
2339
- export declare function isV8SourceRundownSourcesLargeScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesLargeScriptCatchupEvent;
2340
- export interface V8SourceRundownSourcesStubScriptCatchupEvent extends Event {
2358
+ export declare function isRundownScriptSourceLarge(event: Event): event is RundownScriptSourceLarge;
2359
+ export interface RundownScriptStub extends Event {
2341
2360
  cat: 'disabled-by-default-devtools.v8-source-rundown-sources';
2342
2361
  name: 'StubScriptCatchup';
2343
2362
  args: Args & {
2344
2363
  data: {
2345
- isolate: string;
2364
+ isolate: number;
2346
2365
  scriptId: number;
2347
2366
  };
2348
2367
  };
2349
2368
  }
2350
- export declare function isAnyScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesScriptCatchupEvent | V8SourceRundownSourcesLargeScriptCatchupEvent | V8SourceRundownSourcesStubScriptCatchupEvent;
2369
+ export declare function isAnyScriptSourceEvent(event: Event): event is RundownScriptSource | RundownScriptSourceLarge | RundownScriptStub;
2351
2370
  export {};
@@ -1,7 +1,7 @@
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
- // Trace Events.
4
+ /** Trace Events. **/
5
5
  export var Phase;
6
6
  (function (Phase) {
7
7
  // Standard
@@ -63,7 +63,7 @@ export function objectIsCallFrame(object) {
63
63
  ('url' in object && typeof object.url === 'string');
64
64
  }
65
65
  export function isRunTask(event) {
66
- return event.name === Name.RUN_TASK;
66
+ return event.name === Name.RUN_TASK && event.ph === Phase.COMPLETE;
67
67
  }
68
68
  export var AuctionWorkletType;
69
69
  (function (AuctionWorkletType) {
@@ -160,6 +160,15 @@ export function isRenderFrameImplCreateChildFrame(event) {
160
160
  export function isLayoutImageUnsized(event) {
161
161
  return event.name === Name.LAYOUT_IMAGE_UNSIZED;
162
162
  }
163
+ export function isPairableAsyncBegin(e) {
164
+ return e.ph === Phase.ASYNC_NESTABLE_START;
165
+ }
166
+ export function isPairableAsyncEnd(e) {
167
+ return e.ph === Phase.ASYNC_NESTABLE_END;
168
+ }
169
+ export function isPairableAsyncInstant(e) {
170
+ return e.ph === Phase.ASYNC_NESTABLE_INSTANT;
171
+ }
163
172
  export function isAnimationFrameAsyncStart(data) {
164
173
  return data.name === Name.ANIMATION_FRAME && data.ph === Phase.ASYNC_NESTABLE_START;
165
174
  }
@@ -244,8 +253,9 @@ export var SelectorTimingsKey;
244
253
  export function isSelectorStats(event) {
245
254
  return event.name === Name.SELECTOR_STATS;
246
255
  }
247
- export function isUpdateLayoutTree(event) {
248
- return event.name === Name.UPDATE_LAYOUT_TREE;
256
+ /** The real trace event is called 'UpdateLayoutTree' but we've aliased it for convenience. */
257
+ export function isRecalcStyle(event) {
258
+ return event.name === Name.RECALC_STYLE;
249
259
  }
250
260
  export function isLayout(event) {
251
261
  return event.name === Name.LAYOUT && Boolean(event.args && 'beginData' in event.args);
@@ -287,7 +297,7 @@ export function isEnd(event) {
287
297
  return event.ph === Phase.END;
288
298
  }
289
299
  export function isDispatch(event) {
290
- return event.name === 'EventDispatch';
300
+ return event.name === 'EventDispatch' && event.ph === Phase.COMPLETE;
291
301
  }
292
302
  export function isInstant(event) {
293
303
  return event.ph === Phase.INSTANT;
@@ -296,13 +306,13 @@ export function isRendererEvent(event) {
296
306
  return isInstant(event) || isComplete(event);
297
307
  }
298
308
  export function isFireIdleCallback(event) {
299
- return event.name === 'FireIdleCallback';
309
+ return event.name === 'FireIdleCallback' && event.ph === Phase.COMPLETE;
300
310
  }
301
311
  export function isSchedulePostMessage(event) {
302
312
  return event.name === Name.SCHEDULE_POST_MESSAGE;
303
313
  }
304
314
  export function isHandlePostMessage(event) {
305
- return event.name === Name.HANDLE_POST_MESSAGE;
315
+ return event.name === Name.HANDLE_POST_MESSAGE && event.ph === Phase.COMPLETE;
306
316
  }
307
317
  export function isUpdateCounters(event) {
308
318
  return event.name === 'UpdateCounters';
@@ -385,7 +395,7 @@ export function isProfile(event) {
385
395
  return event.name === Name.PROFILE;
386
396
  }
387
397
  export function isSyntheticCpuProfile(event) {
388
- return event.name === Name.CPU_PROFILE;
398
+ return event.name === Name.CPU_PROFILE && event.ph === Phase.COMPLETE;
389
399
  }
390
400
  export function isProfileChunk(event) {
391
401
  return event.name === Name.PROFILE_CHUNK;
@@ -411,7 +421,7 @@ export function isResourceWillSendRequest(event) {
411
421
  export function isResourceReceivedData(event) {
412
422
  return event.name === 'ResourceReceivedData';
413
423
  }
414
- // Any event where we receive data (and get an encodedDataLength)
424
+ /** Any event where we receive data (and get an encodedDataLength) **/
415
425
  export function isReceivedDataEvent(event) {
416
426
  return event.name === 'ResourceReceivedData' || event.name === 'ResourceFinish' ||
417
427
  event.name === 'ResourceReceiveResponse';
@@ -433,7 +443,7 @@ export function isNavigationStart(event) {
433
443
  return event.name === 'navigationStart' && event.args?.data?.documentLoaderURL !== '';
434
444
  }
435
445
  export function isDidCommitSameDocumentNavigation(event) {
436
- return event.name === 'RenderFrameHostImpl::DidCommitSameDocumentNavigation';
446
+ return event.name === 'RenderFrameHostImpl::DidCommitSameDocumentNavigation' && event.ph === Phase.COMPLETE;
437
447
  }
438
448
  export function isMainFrameViewport(event) {
439
449
  return event.name === 'PaintTimingVisualizer::Viewport';
@@ -504,10 +514,10 @@ export function isPaint(event) {
504
514
  return event.name === Name.PAINT;
505
515
  }
506
516
  export function isPaintImage(event) {
507
- return event.name === Name.PAINT_IMAGE;
517
+ return event.name === Name.PAINT_IMAGE && event.ph === Phase.COMPLETE;
508
518
  }
509
519
  export function isScrollLayer(event) {
510
- return event.name === Name.SCROLL_LAYER;
520
+ return event.name === Name.SCROLL_LAYER && event.ph === Phase.COMPLETE;
511
521
  }
512
522
  export function isSetLayerId(event) {
513
523
  return event.name === Name.SET_LAYER_TREE_ID;
@@ -522,13 +532,13 @@ export function isLayerTreeHostImplSnapshot(event) {
522
532
  return event.name === Name.LAYER_TREE_HOST_IMPL_SNAPSHOT;
523
533
  }
524
534
  export function isFireAnimationFrame(event) {
525
- return event.name === Name.FIRE_ANIMATION_FRAME;
535
+ return event.name === Name.FIRE_ANIMATION_FRAME && event.ph === Phase.COMPLETE;
526
536
  }
527
537
  export function isTimerInstall(event) {
528
538
  return event.name === Name.TIMER_INSTALL;
529
539
  }
530
540
  export function isTimerFire(event) {
531
- return event.name === Name.TIMER_FIRE;
541
+ return event.name === Name.TIMER_FIRE && event.ph === Phase.COMPLETE;
532
542
  }
533
543
  export function isRequestIdleCallback(event) {
534
544
  return event.name === Name.REQUEST_IDLE_CALLBACK;
@@ -559,19 +569,19 @@ export function isWebSocketEvent(event) {
559
569
  return isWebSocketTraceEvent(event) || isSyntheticWebSocketConnection(event);
560
570
  }
561
571
  export function isV8Compile(event) {
562
- return event.name === Name.COMPILE;
572
+ return event.name === Name.COMPILE && event.ph === Phase.COMPLETE;
563
573
  }
564
574
  export function isFunctionCall(event) {
565
- return event.name === Name.FUNCTION_CALL;
575
+ return event.name === Name.FUNCTION_CALL && event.ph === Phase.COMPLETE;
566
576
  }
567
577
  export function isSchedulePostTaskCallback(event) {
568
578
  return event.name === Name.SCHEDULE_POST_TASK_CALLBACK;
569
579
  }
570
580
  export function isRunPostTaskCallback(event) {
571
- return event.name === Name.RUN_POST_TASK_CALLBACK;
581
+ return event.name === Name.RUN_POST_TASK_CALLBACK && event.ph === Phase.COMPLETE;
572
582
  }
573
583
  export function isAbortPostTaskCallback(event) {
574
- return event.name === Name.ABORT_POST_TASK_CALLBACK;
584
+ return event.name === Name.ABORT_POST_TASK_CALLBACK && event.ph === Phase.COMPLETE;
575
585
  }
576
586
  /**
577
587
  * Generally, before JS is executed, a trace event is dispatched that
@@ -607,7 +617,7 @@ export function isFlowPhaseEvent(event) {
607
617
  return event.ph === Phase.FLOW_START || event.ph === Phase.FLOW_STEP || event.ph === Phase.FLOW_END;
608
618
  }
609
619
  export function isParseAuthorStyleSheetEvent(event) {
610
- return event.name === Name.PARSE_AUTHOR_STYLE_SHEET;
620
+ return event.name === Name.PARSE_AUTHOR_STYLE_SHEET && event.ph === Phase.COMPLETE;
611
621
  }
612
622
  /**
613
623
  * This is an exhaustive list of events we track in the Performance
@@ -695,7 +705,8 @@ export var Name;
695
705
  /* Layout */
696
706
  Name["SCHEDULE_STYLE_RECALCULATION"] = "ScheduleStyleRecalculation";
697
707
  Name["LAYOUT"] = "Layout";
698
- Name["UPDATE_LAYOUT_TREE"] = "UpdateLayoutTree";
708
+ /** The real trace event is called 'UpdateLayoutTree' but we've aliased it for convenience. */
709
+ Name["RECALC_STYLE"] = "UpdateLayoutTree";
699
710
  Name["INVALIDATE_LAYOUT"] = "InvalidateLayout";
700
711
  Name["LAYOUT_INVALIDATION_TRACKING"] = "LayoutInvalidationTracking";
701
712
  Name["COMPUTE_INTERSECTION"] = "ComputeIntersections";
@@ -812,8 +823,10 @@ export var Name;
812
823
  Name["USER_TIMING_MEASURE"] = "UserTiming::Measure";
813
824
  Name["LINK_PRECONNECT"] = "LinkPreconnect";
814
825
  })(Name || (Name = {}));
815
- // NOT AN EXHAUSTIVE LIST: just some categories we use and refer
816
- // to in multiple places.
826
+ /**
827
+ * NOT AN EXHAUSTIVE LIST: just some categories we use and refer
828
+ * to in multiple places.
829
+ **/
817
830
  export const Categories = {
818
831
  Console: 'blink.console',
819
832
  UserTiming: 'blink.user_timing',
@@ -822,19 +835,19 @@ export const Categories = {
822
835
  export function isLegacyTimelineFrame(data) {
823
836
  return 'idle' in data && typeof data.idle === 'boolean';
824
837
  }
825
- export function isTargetRundownEvent(event) {
826
- return event.cat === 'disabled-by-default-devtools.target-rundown' && event.name === 'ScriptCompiled';
838
+ export function isRundownScriptCompiled(event) {
839
+ return event.cat === 'disabled-by-default-devtools.target-rundown';
827
840
  }
828
- export function isV8SourceRundownEvent(event) {
841
+ export function isRundownScript(event) {
829
842
  return event.cat === 'disabled-by-default-devtools.v8-source-rundown' && event.name === 'ScriptCatchup';
830
843
  }
831
- export function isV8SourceRundownSourcesScriptCatchupEvent(event) {
844
+ export function isRundownScriptSource(event) {
832
845
  return event.cat === 'disabled-by-default-devtools.v8-source-rundown-sources' && event.name === 'ScriptCatchup';
833
846
  }
834
- export function isV8SourceRundownSourcesLargeScriptCatchupEvent(event) {
847
+ export function isRundownScriptSourceLarge(event) {
835
848
  return event.cat === 'disabled-by-default-devtools.v8-source-rundown-sources' && event.name === 'LargeScriptCatchup';
836
849
  }
837
- export function isAnyScriptCatchupEvent(event) {
850
+ export function isAnyScriptSourceEvent(event) {
838
851
  return event.cat === 'disabled-by-default-devtools.v8-source-rundown-sources';
839
852
  }
840
853
  //# sourceMappingURL=TraceEvents.js.map