@paulirish/trace_engine 0.0.44 → 0.0.46

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 (272) hide show
  1. package/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +1 -1
  2. package/core/platform/ArrayUtilities.d.ts +1 -1
  3. package/core/platform/ArrayUtilities.js.map +1 -1
  4. package/core/platform/DOMUtilities.js +1 -1
  5. package/core/platform/DOMUtilities.js.map +1 -1
  6. package/core/platform/MimeType.js.map +1 -1
  7. package/core/platform/NumberUtilities.js.map +1 -1
  8. package/core/platform/ServerTiming.d.ts +2 -2
  9. package/core/platform/ServerTiming.js.map +1 -1
  10. package/core/platform/StringUtilities.js +1 -1
  11. package/core/platform/StringUtilities.js.map +1 -1
  12. package/core/platform/Timing.d.ts +0 -1
  13. package/core/platform/Timing.js +0 -3
  14. package/core/platform/Timing.js.map +1 -1
  15. package/core/platform/TypedArrayUtilities.js +3 -2
  16. package/core/platform/TypedArrayUtilities.js.map +1 -1
  17. package/generated/protocol.d.ts +71 -4
  18. package/locales/af.json +544 -1
  19. package/locales/am.json +544 -1
  20. package/locales/ar.json +544 -1
  21. package/locales/as.json +544 -1
  22. package/locales/az.json +544 -1
  23. package/locales/be.json +544 -1
  24. package/locales/bg.json +544 -1
  25. package/locales/bn.json +544 -1
  26. package/locales/bs.json +544 -1
  27. package/locales/ca.json +544 -1
  28. package/locales/cs.json +544 -1
  29. package/locales/cy.json +544 -1
  30. package/locales/da.json +544 -1
  31. package/locales/de.json +544 -1
  32. package/locales/el.json +544 -1
  33. package/locales/en-GB.json +544 -1
  34. package/locales/en-US.json +561 -15
  35. package/locales/en-XL.json +561 -15
  36. package/locales/es-419.json +544 -1
  37. package/locales/es.json +544 -1
  38. package/locales/et.json +544 -1
  39. package/locales/eu.json +544 -1
  40. package/locales/fa.json +544 -1
  41. package/locales/fi.json +544 -1
  42. package/locales/fil.json +544 -1
  43. package/locales/fr-CA.json +544 -1
  44. package/locales/fr.json +544 -1
  45. package/locales/gl.json +544 -1
  46. package/locales/gu.json +544 -1
  47. package/locales/he.json +545 -2
  48. package/locales/hi.json +544 -1
  49. package/locales/hr.json +544 -1
  50. package/locales/hu.json +544 -1
  51. package/locales/hy.json +544 -1
  52. package/locales/id.json +544 -1
  53. package/locales/is.json +544 -1
  54. package/locales/it.json +544 -1
  55. package/locales/ja.json +544 -1
  56. package/locales/ka.json +544 -1
  57. package/locales/kk.json +544 -1
  58. package/locales/km.json +544 -1
  59. package/locales/kn.json +544 -1
  60. package/locales/ko.json +544 -1
  61. package/locales/ky.json +544 -1
  62. package/locales/lo.json +544 -1
  63. package/locales/lt.json +544 -1
  64. package/locales/lv.json +544 -1
  65. package/locales/mk.json +544 -1
  66. package/locales/ml.json +544 -1
  67. package/locales/mn.json +544 -1
  68. package/locales/mr.json +544 -1
  69. package/locales/ms.json +544 -1
  70. package/locales/my.json +544 -1
  71. package/locales/ne.json +544 -1
  72. package/locales/nl.json +544 -1
  73. package/locales/no.json +544 -1
  74. package/locales/or.json +544 -1
  75. package/locales/pa.json +544 -1
  76. package/locales/pl.json +544 -1
  77. package/locales/pt-PT.json +544 -1
  78. package/locales/pt.json +544 -1
  79. package/locales/ro.json +544 -1
  80. package/locales/ru.json +544 -1
  81. package/locales/si.json +544 -1
  82. package/locales/sk.json +544 -1
  83. package/locales/sl.json +544 -1
  84. package/locales/sq.json +544 -1
  85. package/locales/sr-Latn.json +544 -1
  86. package/locales/sr.json +544 -1
  87. package/locales/sv.json +544 -1
  88. package/locales/sw.json +544 -1
  89. package/locales/ta.json +544 -1
  90. package/locales/te.json +544 -1
  91. package/locales/th.json +544 -1
  92. package/locales/tr.json +544 -1
  93. package/locales/uk.json +544 -1
  94. package/locales/ur.json +544 -1
  95. package/locales/uz.json +544 -1
  96. package/locales/vi.json +544 -1
  97. package/locales/zh-HK.json +544 -1
  98. package/locales/zh-TW.json +544 -1
  99. package/locales/zh.json +544 -1
  100. package/locales/zu.json +544 -1
  101. package/models/cpu_profile/CPUProfileDataModel.js +10 -10
  102. package/models/cpu_profile/CPUProfileDataModel.js.map +1 -1
  103. package/models/trace/LanternComputationData.js.map +1 -1
  104. package/models/trace/ModelImpl.d.ts +1 -0
  105. package/models/trace/ModelImpl.js +1 -0
  106. package/models/trace/ModelImpl.js.map +1 -1
  107. package/models/trace/Processor.js +16 -11
  108. package/models/trace/Processor.js.map +1 -1
  109. package/models/trace/extras/FetchNodes.d.ts +1 -1
  110. package/models/trace/extras/FetchNodes.js +3 -3
  111. package/models/trace/extras/FetchNodes.js.map +1 -1
  112. package/models/trace/extras/ScriptDuplication.d.ts +34 -0
  113. package/models/trace/extras/ScriptDuplication.js +178 -0
  114. package/models/trace/extras/ScriptDuplication.js.map +1 -0
  115. package/models/trace/extras/StackTraceForEvent.js +25 -44
  116. package/models/trace/extras/StackTraceForEvent.js.map +1 -1
  117. package/models/trace/extras/ThirdParties.js +1 -0
  118. package/models/trace/extras/ThirdParties.js.map +1 -1
  119. package/models/trace/extras/TraceTree.d.ts +5 -2
  120. package/models/trace/extras/TraceTree.js +47 -17
  121. package/models/trace/extras/TraceTree.js.map +1 -1
  122. package/models/trace/extras/extras-tsconfig.json +1 -1
  123. package/models/trace/extras/extras.d.ts +1 -0
  124. package/models/trace/extras/extras.js +1 -0
  125. package/models/trace/extras/extras.js.map +1 -1
  126. package/models/trace/handlers/AnimationFramesHandler.js.map +1 -1
  127. package/models/trace/handlers/AsyncJSCallsHandler.js.map +1 -1
  128. package/models/trace/handlers/AuctionWorkletsHandler.js.map +1 -1
  129. package/models/trace/handlers/ExtensionTraceDataHandler.d.ts +1 -1
  130. package/models/trace/handlers/ExtensionTraceDataHandler.js +2 -1
  131. package/models/trace/handlers/ExtensionTraceDataHandler.js.map +1 -1
  132. package/models/trace/handlers/FramesHandler.js.map +1 -1
  133. package/models/trace/handlers/ImagePaintingHandler.js +1 -1
  134. package/models/trace/handlers/ImagePaintingHandler.js.map +1 -1
  135. package/models/trace/handlers/InitiatorsHandler.js.map +1 -1
  136. package/models/trace/handlers/InvalidationsHandler.js.map +1 -1
  137. package/models/trace/handlers/LayoutShiftsHandler.js.map +1 -1
  138. package/models/trace/handlers/MetaHandler.d.ts +2 -2
  139. package/models/trace/handlers/MetaHandler.js +4 -6
  140. package/models/trace/handlers/MetaHandler.js.map +1 -1
  141. package/models/trace/handlers/ModelHandlers.d.ts +1 -0
  142. package/models/trace/handlers/ModelHandlers.js +1 -0
  143. package/models/trace/handlers/ModelHandlers.js.map +1 -1
  144. package/models/trace/handlers/NetworkRequestsHandler.d.ts +9 -0
  145. package/models/trace/handlers/NetworkRequestsHandler.js +6 -6
  146. package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -1
  147. package/models/trace/handlers/PageLoadMetricsHandler.js +1 -1
  148. package/models/trace/handlers/PageLoadMetricsHandler.js.map +1 -1
  149. package/models/trace/handlers/RendererHandler.js +3 -4
  150. package/models/trace/handlers/RendererHandler.js.map +1 -1
  151. package/models/trace/handlers/ScriptsHandler.d.ts +22 -0
  152. package/models/trace/handlers/ScriptsHandler.js +116 -0
  153. package/models/trace/handlers/ScriptsHandler.js.map +1 -0
  154. package/models/trace/handlers/UserTimingsHandler.d.ts +5 -0
  155. package/models/trace/handlers/UserTimingsHandler.js +16 -0
  156. package/models/trace/handlers/UserTimingsHandler.js.map +1 -1
  157. package/models/trace/handlers/WorkersHandler.js.map +1 -1
  158. package/models/trace/handlers/handlers-tsconfig.json +1 -0
  159. package/models/trace/handlers/helpers.d.ts +5 -1
  160. package/models/trace/handlers/helpers.js +28 -4
  161. package/models/trace/handlers/helpers.js.map +1 -1
  162. package/models/trace/helpers/Network.d.ts +1 -0
  163. package/models/trace/helpers/Network.js +8 -3
  164. package/models/trace/helpers/Network.js.map +1 -1
  165. package/models/trace/helpers/SamplesIntegrator.d.ts +8 -1
  166. package/models/trace/helpers/SamplesIntegrator.js +42 -2
  167. package/models/trace/helpers/SamplesIntegrator.js.map +1 -1
  168. package/models/trace/helpers/Timing.js.map +1 -1
  169. package/models/trace/helpers/Trace.d.ts +7 -10
  170. package/models/trace/helpers/Trace.js +25 -10
  171. package/models/trace/helpers/Trace.js.map +1 -1
  172. package/models/trace/insights/CLSCulprits.d.ts +12 -12
  173. package/models/trace/insights/CLSCulprits.js +15 -4
  174. package/models/trace/insights/CLSCulprits.js.map +1 -1
  175. package/models/trace/insights/Common.d.ts +7 -1
  176. package/models/trace/insights/Common.js +9 -3
  177. package/models/trace/insights/Common.js.map +1 -1
  178. package/models/trace/insights/DOMSize.d.ts +8 -8
  179. package/models/trace/insights/DOMSize.js +2 -1
  180. package/models/trace/insights/DOMSize.js.map +1 -1
  181. package/models/trace/insights/DocumentLatency.d.ts +11 -11
  182. package/models/trace/insights/DocumentLatency.js +2 -1
  183. package/models/trace/insights/DocumentLatency.js.map +1 -1
  184. package/models/trace/insights/DuplicateJavaScript.d.ts +18 -0
  185. package/models/trace/insights/DuplicateJavaScript.js +49 -0
  186. package/models/trace/insights/DuplicateJavaScript.js.map +1 -0
  187. package/models/trace/insights/FontDisplay.d.ts +4 -4
  188. package/models/trace/insights/FontDisplay.js +2 -1
  189. package/models/trace/insights/FontDisplay.js.map +1 -1
  190. package/models/trace/insights/ForcedReflow.d.ts +5 -5
  191. package/models/trace/insights/ForcedReflow.js +4 -1
  192. package/models/trace/insights/ForcedReflow.js.map +1 -1
  193. package/models/trace/insights/ImageDelivery.d.ts +19 -15
  194. package/models/trace/insights/ImageDelivery.js +26 -20
  195. package/models/trace/insights/ImageDelivery.js.map +1 -1
  196. package/models/trace/insights/InteractionToNextPaint.d.ts +8 -8
  197. package/models/trace/insights/InteractionToNextPaint.js +3 -2
  198. package/models/trace/insights/InteractionToNextPaint.js.map +1 -1
  199. package/models/trace/insights/LCPDiscovery.d.ts +9 -9
  200. package/models/trace/insights/LCPDiscovery.js +6 -3
  201. package/models/trace/insights/LCPDiscovery.js.map +1 -1
  202. package/models/trace/insights/LCPPhases.d.ts +15 -10
  203. package/models/trace/insights/LCPPhases.js +11 -4
  204. package/models/trace/insights/LCPPhases.js.map +1 -1
  205. package/models/trace/insights/Models.d.ts +2 -1
  206. package/models/trace/insights/Models.js +2 -1
  207. package/models/trace/insights/Models.js.map +1 -1
  208. package/models/trace/insights/NetworkDependencyTree.d.ts +33 -0
  209. package/models/trace/insights/NetworkDependencyTree.js +141 -0
  210. package/models/trace/insights/NetworkDependencyTree.js.map +1 -0
  211. package/models/trace/insights/RenderBlocking.d.ts +5 -5
  212. package/models/trace/insights/RenderBlocking.js +2 -1
  213. package/models/trace/insights/RenderBlocking.js.map +1 -1
  214. package/models/trace/insights/SlowCSSSelector.d.ts +8 -8
  215. package/models/trace/insights/SlowCSSSelector.js +4 -2
  216. package/models/trace/insights/SlowCSSSelector.js.map +1 -1
  217. package/models/trace/insights/ThirdParties.d.ts +6 -6
  218. package/models/trace/insights/ThirdParties.js +8 -5
  219. package/models/trace/insights/ThirdParties.js.map +1 -1
  220. package/models/trace/insights/Viewport.d.ts +2 -2
  221. package/models/trace/insights/Viewport.js +2 -1
  222. package/models/trace/insights/Viewport.js.map +1 -1
  223. package/models/trace/insights/insights-tsconfig.json +2 -1
  224. package/models/trace/insights/types.d.ts +25 -3
  225. package/models/trace/insights/types.js.map +1 -1
  226. package/models/trace/lantern/core/NetworkAnalyzer.d.ts +2 -2
  227. package/models/trace/lantern/core/NetworkAnalyzer.js +2 -2
  228. package/models/trace/lantern/core/NetworkAnalyzer.js.map +1 -1
  229. package/models/trace/lantern/graph/BaseNode.d.ts +1 -1
  230. package/models/trace/lantern/graph/BaseNode.js.map +1 -1
  231. package/models/trace/lantern/graph/CPUNode.js +1 -1
  232. package/models/trace/lantern/graph/CPUNode.js.map +1 -1
  233. package/models/trace/lantern/graph/NetworkNode.js +1 -1
  234. package/models/trace/lantern/graph/NetworkNode.js.map +1 -1
  235. package/models/trace/lantern/graph/PageDependencyGraph.d.ts +2 -2
  236. package/models/trace/lantern/graph/PageDependencyGraph.js.map +1 -1
  237. package/models/trace/lantern/metrics/Metric.js.map +1 -1
  238. package/models/trace/lantern/metrics/TotalBlockingTime.d.ts +2 -2
  239. package/models/trace/lantern/metrics/TotalBlockingTime.js.map +1 -1
  240. package/models/trace/lantern/types/Lantern.d.ts +2 -2
  241. package/models/trace/lantern/types/Lantern.js.map +1 -1
  242. package/models/trace/trace-tsconfig.json +3 -3
  243. package/models/trace/trace.d.ts +1 -2
  244. package/models/trace/trace.js +1 -2
  245. package/models/trace/trace.js.map +1 -1
  246. package/models/trace/types/Configuration.d.ts +10 -0
  247. package/models/trace/types/Configuration.js.map +1 -1
  248. package/models/trace/types/Extensions.d.ts +1 -1
  249. package/models/trace/types/Extensions.js.map +1 -1
  250. package/models/trace/types/TraceEvents.d.ts +87 -4
  251. package/models/trace/types/TraceEvents.js +20 -0
  252. package/models/trace/types/TraceEvents.js.map +1 -1
  253. package/package.json +1 -1
  254. package/test/test-trace-engine.mjs +3 -2
  255. package/models/trace/extras/TimelineJSProfile.d.ts +0 -13
  256. package/models/trace/extras/TimelineJSProfile.js +0 -60
  257. package/models/trace/extras/TimelineJSProfile.js.map +0 -1
  258. package/models/trace/insights/LongCriticalNetworkTree.d.ts +0 -22
  259. package/models/trace/insights/LongCriticalNetworkTree.js +0 -40
  260. package/models/trace/insights/LongCriticalNetworkTree.js.map +0 -1
  261. package/models/trace/root-causes/LayoutShift.d.ts +0 -125
  262. package/models/trace/root-causes/LayoutShift.js +0 -519
  263. package/models/trace/root-causes/LayoutShift.js.map +0 -1
  264. package/models/trace/root-causes/RootCauses.d.ts +0 -15
  265. package/models/trace/root-causes/RootCauses.js +0 -12
  266. package/models/trace/root-causes/RootCauses.js.map +0 -1
  267. package/models/trace/root-causes/bundle-tsconfig.json +0 -1
  268. package/models/trace/root-causes/devtools_entrypoint-bundle-typescript-tsconfig.json +0 -43
  269. package/models/trace/root-causes/root-causes-tsconfig.json +0 -56
  270. package/models/trace/root-causes/root-causes.d.ts +0 -1
  271. package/models/trace/root-causes/root-causes.js +0 -5
  272. package/models/trace/root-causes/root-causes.js.map +0 -1
@@ -1,13 +0,0 @@
1
- import type * as Protocol from '../../../generated/protocol.js';
2
- import * as Types from '../types/types.js';
3
- export declare class TimelineJSProfileProcessor {
4
- static isNativeRuntimeFrame(frame: Protocol.Runtime.CallFrame): boolean;
5
- static nativeGroup(nativeName: string): string | null;
6
- static createFakeTraceFromCpuProfile(profile: Protocol.Profiler.Profile, tid: Types.Events.ThreadID): Types.File.TraceFile;
7
- }
8
- export declare namespace TimelineJSProfileProcessor {
9
- const enum NativeGroups {
10
- COMPILE = "Compile",
11
- PARSE = "Parse"
12
- }
13
- }
@@ -1,60 +0,0 @@
1
- // Copyright 2014 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 Types from '../types/types.js';
5
- // TODO(paulirish): Delete this file.
6
- // - Move isNativeRuntimeFrame and nativeGroup to TraceEvents.d.ts (or TraceTree)
7
- // - Move createFakeTraceFromCpuProfile to TimelineLoader
8
- export class TimelineJSProfileProcessor {
9
- static isNativeRuntimeFrame(frame) {
10
- return frame.url === 'native V8Runtime';
11
- }
12
- static nativeGroup(nativeName) {
13
- if (nativeName.startsWith('Parse')) {
14
- return "Parse" /* TimelineJSProfileProcessor.NativeGroups.PARSE */;
15
- }
16
- if (nativeName.startsWith('Compile') || nativeName.startsWith('Recompile')) {
17
- return "Compile" /* TimelineJSProfileProcessor.NativeGroups.COMPILE */;
18
- }
19
- return null;
20
- }
21
- static createFakeTraceFromCpuProfile(profile, tid) {
22
- const events = [];
23
- const threadName = `Thread ${tid}`;
24
- appendEvent('TracingStartedInPage', { data: { sessionId: '1' } }, 0, 0, "M" /* Types.Events.Phase.METADATA */);
25
- appendEvent("thread_name" /* Types.Events.Name.THREAD_NAME */, { name: threadName }, 0, 0, "M" /* Types.Events.Phase.METADATA */, '__metadata');
26
- if (!profile) {
27
- return { traceEvents: events, metadata: {} };
28
- }
29
- // Append a root to show the start time of the profile (which is earlier than first sample), so the Performance
30
- // panel won't truncate this time period.
31
- // 'JSRoot' doesn't exist in the new engine and is not the name of an actual trace event, but changing it might break other trace processing tools that rely on this, so we stick with this name.
32
- // TODO(crbug.com/341234884): consider removing this or clarify why it's required.
33
- appendEvent('JSRoot', {}, profile.startTime, profile.endTime - profile.startTime, "X" /* Types.Events.Phase.COMPLETE */, 'toplevel');
34
- // TODO: create a `Profile` event instead, as `cpuProfile` is legacy
35
- appendEvent('CpuProfile', { data: { cpuProfile: profile } }, profile.endTime, 0, "X" /* Types.Events.Phase.COMPLETE */);
36
- return {
37
- traceEvents: events,
38
- metadata: {
39
- dataOrigin: "CPUProfile" /* Types.File.DataOrigin.CPU_PROFILE */,
40
- }
41
- };
42
- function appendEvent(name, args, ts, dur, ph, cat) {
43
- const event = {
44
- cat: cat || 'disabled-by-default-devtools.timeline',
45
- name,
46
- ph: ph || "X" /* Types.Events.Phase.COMPLETE */,
47
- pid: Types.Events.ProcessID(1),
48
- tid,
49
- ts: Types.Timing.Micro(ts),
50
- args,
51
- };
52
- if (dur) {
53
- event.dur = Types.Timing.Micro(dur);
54
- }
55
- events.push(event);
56
- return event;
57
- }
58
- }
59
- }
60
- //# sourceMappingURL=TimelineJSProfile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimelineJSProfile.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/extras/TimelineJSProfile.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAK7B,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,qCAAqC;AACrC,mFAAmF;AACnF,2DAA2D;AAC3D,MAAM,OAAO,0BAA0B;IACrC,MAAM,CAAC,oBAAoB,CAAC,KAAiC;QAC3D,OAAO,KAAK,CAAC,GAAG,KAAK,kBAAkB,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,UAAkB;QACnC,IAAI,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YACnC,mEAAqD;QACvD,CAAC;QACD,IAAI,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAC3E,uEAAuD;QACzD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,6BAA6B,CAAC,OAAkC,EAAE,GAA0B;QAEjG,MAAM,MAAM,GAAyB,EAAE,CAAC;QAExC,MAAM,UAAU,GAAG,UAAU,GAAG,EAAE,CAAC;QACnC,WAAW,CAAC,sBAAsB,EAAE,EAAC,IAAI,EAAE,EAAC,SAAS,EAAE,GAAG,EAAC,EAAC,EAAE,CAAC,EAAE,CAAC,wCAA8B,CAAC;QACjG,WAAW,oDAAgC,EAAC,IAAI,EAAE,UAAU,EAAC,EAAE,CAAC,EAAE,CAAC,yCAA+B,YAAY,CAAC,CAAC;QAChH,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,EAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAC,CAAC;QAC7C,CAAC;QAED,+GAA+G;QAC/G,yCAAyC;QACzC,iMAAiM;QACjM,kFAAkF;QAClF,WAAW,CACP,QAAQ,EAAE,EAAE,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,SAAS,yCAA+B,UAAU,CAAC,CAAC;QAEnH,oEAAoE;QACpE,WAAW,CAAC,YAAY,EAAE,EAAC,IAAI,EAAE,EAAC,UAAU,EAAE,OAAO,EAAC,EAAC,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,wCAA8B,CAAC;QAC1G,OAAO;YACL,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE;gBACR,UAAU,sDAAmC;aAC9C;SACF,CAAC;QAEF,SAAS,WAAW,CAChB,IAAY,EAAE,IAAS,EAAE,EAAU,EAAE,GAAY,EAAE,EAAuB,EAAE,GAAY;YAC1F,MAAM,KAAK,GAAuB;gBAChC,GAAG,EAAE,GAAG,IAAI,uCAAuC;gBACnD,IAAI;gBACJ,EAAE,EAAE,EAAE,yCAA+B;gBACrC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;gBAC9B,GAAG;gBACH,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1B,IAAI;aACL,CAAC;YAEF,IAAI,GAAG,EAAE,CAAC;gBACR,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACtC,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright 2014 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\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type * as Protocol from '../../../generated/protocol.js';\nimport * as Types from '../types/types.js';\n\n// TODO(paulirish): Delete this file.\n// - Move isNativeRuntimeFrame and nativeGroup to TraceEvents.d.ts (or TraceTree)\n// - Move createFakeTraceFromCpuProfile to TimelineLoader\nexport class TimelineJSProfileProcessor {\n static isNativeRuntimeFrame(frame: Protocol.Runtime.CallFrame): boolean {\n return frame.url === 'native V8Runtime';\n }\n\n static nativeGroup(nativeName: string): string|null {\n if (nativeName.startsWith('Parse')) {\n return TimelineJSProfileProcessor.NativeGroups.PARSE;\n }\n if (nativeName.startsWith('Compile') || nativeName.startsWith('Recompile')) {\n return TimelineJSProfileProcessor.NativeGroups.COMPILE;\n }\n return null;\n }\n\n static createFakeTraceFromCpuProfile(profile: Protocol.Profiler.Profile, tid: Types.Events.ThreadID):\n Types.File.TraceFile {\n const events: Types.Events.Event[] = [];\n\n const threadName = `Thread ${tid}`;\n appendEvent('TracingStartedInPage', {data: {sessionId: '1'}}, 0, 0, Types.Events.Phase.METADATA);\n appendEvent(Types.Events.Name.THREAD_NAME, {name: threadName}, 0, 0, Types.Events.Phase.METADATA, '__metadata');\n if (!profile) {\n return {traceEvents: events, metadata: {}};\n }\n\n // Append a root to show the start time of the profile (which is earlier than first sample), so the Performance\n // panel won't truncate this time period.\n // 'JSRoot' doesn't exist in the new engine and is not the name of an actual trace event, but changing it might break other trace processing tools that rely on this, so we stick with this name.\n // TODO(crbug.com/341234884): consider removing this or clarify why it's required.\n appendEvent(\n 'JSRoot', {}, profile.startTime, profile.endTime - profile.startTime, Types.Events.Phase.COMPLETE, 'toplevel');\n\n // TODO: create a `Profile` event instead, as `cpuProfile` is legacy\n appendEvent('CpuProfile', {data: {cpuProfile: profile}}, profile.endTime, 0, Types.Events.Phase.COMPLETE);\n return {\n traceEvents: events,\n metadata: {\n dataOrigin: Types.File.DataOrigin.CPU_PROFILE,\n }\n };\n\n function appendEvent(\n name: string, args: any, ts: number, dur?: number, ph?: Types.Events.Phase, cat?: string): Types.Events.Event {\n const event: Types.Events.Event = {\n cat: cat || 'disabled-by-default-devtools.timeline',\n name,\n ph: ph || Types.Events.Phase.COMPLETE,\n pid: Types.Events.ProcessID(1),\n tid,\n ts: Types.Timing.Micro(ts),\n args,\n };\n\n if (dur) {\n event.dur = Types.Timing.Micro(dur);\n }\n events.push(event);\n return event;\n }\n }\n}\n\nexport namespace TimelineJSProfileProcessor {\n export const enum NativeGroups {\n COMPILE = 'Compile',\n PARSE = 'Parse',\n }\n}\n"]}
@@ -1,22 +0,0 @@
1
- import type * as Types from '../types/types.js';
2
- import { type InsightModel, type InsightSetContext, type RequiredData } from './types.js';
3
- export declare const UIStrings: {
4
- /**
5
- * @description Title of an insight that recommends avoiding chaining critical requests.
6
- */
7
- title: string;
8
- /**
9
- * @description Description of an insight that recommends avoiding chaining critical requests.
10
- */
11
- description: string;
12
- /**
13
- * @description Text status indicating that there isn't long chaining critical network requests.
14
- */
15
- noLongCriticalNetworkTree: string;
16
- };
17
- export declare const i18nString: (id: string, values?: Record<string, string> | undefined) => Record<string, string>;
18
- export type LongCriticalNetworkTreeInsightModel = InsightModel<typeof UIStrings, {
19
- longChains: Types.Events.SyntheticNetworkRequest[][];
20
- }>;
21
- export declare function deps(): ['NetworkRequests'];
22
- export declare function generateInsight(_parsedTrace: RequiredData<typeof deps>, _context: InsightSetContext): LongCriticalNetworkTreeInsightModel;
@@ -1,40 +0,0 @@
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
- // import * as i18n from '../../../core/i18n/i18n.js';
5
- import { InsightCategory } from './types.js';
6
- export const UIStrings = {
7
- /**
8
- * @description Title of an insight that recommends avoiding chaining critical requests.
9
- */
10
- title: 'Long critical network tree',
11
- /**
12
- * @description Description of an insight that recommends avoiding chaining critical requests.
13
- */
14
- description: '[Avoid chaining critical requests](https://developer.chrome.com/docs/lighthouse/performance/critical-request-chains) by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.',
15
- /**
16
- * @description Text status indicating that there isn't long chaining critical network requests.
17
- */
18
- noLongCriticalNetworkTree: 'No rendering tasks impacted by long critical network tree',
19
- };
20
- // const str_ = i18n.i18n.registerUIStrings('models/trace/insights/LongCriticalNetworkTree.ts', UIStrings);
21
- export const i18nString = (i18nId, values) => ({i18nId, values}); // i18n.i18n.getLocalizedString.bind(undefined, str_);
22
- export function deps() {
23
- return ['NetworkRequests'];
24
- }
25
- function finalize(partialModel) {
26
- return {
27
- strings: UIStrings,
28
- title: i18nString(UIStrings.title),
29
- description: i18nString(UIStrings.description),
30
- category: InsightCategory.LCP,
31
- shouldShow: partialModel.longChains.length > 0,
32
- ...partialModel,
33
- };
34
- }
35
- export function generateInsight(_parsedTrace, _context) {
36
- return finalize({
37
- longChains: [],
38
- });
39
- }
40
- //# sourceMappingURL=LongCriticalNetworkTree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LongCriticalNetworkTree.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/insights/LongCriticalNetworkTree.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AAGnD,OAAO,EACL,eAAe,EAKhB,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;;OAEG;IACH,KAAK,EAAE,4BAA4B;IACnC;;OAEG;IACH,WAAW,EACP,0QAA0Q;IAC9Q;;OAEG;IACH,yBAAyB,EAAE,2DAA2D;CACvF,CAAC;AAEF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,kDAAkD,EAAE,SAAS,CAAC,CAAC;AACxG,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAM7E,MAAM,UAAU,IAAI;IAClB,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,QAAQ,CAAC,YAAsE;IAEtF,OAAO;QACL,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC;QAClC,WAAW,EAAE,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC;QAC9C,QAAQ,EAAE,eAAe,CAAC,GAAG;QAC7B,UAAU,EAAE,YAAY,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;QAC9C,GAAG,YAAY;KAChB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAC3B,YAAuC,EAAE,QAA2B;IACtE,OAAO,QAAQ,CAAC;QACd,UAAU,EAAE,EAAE;KACf,CAAC,CAAC;AACL,CAAC","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 * as i18n from '../../../core/i18n/i18n.js';\nimport type * as Types from '../types/types.js';\n\nimport {\n InsightCategory,\n type InsightModel,\n type InsightSetContext,\n type PartialInsightModel,\n type RequiredData\n} from './types.js';\n\nexport const UIStrings = {\n /**\n * @description Title of an insight that recommends avoiding chaining critical requests.\n */\n title: 'Long critical network tree',\n /**\n * @description Description of an insight that recommends avoiding chaining critical requests.\n */\n description:\n '[Avoid chaining critical requests](https://developer.chrome.com/docs/lighthouse/performance/critical-request-chains) by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.',\n /**\n * @description Text status indicating that there isn't long chaining critical network requests.\n */\n noLongCriticalNetworkTree: 'No rendering tasks impacted by long critical network tree',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('models/trace/insights/LongCriticalNetworkTree.ts', UIStrings);\nexport const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport type LongCriticalNetworkTreeInsightModel = InsightModel<typeof UIStrings, {\n longChains: Types.Events.SyntheticNetworkRequest[][],\n}>;\n\nexport function deps(): ['NetworkRequests'] {\n return ['NetworkRequests'];\n}\n\nfunction finalize(partialModel: PartialInsightModel<LongCriticalNetworkTreeInsightModel>):\n LongCriticalNetworkTreeInsightModel {\n return {\n strings: UIStrings,\n title: i18nString(UIStrings.title),\n description: i18nString(UIStrings.description),\n category: InsightCategory.LCP,\n shouldShow: partialModel.longChains.length > 0,\n ...partialModel,\n };\n}\n\nexport function generateInsight(\n _parsedTrace: RequiredData<typeof deps>, _context: InsightSetContext): LongCriticalNetworkTreeInsightModel {\n return finalize({\n longChains: [],\n });\n}\n"]}
@@ -1,125 +0,0 @@
1
- import type * as Protocol from '../../../generated/protocol.js';
2
- import type { ParsedTrace } from '../handlers/types.js';
3
- import * as Types from '../types/types.js';
4
- import type { RootCauseProtocolInterface } from './RootCauses.js';
5
- export interface CSSDimensions {
6
- width?: string;
7
- height?: string;
8
- aspectRatio?: string;
9
- }
10
- export interface UnsizedMedia {
11
- node: Protocol.DOM.Node;
12
- authoredDimensions?: CSSDimensions;
13
- computedDimensions: CSSDimensions;
14
- }
15
- export interface InjectedIframe {
16
- iframe: Protocol.DOM.Node;
17
- }
18
- export interface RootCauseRequest {
19
- request: Types.Events.SyntheticNetworkRequest;
20
- initiator?: Protocol.Network.Initiator;
21
- }
22
- export interface FontChange extends RootCauseRequest {
23
- fontFace: Protocol.CSS.FontFace;
24
- }
25
- export interface RenderBlockingRequest extends RootCauseRequest {
26
- }
27
- export interface LayoutShiftRootCausesData {
28
- unsizedMedia: UnsizedMedia[];
29
- iframes: InjectedIframe[];
30
- fontChanges: FontChange[];
31
- renderBlockingRequests: RenderBlockingRequest[];
32
- scriptStackTrace: Types.Events.CallFrame[];
33
- }
34
- interface Options {
35
- /** Checking iframe root causes can be an expensive operation, so it is disabled by default. */
36
- enableIframeRootCauses?: boolean;
37
- }
38
- export declare class LayoutShiftRootCauses {
39
- #private;
40
- constructor(protocolInterface: RootCauseProtocolInterface, options?: Options);
41
- /**
42
- * Calculates the potential root causes for a given layout shift event. Once
43
- * calculated, this data is cached.
44
- * Note: because you need all layout shift data at once to calculate these
45
- * correctly, this function will parse the root causes for _all_ layout shift
46
- * events the first time that it's called. That then populates the cache for
47
- * each shift, so any subsequent calls are just a constant lookup.
48
- */
49
- rootCausesForEvent(modelData: ParsedTrace, event: Types.Events.SyntheticLayoutShift): Promise<Readonly<LayoutShiftRootCausesData> | null>;
50
- /**
51
- * Determines potential root causes for shifts
52
- */
53
- blameShifts(layoutShifts: Types.Events.SyntheticLayoutShift[], modelData: ParsedTrace): Promise<void>;
54
- /**
55
- * "LayoutInvalidations" are a set of trace events dispatched in Blink under the name
56
- * "layoutInvalidationTracking", which track invalidations on the "Layout"stage of the
57
- * rendering pipeline. This function utilizes this event to flag potential root causes
58
- * to layout shifts.
59
- */
60
- linkShiftsToLayoutInvalidations(layoutShifts: Types.Events.SyntheticLayoutShift[], modelData: ParsedTrace): Promise<void>;
61
- /**
62
- * For every shift looks up the initiator of its corresponding Layout event. This initiator
63
- * is assigned by the RendererHandler and contains the stack trace of the point in a script
64
- * that caused a style recalculation or a relayout. This stack trace is added to the shift's
65
- * potential root causes.
66
- * Note that a Layout cannot always be linked to a script, in that case, we cannot add a
67
- * "script causing reflow" as a potential root cause to the corresponding shift.
68
- */
69
- linkShiftsToLayoutEvents(layoutShifts: Types.Events.SyntheticLayoutShift[], modelData: ParsedTrace): void;
70
- /**
71
- * Given a LayoutInvalidation trace event, determines if it was dispatched
72
- * because a media element without dimensions was resized.
73
- */
74
- getUnsizedMediaRootCause(layoutInvalidation: Types.Events.LayoutInvalidationTracking, layoutInvalidationNodeId: Protocol.DOM.NodeId): Promise<UnsizedMedia | null>;
75
- /**
76
- * Given a LayoutInvalidation trace event, determines if it was dispatched
77
- * because a node, which is an ancestor to an iframe, was injected.
78
- */
79
- getIframeRootCause(layoutInvalidation: Types.Events.LayoutInvalidationTracking, layoutInvalidationNodeId: Protocol.DOM.NodeId): Promise<InjectedIframe | null>;
80
- getNodeDetails(nodeId: Protocol.DOM.NodeId): Promise<Protocol.DOM.Node | null>;
81
- /**
82
- * Given a layout invalidation event and a sorted array, returns the subset of requests that arrived within a
83
- * 500ms window before the layout invalidation.
84
- */
85
- requestsInInvalidationWindow(layoutInvalidation: Types.Events.LayoutInvalidationTracking | Types.Events.ScheduleStyleInvalidationTracking, modelData: ParsedTrace): RootCauseRequest[];
86
- /**
87
- * Given a LayoutInvalidation trace event, determines if it was dispatched
88
- * because fonts were changed and if so returns the information of all network
89
- * request with which the fonts were possibly fetched, if any. The computed
90
- * network requests are cached for the corresponding prepaint event, meaning
91
- * that other LayoutInvalidation events that correspond to the same prepaint
92
- * are not processed and the cached network requests for the prepaint is
93
- * returned instead.
94
- */
95
- getFontChangeRootCause(layoutInvalidation: Types.Events.LayoutInvalidationTracking | Types.Events.ScheduleStyleInvalidationTracking, nextPrePaint: Types.Events.PrePaint, modelData: ParsedTrace): FontChange[] | null;
96
- /**
97
- * Given the requests that arrived within a 500ms window before the layout invalidation, returns the font
98
- * requests of them.
99
- */
100
- getFontRequestsInInvalidationWindow(requestsInInvalidationWindow: RootCauseRequest[]): FontChange[];
101
- /**
102
- * Given a LayoutInvalidation trace event, determines if it arrived within a 500ms window before the layout
103
- * invalidation and if so returns the information of all network request, if any. The computed network
104
- * requests are cached for the corresponding prepaint event, meaning that other LayoutInvalidation events
105
- * that correspond to the same prepaint are not processed and the cached network requests for the prepaint is
106
- * returned instead.
107
- */
108
- getRenderBlockRootCause(layoutInvalidation: Types.Events.LayoutInvalidationTracking | Types.Events.ScheduleStyleInvalidationTracking, nextPrePaint: Types.Events.PrePaint, modelData: ParsedTrace): RenderBlockingRequest[] | null;
109
- /**
110
- * Returns a function that retrieves the active value of a given
111
- * CSS property within the matched styles of the param node.
112
- * The first occurrence within the matched styles is returned and the
113
- * value is looked up in the following order, which follows CSS
114
- * specificity:
115
- * 1. Inline styles.
116
- * 2. CSS rules matching this node, from all applicable stylesheets.
117
- * 3. Attribute defined styles.
118
- */
119
- nodeMatchedStylesPropertyGetter(node: Protocol.DOM.Node): Promise<((property: string) => string | null)>;
120
- /**
121
- * Returns the CSS dimensions set to the node from its matched styles.
122
- */
123
- getNodeAuthoredDimensions(node: Protocol.DOM.Node): Promise<CSSDimensions>;
124
- }
125
- export {};