@paulirish/trace_engine 0.0.55 → 0.0.57

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 (268) hide show
  1. package/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +1 -1
  2. package/README.md +2 -2
  3. package/core/platform/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  4. package/core/platform/platform.prebundle.d.ts +18 -0
  5. package/core/platform/platform.prebundle.js +53 -0
  6. package/core/platform/platform.prebundle.js.map +1 -0
  7. package/core/platform/platform.prebundle.ts +71 -0
  8. package/generated/protocol.d.ts +51 -23
  9. package/locales/af.json +8 -8
  10. package/locales/am.json +8 -8
  11. package/locales/ar.json +8 -8
  12. package/locales/as.json +8 -8
  13. package/locales/az.json +8 -8
  14. package/locales/be.json +7 -7
  15. package/locales/bg.json +8 -8
  16. package/locales/bn.json +8 -8
  17. package/locales/bs.json +8 -8
  18. package/locales/ca.json +8 -8
  19. package/locales/cs.json +8 -8
  20. package/locales/cy.json +8 -8
  21. package/locales/da.json +8 -8
  22. package/locales/de.json +8 -8
  23. package/locales/el.json +8 -8
  24. package/locales/en-GB.json +8 -8
  25. package/locales/en-US.json +72 -51
  26. package/locales/en-XL.json +72 -51
  27. package/locales/es-419.json +8 -8
  28. package/locales/es.json +8 -8
  29. package/locales/et.json +8 -8
  30. package/locales/eu.json +8 -8
  31. package/locales/fa.json +11 -11
  32. package/locales/fi.json +8 -8
  33. package/locales/fil.json +8 -8
  34. package/locales/fr-CA.json +8 -8
  35. package/locales/fr.json +8 -8
  36. package/locales/gl.json +8 -8
  37. package/locales/gu.json +8 -8
  38. package/locales/he.json +8 -8
  39. package/locales/hi.json +8 -8
  40. package/locales/hr.json +8 -8
  41. package/locales/hu.json +8 -8
  42. package/locales/hy.json +8 -8
  43. package/locales/id.json +8 -8
  44. package/locales/is.json +8 -8
  45. package/locales/it.json +8 -8
  46. package/locales/ja.json +8 -8
  47. package/locales/ka.json +8 -8
  48. package/locales/kk.json +8 -8
  49. package/locales/km.json +8 -8
  50. package/locales/kn.json +7 -7
  51. package/locales/ko.json +8 -8
  52. package/locales/ky.json +7 -7
  53. package/locales/lo.json +8 -8
  54. package/locales/lt.json +8 -8
  55. package/locales/lv.json +8 -8
  56. package/locales/mk.json +8 -8
  57. package/locales/ml.json +8 -8
  58. package/locales/mn.json +8 -8
  59. package/locales/mr.json +7 -7
  60. package/locales/ms.json +7 -7
  61. package/locales/my.json +8 -8
  62. package/locales/ne.json +8 -8
  63. package/locales/nl.json +8 -8
  64. package/locales/no.json +8 -8
  65. package/locales/or.json +8 -8
  66. package/locales/pa.json +7 -7
  67. package/locales/pl.json +8 -8
  68. package/locales/pt-PT.json +8 -8
  69. package/locales/pt.json +8 -8
  70. package/locales/ro.json +8 -8
  71. package/locales/ru.json +8 -8
  72. package/locales/si.json +8 -8
  73. package/locales/sk.json +8 -8
  74. package/locales/sl.json +8 -8
  75. package/locales/sq.json +8 -8
  76. package/locales/sr-Latn.json +8 -8
  77. package/locales/sr.json +8 -8
  78. package/locales/sv.json +8 -8
  79. package/locales/sw.json +7 -7
  80. package/locales/ta.json +8 -8
  81. package/locales/te.json +8 -8
  82. package/locales/th.json +8 -8
  83. package/locales/tr.json +7 -7
  84. package/locales/uk.json +7 -7
  85. package/locales/ur.json +8 -8
  86. package/locales/uz.json +7 -7
  87. package/locales/vi.json +8 -8
  88. package/locales/zh-HK.json +8 -8
  89. package/locales/zh-TW.json +8 -8
  90. package/locales/zh.json +8 -8
  91. package/locales/zu.json +8 -8
  92. package/models/cpu_profile/cpu_profile.prebundle.d.ts +3 -0
  93. package/models/cpu_profile/cpu_profile.prebundle.js +7 -0
  94. package/models/cpu_profile/cpu_profile.prebundle.js.map +1 -0
  95. package/models/cpu_profile/cpu_profile.prebundle.ts +11 -0
  96. package/models/cpu_profile/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  97. package/models/trace/ModelImpl.d.ts +1 -0
  98. package/models/trace/ModelImpl.js +2 -4
  99. package/models/trace/ModelImpl.js.map +1 -1
  100. package/models/trace/Processor.js +20 -14
  101. package/models/trace/Processor.js.map +1 -1
  102. package/models/trace/devtools_entrypoint-bundle-tsconfig-tsconfig.json +61 -0
  103. package/models/trace/extras/TraceTree.d.ts +0 -1
  104. package/models/trace/extras/TraceTree.js +0 -3
  105. package/models/trace/extras/TraceTree.js.map +1 -1
  106. package/models/trace/extras/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  107. package/models/trace/extras/extras.prebundle.d.ts +7 -0
  108. package/models/trace/extras/extras.prebundle.js +11 -0
  109. package/models/trace/extras/extras.prebundle.js.map +1 -0
  110. package/models/trace/extras/extras.prebundle.ts +11 -0
  111. package/models/trace/handlers/ExtensionTraceDataHandler.js +28 -14
  112. package/models/trace/handlers/ExtensionTraceDataHandler.js.map +1 -1
  113. package/models/trace/handlers/ImagePaintingHandler.d.ts +7 -1
  114. package/models/trace/handlers/ImagePaintingHandler.js +33 -1
  115. package/models/trace/handlers/ImagePaintingHandler.js.map +1 -1
  116. package/models/trace/handlers/NetworkRequestsHandler.js +70 -3
  117. package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -1
  118. package/models/trace/handlers/SamplesHandler.js +2 -6
  119. package/models/trace/handlers/SamplesHandler.js.map +1 -1
  120. package/models/trace/handlers/SelectorStatsHandler.d.ts +17 -0
  121. package/models/trace/handlers/SelectorStatsHandler.js +42 -0
  122. package/models/trace/handlers/SelectorStatsHandler.js.map +1 -1
  123. package/models/trace/handlers/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  124. package/models/trace/handlers/handlers.prebundle.d.ts +4 -0
  125. package/models/trace/handlers/handlers.prebundle.js +8 -0
  126. package/models/trace/handlers/handlers.prebundle.js.map +1 -0
  127. package/models/trace/handlers/handlers.prebundle.ts +8 -0
  128. package/models/trace/helpers/SamplesIntegrator.js +14 -22
  129. package/models/trace/helpers/SamplesIntegrator.js.map +1 -1
  130. package/models/trace/helpers/SyntheticEvents.d.ts +0 -6
  131. package/models/trace/helpers/SyntheticEvents.js +2 -2
  132. package/models/trace/helpers/SyntheticEvents.js.map +1 -1
  133. package/models/trace/helpers/Timing.d.ts +5 -0
  134. package/models/trace/helpers/Timing.js +53 -3
  135. package/models/trace/helpers/Timing.js.map +1 -1
  136. package/models/trace/helpers/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  137. package/models/trace/helpers/helpers.prebundle.d.ts +7 -0
  138. package/models/trace/helpers/helpers.prebundle.js +11 -0
  139. package/models/trace/helpers/helpers.prebundle.js.map +1 -0
  140. package/models/trace/helpers/helpers.prebundle.ts +11 -0
  141. package/models/trace/insights/CLSCulprits.d.ts +5 -4
  142. package/models/trace/insights/CLSCulprits.js +29 -7
  143. package/models/trace/insights/CLSCulprits.js.map +1 -1
  144. package/models/trace/insights/Cache.d.ts +2 -0
  145. package/models/trace/insights/Cache.js +10 -0
  146. package/models/trace/insights/Cache.js.map +1 -1
  147. package/models/trace/insights/Common.d.ts +1 -1
  148. package/models/trace/insights/Common.js +3 -3
  149. package/models/trace/insights/Common.js.map +1 -1
  150. package/models/trace/insights/DOMSize.d.ts +27 -1
  151. package/models/trace/insights/DOMSize.js +42 -1
  152. package/models/trace/insights/DOMSize.js.map +1 -1
  153. package/models/trace/insights/DocumentLatency.d.ts +1 -0
  154. package/models/trace/insights/DocumentLatency.js +43 -1
  155. package/models/trace/insights/DocumentLatency.js.map +1 -1
  156. package/models/trace/insights/DuplicatedJavaScript.d.ts +2 -0
  157. package/models/trace/insights/DuplicatedJavaScript.js +9 -0
  158. package/models/trace/insights/DuplicatedJavaScript.js.map +1 -1
  159. package/models/trace/insights/FontDisplay.d.ts +1 -0
  160. package/models/trace/insights/FontDisplay.js +7 -0
  161. package/models/trace/insights/FontDisplay.js.map +1 -1
  162. package/models/trace/insights/ForcedReflow.d.ts +3 -1
  163. package/models/trace/insights/ForcedReflow.js +18 -1
  164. package/models/trace/insights/ForcedReflow.js.map +1 -1
  165. package/models/trace/insights/{InteractionToNextPaint.d.ts → INPBreakdown.d.ts} +14 -8
  166. package/models/trace/insights/{InteractionToNextPaint.js → INPBreakdown.js} +41 -10
  167. package/models/trace/insights/INPBreakdown.js.map +1 -0
  168. package/models/trace/insights/ImageDelivery.d.ts +2 -0
  169. package/models/trace/insights/ImageDelivery.js +28 -7
  170. package/models/trace/insights/ImageDelivery.js.map +1 -1
  171. package/models/trace/insights/{LCPPhases.d.ts → LCPBreakdown.d.ts} +27 -22
  172. package/models/trace/insights/{LCPPhases.js → LCPBreakdown.js} +77 -48
  173. package/models/trace/insights/LCPBreakdown.js.map +1 -0
  174. package/models/trace/insights/LCPDiscovery.d.ts +12 -0
  175. package/models/trace/insights/LCPDiscovery.js +59 -1
  176. package/models/trace/insights/LCPDiscovery.js.map +1 -1
  177. package/models/trace/insights/LegacyJavaScript.d.ts +2 -0
  178. package/models/trace/insights/LegacyJavaScript.js +9 -0
  179. package/models/trace/insights/LegacyJavaScript.js.map +1 -1
  180. package/models/trace/insights/Models.d.ts +2 -2
  181. package/models/trace/insights/Models.js +2 -2
  182. package/models/trace/insights/Models.js.map +1 -1
  183. package/models/trace/insights/ModernHTTP.d.ts +8 -5
  184. package/models/trace/insights/ModernHTTP.js +26 -13
  185. package/models/trace/insights/ModernHTTP.js.map +1 -1
  186. package/models/trace/insights/NetworkDependencyTree.d.ts +5 -4
  187. package/models/trace/insights/NetworkDependencyTree.js +36 -11
  188. package/models/trace/insights/NetworkDependencyTree.js.map +1 -1
  189. package/models/trace/insights/RenderBlocking.d.ts +2 -0
  190. package/models/trace/insights/RenderBlocking.js +10 -0
  191. package/models/trace/insights/RenderBlocking.js.map +1 -1
  192. package/models/trace/insights/SlowCSSSelector.d.ts +11 -2
  193. package/models/trace/insights/SlowCSSSelector.js +33 -14
  194. package/models/trace/insights/SlowCSSSelector.js.map +1 -1
  195. package/models/trace/insights/ThirdParties.d.ts +3 -0
  196. package/models/trace/insights/ThirdParties.js +31 -0
  197. package/models/trace/insights/ThirdParties.js.map +1 -1
  198. package/models/trace/insights/Viewport.d.ts +2 -1
  199. package/models/trace/insights/Viewport.js +16 -0
  200. package/models/trace/insights/Viewport.js.map +1 -1
  201. package/models/trace/insights/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  202. package/models/trace/insights/insights-tsconfig.json +2 -2
  203. package/models/trace/insights/insights.prebundle.d.ts +4 -0
  204. package/models/trace/insights/insights.prebundle.js +8 -0
  205. package/models/trace/insights/insights.prebundle.js.map +1 -0
  206. package/models/trace/insights/insights.prebundle.ts +8 -0
  207. package/models/trace/insights/types.d.ts +6 -3
  208. package/models/trace/insights/types.js +3 -2
  209. package/models/trace/insights/types.js.map +1 -1
  210. package/models/trace/lantern/core/core.prebundle.d.ts +2 -0
  211. package/models/trace/lantern/core/core.prebundle.js +6 -0
  212. package/models/trace/lantern/core/core.prebundle.js.map +1 -0
  213. package/models/trace/lantern/core/core.prebundle.ts +6 -0
  214. package/models/trace/lantern/core/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  215. package/models/trace/lantern/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  216. package/models/trace/lantern/graph/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  217. package/models/trace/lantern/graph/graph.prebundle.d.ts +4 -0
  218. package/models/trace/lantern/graph/graph.prebundle.js +8 -0
  219. package/models/trace/lantern/graph/graph.prebundle.js.map +1 -0
  220. package/models/trace/lantern/graph/graph.prebundle.ts +8 -0
  221. package/models/trace/lantern/lantern.prebundle.d.ts +6 -0
  222. package/models/trace/lantern/lantern.prebundle.js +10 -0
  223. package/models/trace/lantern/lantern.prebundle.js.map +1 -0
  224. package/models/trace/lantern/lantern.prebundle.ts +17 -0
  225. package/models/trace/lantern/metrics/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  226. package/models/trace/lantern/metrics/metrics.prebundle.d.ts +8 -0
  227. package/models/trace/lantern/metrics/metrics.prebundle.js +12 -0
  228. package/models/trace/lantern/metrics/metrics.prebundle.js.map +1 -0
  229. package/models/trace/lantern/metrics/metrics.prebundle.ts +12 -0
  230. package/models/trace/lantern/simulation/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  231. package/models/trace/lantern/simulation/simulation.prebundle.d.ts +6 -0
  232. package/models/trace/lantern/simulation/simulation.prebundle.js +10 -0
  233. package/models/trace/lantern/simulation/simulation.prebundle.js.map +1 -0
  234. package/models/trace/lantern/simulation/simulation.prebundle.ts +10 -0
  235. package/models/trace/lantern/types/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  236. package/models/trace/lantern/types/types.prebundle.d.ts +1 -0
  237. package/models/trace/lantern/types/types.prebundle.js +5 -0
  238. package/models/trace/lantern/types/types.prebundle.js.map +1 -0
  239. package/models/trace/lantern/types/types.prebundle.ts +5 -0
  240. package/models/trace/trace.prebundle.d.ts +10 -0
  241. package/models/trace/trace.prebundle.js +14 -0
  242. package/models/trace/trace.prebundle.js.map +1 -0
  243. package/models/trace/trace.prebundle.ts +25 -0
  244. package/models/trace/types/Extensions.d.ts +13 -1
  245. package/models/trace/types/Extensions.js +5 -1
  246. package/models/trace/types/Extensions.js.map +1 -1
  247. package/models/trace/types/File.d.ts +1 -0
  248. package/models/trace/types/File.js.map +1 -1
  249. package/models/trace/types/Overlays.d.ts +110 -0
  250. package/models/trace/types/Overlays.js +5 -0
  251. package/models/trace/types/Overlays.js.map +1 -0
  252. package/models/trace/types/Timing.js.map +1 -1
  253. package/models/trace/types/TraceEvents.d.ts +27 -9
  254. package/models/trace/types/TraceEvents.js +7 -18
  255. package/models/trace/types/TraceEvents.js.map +1 -1
  256. package/models/trace/types/devtools_entrypoint-bundle-tsconfig-tsconfig.json +43 -0
  257. package/models/trace/types/types-tsconfig.json +1 -0
  258. package/models/trace/types/types.d.ts +1 -0
  259. package/models/trace/types/types.js +1 -0
  260. package/models/trace/types/types.js.map +1 -1
  261. package/models/trace/types/types.prebundle.d.ts +5 -0
  262. package/models/trace/types/types.prebundle.js +9 -0
  263. package/models/trace/types/types.prebundle.js.map +1 -0
  264. package/models/trace/types/types.prebundle.ts +9 -0
  265. package/package.json +1 -1
  266. package/test/test-trace-engine.mjs +3 -3
  267. package/models/trace/insights/InteractionToNextPaint.js.map +0 -1
  268. package/models/trace/insights/LCPPhases.js.map +0 -1
@@ -0,0 +1,17 @@
1
+ // Copyright 2024 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as Core from './core/core.js';
6
+ import * as Graph from './graph/graph.js';
7
+ import * as Metrics from './metrics/metrics.js';
8
+ import * as Simulation from './simulation/simulation.js';
9
+ import * as Types from './types/types.js';
10
+
11
+ export {
12
+ Core,
13
+ Graph,
14
+ Metrics,
15
+ Simulation,
16
+ Types,
17
+ };
@@ -0,0 +1,43 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "checkJs": true,
5
+ "composite": true,
6
+ "declaration": true,
7
+ "experimentalDecorators": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "inlineSources": true,
10
+ "lib": [
11
+ "esnext",
12
+ "dom",
13
+ "dom.iterable"
14
+ ],
15
+ "module": "esnext",
16
+ "noEmitOnError": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "noImplicitOverride": true,
19
+ "noImplicitReturns": true,
20
+ "noUnusedLocals": false,
21
+ "noUnusedParameters": false,
22
+ "outDir": ".",
23
+ "rootDir": ".",
24
+ "skipLibCheck": true,
25
+ "sourceMap": true,
26
+ "strict": true,
27
+ "target": "esnext",
28
+ "tsBuildInfoFile": "devtools_entrypoint-bundle-tsconfig-tsconfig.json.tsbuildinfo",
29
+ "typeRoots": [],
30
+ "useUnknownInCatchVariables": false
31
+ },
32
+ "files": [
33
+ "metrics.prebundle.ts",
34
+ "../../../../../../../../front_end/legacy/legacy-defs.d.ts",
35
+ "../../../../../../../../front_end/global_typings/global_defs.d.ts",
36
+ "../../../../../../../../node_modules/@types/filesystem/index.d.ts"
37
+ ],
38
+ "references": [
39
+ {
40
+ "path": "./metrics-tsconfig.json"
41
+ }
42
+ ]
43
+ }
@@ -0,0 +1,8 @@
1
+ export * from './FirstContentfulPaint.js';
2
+ export * from './Interactive.js';
3
+ export * from './LargestContentfulPaint.js';
4
+ export * from './MaxPotentialFID.js';
5
+ export * from './Metric.js';
6
+ export * from './SpeedIndex.js';
7
+ export * from './TotalBlockingTime.js';
8
+ export * as TBTUtils from './TBTUtils.js';
@@ -0,0 +1,12 @@
1
+ // Copyright 2024 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ export * from './FirstContentfulPaint.js';
5
+ export * from './Interactive.js';
6
+ export * from './LargestContentfulPaint.js';
7
+ export * from './MaxPotentialFID.js';
8
+ export * from './Metric.js';
9
+ export * from './SpeedIndex.js';
10
+ export * from './TotalBlockingTime.js';
11
+ export * as TBTUtils from './TBTUtils.js';
12
+ //# sourceMappingURL=metrics.prebundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.prebundle.js","sourceRoot":"","sources":["metrics.prebundle.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC","sourcesContent":["// Copyright 2024 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 * from './FirstContentfulPaint.js';\nexport * from './Interactive.js';\nexport * from './LargestContentfulPaint.js';\nexport * from './MaxPotentialFID.js';\nexport * from './Metric.js';\nexport * from './SpeedIndex.js';\nexport * from './TotalBlockingTime.js';\nexport * as TBTUtils from './TBTUtils.js';\n"]}
@@ -0,0 +1,12 @@
1
+ // Copyright 2024 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ export * from './FirstContentfulPaint.js';
6
+ export * from './Interactive.js';
7
+ export * from './LargestContentfulPaint.js';
8
+ export * from './MaxPotentialFID.js';
9
+ export * from './Metric.js';
10
+ export * from './SpeedIndex.js';
11
+ export * from './TotalBlockingTime.js';
12
+ export * as TBTUtils from './TBTUtils.js';
@@ -0,0 +1,43 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "checkJs": true,
5
+ "composite": true,
6
+ "declaration": true,
7
+ "experimentalDecorators": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "inlineSources": true,
10
+ "lib": [
11
+ "esnext",
12
+ "dom",
13
+ "dom.iterable"
14
+ ],
15
+ "module": "esnext",
16
+ "noEmitOnError": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "noImplicitOverride": true,
19
+ "noImplicitReturns": true,
20
+ "noUnusedLocals": false,
21
+ "noUnusedParameters": false,
22
+ "outDir": ".",
23
+ "rootDir": ".",
24
+ "skipLibCheck": true,
25
+ "sourceMap": true,
26
+ "strict": true,
27
+ "target": "esnext",
28
+ "tsBuildInfoFile": "devtools_entrypoint-bundle-tsconfig-tsconfig.json.tsbuildinfo",
29
+ "typeRoots": [],
30
+ "useUnknownInCatchVariables": false
31
+ },
32
+ "files": [
33
+ "simulation.prebundle.ts",
34
+ "../../../../../../../../front_end/legacy/legacy-defs.d.ts",
35
+ "../../../../../../../../front_end/global_typings/global_defs.d.ts",
36
+ "../../../../../../../../node_modules/@types/filesystem/index.d.ts"
37
+ ],
38
+ "references": [
39
+ {
40
+ "path": "./simulation-tsconfig.json"
41
+ }
42
+ ]
43
+ }
@@ -0,0 +1,6 @@
1
+ export * from './ConnectionPool.js';
2
+ export * from './Constants.js';
3
+ export * from './DNSCache.js';
4
+ export * from './SimulationTimingMap.js';
5
+ export * from './Simulator.js';
6
+ export * from './TCPConnection.js';
@@ -0,0 +1,10 @@
1
+ // Copyright 2024 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ export * from './ConnectionPool.js';
5
+ export * from './Constants.js';
6
+ export * from './DNSCache.js';
7
+ export * from './SimulationTimingMap.js';
8
+ export * from './Simulator.js';
9
+ export * from './TCPConnection.js';
10
+ //# sourceMappingURL=simulation.prebundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulation.prebundle.js","sourceRoot":"","sources":["simulation.prebundle.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC","sourcesContent":["// Copyright 2024 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 * from './ConnectionPool.js';\nexport * from './Constants.js';\nexport * from './DNSCache.js';\nexport * from './SimulationTimingMap.js';\nexport * from './Simulator.js';\nexport * from './TCPConnection.js';\n"]}
@@ -0,0 +1,10 @@
1
+ // Copyright 2024 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ export * from './ConnectionPool.js';
6
+ export * from './Constants.js';
7
+ export * from './DNSCache.js';
8
+ export * from './SimulationTimingMap.js';
9
+ export * from './Simulator.js';
10
+ export * from './TCPConnection.js';
@@ -0,0 +1,43 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "checkJs": true,
5
+ "composite": true,
6
+ "declaration": true,
7
+ "experimentalDecorators": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "inlineSources": true,
10
+ "lib": [
11
+ "esnext",
12
+ "dom",
13
+ "dom.iterable"
14
+ ],
15
+ "module": "esnext",
16
+ "noEmitOnError": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "noImplicitOverride": true,
19
+ "noImplicitReturns": true,
20
+ "noUnusedLocals": false,
21
+ "noUnusedParameters": false,
22
+ "outDir": ".",
23
+ "rootDir": ".",
24
+ "skipLibCheck": true,
25
+ "sourceMap": true,
26
+ "strict": true,
27
+ "target": "esnext",
28
+ "tsBuildInfoFile": "devtools_entrypoint-bundle-tsconfig-tsconfig.json.tsbuildinfo",
29
+ "typeRoots": [],
30
+ "useUnknownInCatchVariables": false
31
+ },
32
+ "files": [
33
+ "types.prebundle.ts",
34
+ "../../../../../../../../front_end/legacy/legacy-defs.d.ts",
35
+ "../../../../../../../../front_end/global_typings/global_defs.d.ts",
36
+ "../../../../../../../../node_modules/@types/filesystem/index.d.ts"
37
+ ],
38
+ "references": [
39
+ {
40
+ "path": "./types-tsconfig.json"
41
+ }
42
+ ]
43
+ }
@@ -0,0 +1 @@
1
+ export * from './Lantern.js';
@@ -0,0 +1,5 @@
1
+ // Copyright 2024 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ export * from './Lantern.js';
5
+ //# sourceMappingURL=types.prebundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.prebundle.js","sourceRoot":"","sources":["types.prebundle.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,cAAc,cAAc,CAAC","sourcesContent":["// Copyright 2024 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 * from './Lantern.js';\n"]}
@@ -0,0 +1,5 @@
1
+ // Copyright 2024 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ export * from './Lantern.js';
@@ -0,0 +1,10 @@
1
+ import * as Extras from './extras/extras.js';
2
+ import * as Handlers from './handlers/handlers.js';
3
+ import * as Helpers from './helpers/helpers.js';
4
+ import * as Insights from './insights/insights.js';
5
+ import * as Lantern from './lantern/lantern.js';
6
+ import * as LanternComputationData from './LanternComputationData.js';
7
+ import * as TraceModel from './ModelImpl.js';
8
+ import * as Processor from './Processor.js';
9
+ import * as Types from './types/types.js';
10
+ export { Extras, Handlers, Helpers, Insights, Lantern, LanternComputationData, Processor, TraceModel, Types, };
@@ -0,0 +1,14 @@
1
+ // Copyright 2022 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ import * as Extras from './extras/extras.js';
5
+ import * as Handlers from './handlers/handlers.js';
6
+ import * as Helpers from './helpers/helpers.js';
7
+ import * as Insights from './insights/insights.js';
8
+ import * as Lantern from './lantern/lantern.js';
9
+ import * as LanternComputationData from './LanternComputationData.js';
10
+ import * as TraceModel from './ModelImpl.js';
11
+ import * as Processor from './Processor.js';
12
+ import * as Types from './types/types.js';
13
+ export { Extras, Handlers, Helpers, Insights, Lantern, LanternComputationData, Processor, TraceModel, Types, };
14
+ //# sourceMappingURL=trace.prebundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace.prebundle.js","sourceRoot":"","sources":["trace.prebundle.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,OAAO,EACP,sBAAsB,EACtB,SAAS,EACT,UAAU,EACV,KAAK,GACN,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\nimport * as Extras from './extras/extras.js';\nimport * as Handlers from './handlers/handlers.js';\nimport * as Helpers from './helpers/helpers.js';\nimport * as Insights from './insights/insights.js';\nimport * as Lantern from './lantern/lantern.js';\nimport * as LanternComputationData from './LanternComputationData.js';\nimport * as TraceModel from './ModelImpl.js';\nimport * as Processor from './Processor.js';\nimport * as Types from './types/types.js';\n\nexport {\n Extras,\n Handlers,\n Helpers,\n Insights,\n Lantern,\n LanternComputationData,\n Processor,\n TraceModel,\n Types,\n};\n"]}
@@ -0,0 +1,25 @@
1
+ // Copyright 2022 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as Extras from './extras/extras.js';
6
+ import * as Handlers from './handlers/handlers.js';
7
+ import * as Helpers from './helpers/helpers.js';
8
+ import * as Insights from './insights/insights.js';
9
+ import * as Lantern from './lantern/lantern.js';
10
+ import * as LanternComputationData from './LanternComputationData.js';
11
+ import * as TraceModel from './ModelImpl.js';
12
+ import * as Processor from './Processor.js';
13
+ import * as Types from './types/types.js';
14
+
15
+ export {
16
+ Extras,
17
+ Handlers,
18
+ Helpers,
19
+ Insights,
20
+ Lantern,
21
+ LanternComputationData,
22
+ Processor,
23
+ TraceModel,
24
+ Types,
25
+ };
@@ -1,3 +1,4 @@
1
+ import type * as Platform from '../../../core/platform/platform.js';
1
2
  import type { Args, ConsoleTimeStamp, Event, PerformanceMark, PerformanceMeasureBegin, Phase, SyntheticBased } from './TraceEvents.js';
2
3
  export type ExtensionEntryType = 'track-entry' | 'marker';
3
4
  export declare const extensionPalette: readonly ["primary", "primary-light", "primary-dark", "secondary", "secondary-light", "secondary-dark", "tertiary", "tertiary-light", "tertiary-dark", "error", "warning"];
@@ -13,10 +14,15 @@ export interface ExtensionDataPayloadBase {
13
14
  tooltipText?: string;
14
15
  }
15
16
  export type ExtensionDataPayload = ExtensionTrackEntryPayload | ExtensionMarkerPayload;
17
+ export interface ExtensionTrackEntryPayloadDeeplink {
18
+ url: Platform.DevToolsPath.UrlString;
19
+ description: string;
20
+ }
16
21
  export interface ExtensionTrackEntryPayload extends ExtensionDataPayloadBase {
17
22
  dataType?: 'track-entry';
18
23
  track: string;
19
24
  trackGroup?: string;
25
+ additionalContext?: ExtensionTrackEntryPayloadDeeplink;
20
26
  }
21
27
  export interface ExtensionMarkerPayload extends ExtensionDataPayloadBase {
22
28
  dataType: 'marker';
@@ -41,10 +47,16 @@ export declare function isExtensionPayloadTrackEntry(payload: {
41
47
  track?: string;
42
48
  dataType?: string;
43
49
  }): payload is ExtensionTrackEntryPayload;
50
+ export declare function isConsoleTimestampPayloadTrackEntry(payload: {
51
+ description?: string;
52
+ url?: string;
53
+ }): payload is ExtensionTrackEntryPayloadDeeplink;
44
54
  export declare function isValidExtensionPayload(payload: {
45
55
  track?: string;
46
56
  dataType?: string;
47
- }): payload is ExtensionDataPayload;
57
+ description?: string;
58
+ url?: string;
59
+ }): payload is ExtensionDataPayload | ExtensionTrackEntryPayloadDeeplink;
48
60
  export declare function isSyntheticExtensionEntry(entry: Event): entry is SyntheticExtensionEntry;
49
61
  export interface ExtensionTrackData {
50
62
  name: string;
@@ -22,8 +22,12 @@ export function isExtensionPayloadTrackEntry(payload) {
22
22
  const validEntryType = payload.dataType === 'track-entry' || payload.dataType === undefined;
23
23
  return validEntryType && hasTrack;
24
24
  }
25
+ export function isConsoleTimestampPayloadTrackEntry(payload) {
26
+ return payload.url !== undefined && payload.description !== undefined;
27
+ }
25
28
  export function isValidExtensionPayload(payload) {
26
- return isExtensionPayloadMarker(payload) || isExtensionPayloadTrackEntry(payload);
29
+ return isExtensionPayloadMarker(payload) || isExtensionPayloadTrackEntry(payload) ||
30
+ isConsoleTimestampPayloadTrackEntry(payload);
27
31
  }
28
32
  export function isSyntheticExtensionEntry(entry) {
29
33
  return entry.cat === 'devtools.extension';
@@ -1 +1 @@
1
- {"version":3,"file":"Extensions.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Extensions.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAQ7B,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,SAAS;IACT,eAAe;IACf,cAAc;IACd,WAAW;IACX,iBAAiB;IACjB,gBAAgB;IAChB,UAAU;IACV,gBAAgB;IAChB,eAAe;IACf,OAAO;IACP,SAAS;CACD,CAAC;AAsDX,MAAM,UAAU,wBAAwB,CAAC,OAA4B;IACnE,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,OAA4C;IAEvF,MAAM,QAAQ,GAAG,OAAO,IAAI,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,KAAK,aAAa,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC;IAC5F,OAAO,cAAc,IAAI,QAAQ,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAA4C;IAClF,OAAO,wBAAwB,CAAC,OAAO,CAAC,IAAI,4BAA4B,CAAC,OAAO,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,KAAY;IACpD,OAAO,KAAK,CAAC,GAAG,KAAK,oBAAoB,CAAC;AAC5C,CAAC","sourcesContent":["// Copyright 2024 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 {\n Args, ConsoleTimeStamp, Event, PerformanceMark, PerformanceMeasureBegin, Phase, SyntheticBased} from\n './TraceEvents.js';\n\nexport type ExtensionEntryType = 'track-entry'|'marker';\n\nexport const extensionPalette = [\n 'primary',\n 'primary-light',\n 'primary-dark',\n 'secondary',\n 'secondary-light',\n 'secondary-dark',\n 'tertiary',\n 'tertiary-light',\n 'tertiary-dark',\n 'error',\n 'warning',\n] as const;\n\nexport type ExtensionColorFromPalette = typeof extensionPalette[number];\n\nexport interface ExtensionDataPayloadBase {\n color?: ExtensionColorFromPalette;\n /**\n * We document to users that we support only string values here, but because\n * this is coming from user code the values could be anything, so we ensure we\n * deal with bad data by typing this as unknown.\n */\n properties?: Array<[string, unknown]>;\n tooltipText?: string;\n}\n\nexport type ExtensionDataPayload = ExtensionTrackEntryPayload|ExtensionMarkerPayload;\n\nexport interface ExtensionTrackEntryPayload extends ExtensionDataPayloadBase {\n // Typed as possibly undefined since when no data type is provided\n // the entry is defaulted to a track entry\n dataType?: 'track-entry';\n // The name of the track the entry will be displayed in.\n // Entries intended to be displayed in the same track must contain the\n // same value in this property.\n // If undefined, measurement is added to the Timings track\n track: string;\n // The track group an entry’s track belongs to.\n // Entries intended to be displayed in the same track must contain the\n // same value in this property as well as the same value in the track\n // property.\n trackGroup?: string;\n}\n\nexport interface ExtensionMarkerPayload extends ExtensionDataPayloadBase {\n dataType: 'marker';\n}\n\n/**\n * Synthetic events created for extension tracks.\n */\nexport interface SyntheticExtensionTrackEntry extends\n SyntheticBased<Phase.COMPLETE, PerformanceMeasureBegin|PerformanceMark|ConsoleTimeStamp> {\n args: Args&ExtensionTrackEntryPayload;\n}\n\n/**\n * Synthetic events created for extension marks.\n */\nexport interface SyntheticExtensionMarker extends SyntheticBased<Phase.COMPLETE, PerformanceMark> {\n args: Args&ExtensionMarkerPayload;\n}\n\nexport type SyntheticExtensionEntry = SyntheticExtensionTrackEntry|SyntheticExtensionMarker;\n\nexport function isExtensionPayloadMarker(payload: {dataType?: string}): payload is ExtensionMarkerPayload {\n return payload.dataType === 'marker';\n}\n\nexport function isExtensionPayloadTrackEntry(payload: {track?: string, dataType?: string}):\n payload is ExtensionTrackEntryPayload {\n const hasTrack = 'track' in payload && Boolean(payload.track);\n const validEntryType = payload.dataType === 'track-entry' || payload.dataType === undefined;\n return validEntryType && hasTrack;\n}\n\nexport function isValidExtensionPayload(payload: {track?: string, dataType?: string}): payload is ExtensionDataPayload {\n return isExtensionPayloadMarker(payload) || isExtensionPayloadTrackEntry(payload);\n}\n\nexport function isSyntheticExtensionEntry(entry: Event): entry is SyntheticExtensionEntry {\n return entry.cat === 'devtools.extension';\n}\n\nexport interface ExtensionTrackData {\n // Name of the top level track. If it's a track group then this value\n // has the name of the group, otherwise it has the name of the track.\n name: string;\n isTrackGroup: boolean;\n // If this contains the data of a track group, this property contains\n // the entries of each of the tracks in the the group. If this is a\n // standalone track, then this contains that track's entries only.\n entriesByTrack: Record<string, SyntheticExtensionTrackEntry[]>;\n}\n"]}
1
+ {"version":3,"file":"Extensions.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Extensions.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAU7B,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,SAAS;IACT,eAAe;IACf,cAAc;IACd,WAAW;IACX,iBAAiB;IACjB,gBAAgB;IAChB,UAAU;IACV,gBAAgB;IAChB,eAAe;IACf,OAAO;IACP,SAAS;CACD,CAAC;AAiEX,MAAM,UAAU,wBAAwB,CAAC,OAA4B;IACnE,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,OAA4C;IAEvF,MAAM,QAAQ,GAAG,OAAO,IAAI,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,KAAK,aAAa,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC;IAC5F,OAAO,cAAc,IAAI,QAAQ,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,mCAAmC,CAAC,OAA6C;IAE/F,OAAO,OAAO,CAAC,GAAG,KAAK,SAAS,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,uBAAuB,CACnC,OAAgF;IAElF,OAAO,wBAAwB,CAAC,OAAO,CAAC,IAAI,4BAA4B,CAAC,OAAO,CAAC;QAC7E,mCAAmC,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,KAAY;IACpD,OAAO,KAAK,CAAC,GAAG,KAAK,oBAAoB,CAAC;AAC5C,CAAC","sourcesContent":["// Copyright 2024 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 Platform from '../../../core/platform/platform.js';\n\nimport type {\n Args, ConsoleTimeStamp, Event, PerformanceMark, PerformanceMeasureBegin, Phase, SyntheticBased} from\n './TraceEvents.js';\n\nexport type ExtensionEntryType = 'track-entry'|'marker';\n\nexport const extensionPalette = [\n 'primary',\n 'primary-light',\n 'primary-dark',\n 'secondary',\n 'secondary-light',\n 'secondary-dark',\n 'tertiary',\n 'tertiary-light',\n 'tertiary-dark',\n 'error',\n 'warning',\n] as const;\n\nexport type ExtensionColorFromPalette = typeof extensionPalette[number];\n\nexport interface ExtensionDataPayloadBase {\n color?: ExtensionColorFromPalette;\n /**\n * We document to users that we support only string values here, but because\n * this is coming from user code the values could be anything, so we ensure we\n * deal with bad data by typing this as unknown.\n */\n properties?: Array<[string, unknown]>;\n tooltipText?: string;\n}\n\nexport type ExtensionDataPayload = ExtensionTrackEntryPayload|ExtensionMarkerPayload;\n\nexport interface ExtensionTrackEntryPayloadDeeplink {\n // The URL (deep-link) to show in the summary for the track.\n url: Platform.DevToolsPath.UrlString;\n // The label to show in front of the URL when the deep-link is shown in the\n // graph.\n description: string;\n}\n\nexport interface ExtensionTrackEntryPayload extends ExtensionDataPayloadBase {\n // Typed as possibly undefined since when no data type is provided\n // the entry is defaulted to a track entry\n dataType?: 'track-entry';\n // The name of the track the entry will be displayed in.\n // Entries intended to be displayed in the same track must contain the\n // same value in this property.\n // If undefined, measurement is added to the Timings track\n track: string;\n // The track group an entry’s track belongs to.\n // Entries intended to be displayed in the same track must contain the\n // same value in this property as well as the same value in the track\n // property.\n trackGroup?: string;\n // Additional context (deep-link URL) that can be shown in the summary for the\n // track.\n additionalContext?: ExtensionTrackEntryPayloadDeeplink;\n}\n\nexport interface ExtensionMarkerPayload extends ExtensionDataPayloadBase {\n dataType: 'marker';\n}\n\n/**\n * Synthetic events created for extension tracks.\n */\nexport interface SyntheticExtensionTrackEntry extends\n SyntheticBased<Phase.COMPLETE, PerformanceMeasureBegin|PerformanceMark|ConsoleTimeStamp> {\n args: Args&ExtensionTrackEntryPayload;\n}\n\n/**\n * Synthetic events created for extension marks.\n */\nexport interface SyntheticExtensionMarker extends SyntheticBased<Phase.COMPLETE, PerformanceMark> {\n args: Args&ExtensionMarkerPayload;\n}\n\nexport type SyntheticExtensionEntry = SyntheticExtensionTrackEntry|SyntheticExtensionMarker;\n\nexport function isExtensionPayloadMarker(payload: {dataType?: string}): payload is ExtensionMarkerPayload {\n return payload.dataType === 'marker';\n}\n\nexport function isExtensionPayloadTrackEntry(payload: {track?: string, dataType?: string}):\n payload is ExtensionTrackEntryPayload {\n const hasTrack = 'track' in payload && Boolean(payload.track);\n const validEntryType = payload.dataType === 'track-entry' || payload.dataType === undefined;\n return validEntryType && hasTrack;\n}\n\nexport function isConsoleTimestampPayloadTrackEntry(payload: {description?: string, url?: string}):\n payload is ExtensionTrackEntryPayloadDeeplink {\n return payload.url !== undefined && payload.description !== undefined;\n}\n\nexport function isValidExtensionPayload(\n payload: {track?: string, dataType?: string, description?: string, url?: string}): payload is ExtensionDataPayload|\n ExtensionTrackEntryPayloadDeeplink {\n return isExtensionPayloadMarker(payload) || isExtensionPayloadTrackEntry(payload) ||\n isConsoleTimestampPayloadTrackEntry(payload);\n}\n\nexport function isSyntheticExtensionEntry(entry: Event): entry is SyntheticExtensionEntry {\n return entry.cat === 'devtools.extension';\n}\n\nexport interface ExtensionTrackData {\n // Name of the top level track. If it's a track group then this value\n // has the name of the group, otherwise it has the name of the track.\n name: string;\n isTrackGroup: boolean;\n // If this contains the data of a track group, this property contains\n // the entries of each of the tracks in the the group. If this is a\n // standalone track, then this contains that track's entries only.\n entriesByTrack: Record<string, SyntheticExtensionTrackEntry[]>;\n}\n"]}
@@ -162,6 +162,7 @@ export interface MetaData {
162
162
  /** Currently only stores JS maps, not CSS. This never stores data url source maps. */
163
163
  sourceMaps?: MetadataSourceMap[];
164
164
  visualTrackConfig?: PersistedTraceVisualConfig;
165
+ hostDPR?: number;
165
166
  }
166
167
  interface MetadataSourceMap {
167
168
  url: string;
@@ -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}\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 */\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}\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. 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}\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 */\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"]}
@@ -0,0 +1,110 @@
1
+ // import type * as Lit from '../../../ui/lit/lit.js';
2
+ import type { EntriesLinkState } from './File.js';
3
+ import type { Micro, TraceWindowMicro } from './Timing.js';
4
+ import type { Event, LegacyTimelineFrame, PageLoadEvent } from './TraceEvents.js';
5
+ /**
6
+ * Represents which flamechart an entry is rendered in.
7
+ * We need to know this because when we place an overlay for an entry we need
8
+ * to adjust its Y value if it's in the main chart which is drawn below the
9
+ * network chart
10
+ */
11
+ export type EntryChartLocation = 'main' | 'network';
12
+ /**
13
+ * You can add overlays to trace events, but also right now frames are drawn on
14
+ * the timeline but they are not trace events, so we need to allow for that.
15
+ * In the future when the frames track has been migrated to be powered by
16
+ * animation frames (crbug.com/345144583), we can remove the requirement to
17
+ * support TimelineFrame instances (which themselves will be removed from the
18
+ * codebase.)
19
+ */
20
+ export type OverlayEntry = Event | LegacyTimelineFrame;
21
+ /**
22
+ * Represents when a user has selected an entry in the timeline
23
+ */
24
+ export interface EntrySelected {
25
+ type: 'ENTRY_SELECTED';
26
+ entry: OverlayEntry;
27
+ }
28
+ /**
29
+ * Drawn around an entry when we want to highlight it to the user.
30
+ */
31
+ export interface EntryOutline {
32
+ type: 'ENTRY_OUTLINE';
33
+ entry: OverlayEntry;
34
+ outlineReason: 'ERROR' | 'INFO';
35
+ }
36
+ /**
37
+ * Represents an object created when a user creates a label for an entry in the timeline.
38
+ */
39
+ export interface EntryLabel {
40
+ type: 'ENTRY_LABEL';
41
+ entry: OverlayEntry;
42
+ label: string;
43
+ }
44
+ export interface EntriesLink {
45
+ type: 'ENTRIES_LINK';
46
+ state: EntriesLinkState;
47
+ entryFrom: OverlayEntry;
48
+ entryTo?: OverlayEntry;
49
+ }
50
+ /**
51
+ * Represents a time range on the trace. Also used when the user shift+clicks
52
+ * and drags to create a time range.
53
+ */
54
+ export interface TimeRangeLabel {
55
+ type: 'TIME_RANGE';
56
+ bounds: TraceWindowMicro;
57
+ label: string;
58
+ showDuration: boolean;
59
+ }
60
+ /**
61
+ * Used to highlight with a red-candy stripe a time range. It takes an entry
62
+ * because this entry is the row that will be used to place the candy stripe,
63
+ * and its height will be set to the height of that row.
64
+ */
65
+ export interface CandyStripedTimeRange {
66
+ type: 'CANDY_STRIPED_TIME_RANGE';
67
+ bounds: TraceWindowMicro;
68
+ entry: Event;
69
+ }
70
+ /**
71
+ * An EntryBreakdown, or section, that makes up a TimespanBreakdown.
72
+ */
73
+ export interface TimespanBreakdownEntryBreakdown {
74
+ bounds: TraceWindowMicro;
75
+ label: string | any;
76
+ showDuration: boolean;
77
+ }
78
+ /**
79
+ * Represents a timespan on a trace broken down into parts. Each part has a label to it.
80
+ * If an entry is defined, the breakdown will be vertically positioned based on it.
81
+ */
82
+ export interface TimespanBreakdown {
83
+ type: 'TIMESPAN_BREAKDOWN';
84
+ sections: TimespanBreakdownEntryBreakdown[];
85
+ entry?: Event;
86
+ renderLocation?: 'BOTTOM_OF_TIMELINE' | 'BELOW_EVENT' | 'ABOVE_EVENT';
87
+ }
88
+ export interface TimestampMarker {
89
+ type: 'TIMESTAMP_MARKER';
90
+ timestamp: Micro;
91
+ }
92
+ /**
93
+ * Represents a timings marker. This has a line that runs up the whole canvas.
94
+ * We can hold an array of entries, in the case we want to hold more than one with the same timestamp.
95
+ * The adjusted timestamp being the timestamp for the event adjusted by closest navigation.
96
+ */
97
+ export interface TimingsMarker {
98
+ type: 'TIMINGS_MARKER';
99
+ entries: PageLoadEvent[];
100
+ entryToFieldResult: Map<PageLoadEvent, TimingsMarkerFieldResult>;
101
+ adjustedTimestamp: Micro;
102
+ }
103
+ export interface TimingsMarkerFieldResult {
104
+ value: Micro;
105
+ pageScope: 'url' | 'origin';
106
+ }
107
+ /**
108
+ * All supported overlay types.
109
+ */
110
+ export type Overlay = EntrySelected | EntryOutline | TimeRangeLabel | EntryLabel | EntriesLink | TimespanBreakdown | TimestampMarker | CandyStripedTimeRange | TimingsMarker;
@@ -0,0 +1,5 @@
1
+ // Copyright 2025 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ export {};
5
+ //# sourceMappingURL=Overlays.js.map
@@ -0,0 +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\n/**\n * All supported overlay types.\n */\nexport type Overlay = EntrySelected|EntryOutline|TimeRangeLabel|EntryLabel|EntriesLink|TimespanBreakdown|\n TimestampMarker|CandyStripedTimeRange|TimingsMarker;\n"]}
@@ -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\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,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"]}