@atlaskit/react-ufo 3.6.6 → 3.6.7

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 (430) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/additional-payload/utils/cache-hit-ratio/index.js +5 -6
  3. package/dist/cjs/additional-payload/utils/lighthouse-metrics/cls/index.js +3 -4
  4. package/dist/cjs/additional-payload/utils/lighthouse-metrics/index.js +6 -6
  5. package/dist/cjs/additional-payload/utils/lighthouse-metrics/tbt/index.js +3 -4
  6. package/dist/cjs/additional-payload/utils/lighthouse-metrics/utils/buffer/index.js +0 -3
  7. package/dist/cjs/additional-payload/utils/lighthouse-metrics/utils/observer/index.js +10 -10
  8. package/dist/cjs/assets/index.js +14 -17
  9. package/dist/cjs/assets/utils.js +13 -10
  10. package/dist/cjs/bundle-eval-timing/index.js +8 -8
  11. package/dist/cjs/coinflip/index.js +2 -3
  12. package/dist/cjs/config/index.js +42 -30
  13. package/dist/cjs/create-experimental-interaction-metrics-payload/index.js +41 -29
  14. package/dist/cjs/create-payload/common/utils/index.js +20 -16
  15. package/dist/cjs/create-payload/index.js +120 -128
  16. package/dist/cjs/create-payload/utils/get-interaction-status.js +2 -3
  17. package/dist/cjs/create-payload/utils/get-page-visibility-up-to-ttai.js +2 -3
  18. package/dist/cjs/create-payload/utils/get-react-ufo-payload-version.js +3 -4
  19. package/dist/cjs/create-payload/utils/get-ssr-done-time-value.js +2 -3
  20. package/dist/cjs/create-payload/utils/get-vc-metrics.js +7 -8
  21. package/dist/cjs/create-post-interaction-log-payload/index.js +12 -13
  22. package/dist/cjs/custom-data/index.js +14 -6
  23. package/dist/cjs/custom-mark/index.js +3 -4
  24. package/dist/cjs/custom-spans/index.js +3 -4
  25. package/dist/cjs/custom-timings/index.js +6 -6
  26. package/dist/cjs/experience-trace-id-context/index.js +21 -16
  27. package/dist/cjs/experience-trace-id-context/utils/make-trace-http-request-headers/index.js +3 -4
  28. package/dist/cjs/feature-flags-accessed/common/utils/index.js +12 -12
  29. package/dist/cjs/feature-flags-accessed/index.js +4 -4
  30. package/dist/cjs/generate-id/index.js +2 -3
  31. package/dist/cjs/global-error-handler/index.js +16 -15
  32. package/dist/cjs/initial-page-load-extra-timing/index.js +6 -6
  33. package/dist/cjs/interaction-metrics/index.js +146 -110
  34. package/dist/cjs/interaction-metrics/post-interaction-log.js +0 -10
  35. package/dist/cjs/interaction-metrics-init/index.js +15 -16
  36. package/dist/cjs/interaction-metrics-init/schedule-idle-callback.js +2 -3
  37. package/dist/cjs/resource-timing/common/utils/config.js +10 -10
  38. package/dist/cjs/resource-timing/common/utils/resource-timing-buffer.js +14 -14
  39. package/dist/cjs/resource-timing/main.js +19 -20
  40. package/dist/cjs/resource-timing/utils.js +3 -4
  41. package/dist/cjs/round-number/index.js +3 -4
  42. package/dist/cjs/route-name/index.js +2 -3
  43. package/dist/cjs/segment/schedule-on-paint.js +2 -4
  44. package/dist/cjs/segment/segment.js +4 -5
  45. package/dist/cjs/set-interaction-error/index.js +3 -4
  46. package/dist/cjs/short-id/index.js +2 -3
  47. package/dist/cjs/ssr/index.js +21 -18
  48. package/dist/cjs/trace-interaction/index.js +4 -5
  49. package/dist/cjs/trace-pageload/index.js +6 -6
  50. package/dist/cjs/trace-press/index.js +2 -3
  51. package/dist/cjs/trace-redirect/index.js +2 -3
  52. package/dist/cjs/trace-transition/index.js +2 -3
  53. package/dist/cjs/trace-transition/utils/generate-span-id/index.js +3 -4
  54. package/dist/cjs/trace-transition/utils/set-interaction-active-trace/index.js +3 -4
  55. package/dist/cjs/vc/index.js +6 -17
  56. package/dist/cjs/vc/vc-observer/attachAbortListeners.js +3 -4
  57. package/dist/cjs/vc/vc-observer/getVCRevisionsData.js +22 -13
  58. package/dist/cjs/vc/vc-observer/getViewport.js +6 -6
  59. package/dist/cjs/vc/vc-observer/heatmap/heatmap.js +10 -20
  60. package/dist/cjs/vc/vc-observer/index.js +119 -145
  61. package/dist/cjs/vc/vc-observer/media-wrapper/vc-utils.js +3 -4
  62. package/dist/cjs/vc/vc-observer/observers/editor-lnv/index.js +0 -17
  63. package/dist/cjs/vc/vc-observer/observers/index.js +2 -29
  64. package/dist/cjs/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.js +2 -3
  65. package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/index.js +0 -16
  66. package/dist/cjs/vc/vc-observer/revisions/fy25_01.js +0 -2
  67. package/dist/cjs/vc/vc-observer/revisions/fy25_02.js +0 -2
  68. package/dist/cjs/vc/vc-observer/revisions/revisions.js +3 -4
  69. package/dist/cjs/vc/vc-observer-new/entries-timeline/index.js +0 -9
  70. package/dist/cjs/vc/vc-observer-new/get-element-name.js +2 -3
  71. package/dist/cjs/vc/vc-observer-new/get-unique-element-name.js +10 -11
  72. package/dist/cjs/vc/vc-observer-new/index.js +0 -9
  73. package/dist/cjs/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +0 -2
  74. package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -6
  75. package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/canvas-pixel.js +12 -20
  76. package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.js +26 -26
  77. package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/heatmap.js +6 -18
  78. package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/index.js +13 -25
  79. package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/index.js +7 -8
  80. package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/calc-union-area.js +39 -48
  81. package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/index.js +7 -8
  82. package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +2 -3
  83. package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +2 -3
  84. package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/is-viewport-entry-data.js +2 -3
  85. package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/task-yield.js +7 -8
  86. package/dist/cjs/vc/vc-observer-new/viewport-observer/index.js +7 -15
  87. package/dist/cjs/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +7 -8
  88. package/dist/cjs/vc/vc-observer-new/viewport-observer/mutation-observer/index.js +14 -15
  89. package/dist/cjs/vc/vc-observer-new/viewport-observer/performance-observer/index.js +9 -9
  90. package/dist/cjs/vc/vc-observer-new/window-event-observer/index.js +1 -7
  91. package/dist/es2019/additional-payload/utils/cache-hit-ratio/index.js +4 -5
  92. package/dist/es2019/additional-payload/utils/lighthouse-metrics/cls/index.js +2 -3
  93. package/dist/es2019/additional-payload/utils/lighthouse-metrics/index.js +4 -5
  94. package/dist/es2019/additional-payload/utils/lighthouse-metrics/tbt/index.js +2 -3
  95. package/dist/es2019/additional-payload/utils/lighthouse-metrics/utils/buffer/index.js +0 -3
  96. package/dist/es2019/additional-payload/utils/lighthouse-metrics/utils/observer/index.js +8 -9
  97. package/dist/es2019/assets/index.js +14 -19
  98. package/dist/es2019/assets/utils.js +8 -10
  99. package/dist/es2019/bundle-eval-timing/index.js +6 -7
  100. package/dist/es2019/coinflip/index.js +2 -4
  101. package/dist/es2019/config/index.js +28 -29
  102. package/dist/es2019/create-experimental-interaction-metrics-payload/index.js +15 -18
  103. package/dist/es2019/create-payload/common/utils/index.js +14 -15
  104. package/dist/es2019/create-payload/index.js +75 -84
  105. package/dist/es2019/create-payload/utils/get-interaction-status.js +2 -4
  106. package/dist/es2019/create-payload/utils/get-page-visibility-up-to-ttai.js +2 -3
  107. package/dist/es2019/create-payload/utils/get-react-ufo-payload-version.js +2 -3
  108. package/dist/es2019/create-payload/utils/get-ssr-done-time-value.js +2 -3
  109. package/dist/es2019/create-payload/utils/get-vc-metrics.js +2 -3
  110. package/dist/es2019/create-post-interaction-log-payload/index.js +12 -13
  111. package/dist/es2019/custom-data/index.js +13 -5
  112. package/dist/es2019/custom-mark/index.js +2 -3
  113. package/dist/es2019/custom-spans/index.js +2 -3
  114. package/dist/es2019/custom-timings/index.js +4 -5
  115. package/dist/es2019/experience-trace-id-context/index.js +14 -15
  116. package/dist/es2019/experience-trace-id-context/utils/make-trace-http-request-headers/index.js +2 -3
  117. package/dist/es2019/feature-flags-accessed/common/utils/index.js +10 -11
  118. package/dist/es2019/feature-flags-accessed/index.js +2 -3
  119. package/dist/es2019/generate-id/index.js +2 -3
  120. package/dist/es2019/global-error-handler/index.js +13 -14
  121. package/dist/es2019/initial-page-load-extra-timing/index.js +4 -5
  122. package/dist/es2019/interaction-metrics/index.js +108 -109
  123. package/dist/es2019/interaction-metrics/post-interaction-log.js +0 -10
  124. package/dist/es2019/interaction-metrics-init/index.js +14 -15
  125. package/dist/es2019/interaction-metrics-init/schedule-idle-callback.js +2 -3
  126. package/dist/es2019/resource-timing/common/utils/config.js +8 -9
  127. package/dist/es2019/resource-timing/common/utils/resource-timing-buffer.js +12 -13
  128. package/dist/es2019/resource-timing/main.js +18 -19
  129. package/dist/es2019/resource-timing/utils.js +2 -3
  130. package/dist/es2019/round-number/index.js +2 -3
  131. package/dist/es2019/route-name/index.js +2 -3
  132. package/dist/es2019/segment/schedule-on-paint.js +2 -4
  133. package/dist/es2019/segment/segment.js +4 -5
  134. package/dist/es2019/set-interaction-error/index.js +2 -3
  135. package/dist/es2019/short-id/index.js +2 -3
  136. package/dist/es2019/ssr/index.js +16 -17
  137. package/dist/es2019/trace-interaction/index.js +4 -5
  138. package/dist/es2019/trace-pageload/index.js +4 -5
  139. package/dist/es2019/trace-press/index.js +2 -3
  140. package/dist/es2019/trace-redirect/index.js +2 -3
  141. package/dist/es2019/trace-transition/index.js +2 -3
  142. package/dist/es2019/trace-transition/utils/generate-span-id/index.js +2 -3
  143. package/dist/es2019/trace-transition/utils/set-interaction-active-trace/index.js +2 -3
  144. package/dist/es2019/vc/index.js +4 -16
  145. package/dist/es2019/vc/vc-observer/attachAbortListeners.js +2 -3
  146. package/dist/es2019/vc/vc-observer/getVCRevisionsData.js +4 -5
  147. package/dist/es2019/vc/vc-observer/getViewport.js +4 -5
  148. package/dist/es2019/vc/vc-observer/heatmap/heatmap.js +8 -20
  149. package/dist/es2019/vc/vc-observer/index.js +104 -134
  150. package/dist/es2019/vc/vc-observer/media-wrapper/vc-utils.js +2 -3
  151. package/dist/es2019/vc/vc-observer/observers/editor-lnv/index.js +0 -17
  152. package/dist/es2019/vc/vc-observer/observers/index.js +2 -29
  153. package/dist/es2019/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.js +2 -4
  154. package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/index.js +0 -16
  155. package/dist/es2019/vc/vc-observer/revisions/fy25_01.js +0 -2
  156. package/dist/es2019/vc/vc-observer/revisions/fy25_02.js +0 -2
  157. package/dist/es2019/vc/vc-observer/revisions/revisions.js +2 -3
  158. package/dist/es2019/vc/vc-observer-new/entries-timeline/index.js +0 -9
  159. package/dist/es2019/vc/vc-observer-new/get-element-name.js +2 -3
  160. package/dist/es2019/vc/vc-observer-new/get-unique-element-name.js +10 -11
  161. package/dist/es2019/vc/vc-observer-new/index.js +0 -9
  162. package/dist/es2019/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +0 -2
  163. package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +0 -3
  164. package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/canvas-pixel.js +4 -14
  165. package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.js +4 -5
  166. package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/heatmap.js +6 -18
  167. package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/index.js +8 -20
  168. package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/index.js +2 -3
  169. package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/calc-union-area.js +8 -9
  170. package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/index.js +2 -3
  171. package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +2 -3
  172. package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +2 -3
  173. package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/is-viewport-entry-data.js +2 -3
  174. package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/task-yield.js +2 -4
  175. package/dist/es2019/vc/vc-observer-new/viewport-observer/index.js +7 -15
  176. package/dist/es2019/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +8 -8
  177. package/dist/es2019/vc/vc-observer-new/viewport-observer/mutation-observer/index.js +15 -15
  178. package/dist/es2019/vc/vc-observer-new/viewport-observer/performance-observer/index.js +8 -9
  179. package/dist/es2019/vc/vc-observer-new/window-event-observer/index.js +1 -7
  180. package/dist/esm/additional-payload/utils/cache-hit-ratio/index.js +4 -5
  181. package/dist/esm/additional-payload/utils/lighthouse-metrics/cls/index.js +2 -3
  182. package/dist/esm/additional-payload/utils/lighthouse-metrics/index.js +4 -5
  183. package/dist/esm/additional-payload/utils/lighthouse-metrics/tbt/index.js +2 -3
  184. package/dist/esm/additional-payload/utils/lighthouse-metrics/utils/buffer/index.js +0 -3
  185. package/dist/esm/additional-payload/utils/lighthouse-metrics/utils/observer/index.js +8 -9
  186. package/dist/esm/assets/index.js +14 -17
  187. package/dist/esm/assets/utils.js +8 -10
  188. package/dist/esm/bundle-eval-timing/index.js +6 -7
  189. package/dist/esm/coinflip/index.js +2 -4
  190. package/dist/esm/config/index.js +28 -29
  191. package/dist/esm/create-experimental-interaction-metrics-payload/index.js +36 -28
  192. package/dist/esm/create-payload/common/utils/index.js +14 -15
  193. package/dist/esm/create-payload/index.js +119 -127
  194. package/dist/esm/create-payload/utils/get-interaction-status.js +2 -4
  195. package/dist/esm/create-payload/utils/get-page-visibility-up-to-ttai.js +2 -3
  196. package/dist/esm/create-payload/utils/get-react-ufo-payload-version.js +2 -3
  197. package/dist/esm/create-payload/utils/get-ssr-done-time-value.js +2 -3
  198. package/dist/esm/create-payload/utils/get-vc-metrics.js +7 -8
  199. package/dist/esm/create-post-interaction-log-payload/index.js +12 -13
  200. package/dist/esm/custom-data/index.js +13 -5
  201. package/dist/esm/custom-mark/index.js +2 -3
  202. package/dist/esm/custom-spans/index.js +2 -3
  203. package/dist/esm/custom-timings/index.js +4 -5
  204. package/dist/esm/experience-trace-id-context/index.js +14 -15
  205. package/dist/esm/experience-trace-id-context/utils/make-trace-http-request-headers/index.js +2 -3
  206. package/dist/esm/feature-flags-accessed/common/utils/index.js +10 -11
  207. package/dist/esm/feature-flags-accessed/index.js +2 -3
  208. package/dist/esm/generate-id/index.js +2 -3
  209. package/dist/esm/global-error-handler/index.js +13 -14
  210. package/dist/esm/initial-page-load-extra-timing/index.js +4 -5
  211. package/dist/esm/interaction-metrics/index.js +108 -109
  212. package/dist/esm/interaction-metrics/post-interaction-log.js +0 -10
  213. package/dist/esm/interaction-metrics-init/index.js +14 -15
  214. package/dist/esm/interaction-metrics-init/schedule-idle-callback.js +2 -3
  215. package/dist/esm/resource-timing/common/utils/config.js +8 -9
  216. package/dist/esm/resource-timing/common/utils/resource-timing-buffer.js +12 -13
  217. package/dist/esm/resource-timing/main.js +18 -19
  218. package/dist/esm/resource-timing/utils.js +2 -3
  219. package/dist/esm/round-number/index.js +2 -3
  220. package/dist/esm/route-name/index.js +2 -3
  221. package/dist/esm/segment/schedule-on-paint.js +2 -4
  222. package/dist/esm/segment/segment.js +4 -5
  223. package/dist/esm/set-interaction-error/index.js +2 -3
  224. package/dist/esm/short-id/index.js +2 -3
  225. package/dist/esm/ssr/index.js +16 -17
  226. package/dist/esm/trace-interaction/index.js +4 -5
  227. package/dist/esm/trace-pageload/index.js +4 -5
  228. package/dist/esm/trace-press/index.js +2 -3
  229. package/dist/esm/trace-redirect/index.js +2 -3
  230. package/dist/esm/trace-transition/index.js +2 -3
  231. package/dist/esm/trace-transition/utils/generate-span-id/index.js +2 -3
  232. package/dist/esm/trace-transition/utils/set-interaction-active-trace/index.js +2 -3
  233. package/dist/esm/vc/index.js +4 -16
  234. package/dist/esm/vc/vc-observer/attachAbortListeners.js +2 -3
  235. package/dist/esm/vc/vc-observer/getVCRevisionsData.js +21 -12
  236. package/dist/esm/vc/vc-observer/getViewport.js +4 -5
  237. package/dist/esm/vc/vc-observer/heatmap/heatmap.js +10 -20
  238. package/dist/esm/vc/vc-observer/index.js +119 -145
  239. package/dist/esm/vc/vc-observer/media-wrapper/vc-utils.js +2 -3
  240. package/dist/esm/vc/vc-observer/observers/editor-lnv/index.js +0 -17
  241. package/dist/esm/vc/vc-observer/observers/index.js +2 -29
  242. package/dist/esm/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.js +2 -4
  243. package/dist/esm/vc/vc-observer/observers/ssr-placeholders/index.js +0 -16
  244. package/dist/esm/vc/vc-observer/revisions/fy25_01.js +0 -2
  245. package/dist/esm/vc/vc-observer/revisions/fy25_02.js +0 -2
  246. package/dist/esm/vc/vc-observer/revisions/revisions.js +2 -3
  247. package/dist/esm/vc/vc-observer-new/entries-timeline/index.js +0 -9
  248. package/dist/esm/vc/vc-observer-new/get-element-name.js +2 -3
  249. package/dist/esm/vc/vc-observer-new/get-unique-element-name.js +10 -11
  250. package/dist/esm/vc/vc-observer-new/index.js +0 -9
  251. package/dist/esm/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +0 -2
  252. package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -6
  253. package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/canvas-pixel.js +9 -19
  254. package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.js +24 -25
  255. package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/heatmap.js +6 -18
  256. package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/index.js +13 -25
  257. package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/index.js +7 -8
  258. package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/calc-union-area.js +39 -48
  259. package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/index.js +7 -8
  260. package/dist/esm/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +2 -3
  261. package/dist/esm/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +2 -3
  262. package/dist/esm/vc/vc-observer-new/metric-calculator/utils/is-viewport-entry-data.js +2 -3
  263. package/dist/esm/vc/vc-observer-new/metric-calculator/utils/task-yield.js +7 -9
  264. package/dist/esm/vc/vc-observer-new/viewport-observer/index.js +7 -15
  265. package/dist/esm/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +7 -8
  266. package/dist/esm/vc/vc-observer-new/viewport-observer/mutation-observer/index.js +14 -15
  267. package/dist/esm/vc/vc-observer-new/viewport-observer/performance-observer/index.js +7 -9
  268. package/dist/esm/vc/vc-observer-new/window-event-observer/index.js +1 -7
  269. package/dist/types/additional-payload/utils/cache-hit-ratio/index.d.ts +2 -2
  270. package/dist/types/additional-payload/utils/lighthouse-metrics/cls/index.d.ts +1 -1
  271. package/dist/types/additional-payload/utils/lighthouse-metrics/index.d.ts +3 -3
  272. package/dist/types/additional-payload/utils/lighthouse-metrics/tbt/index.d.ts +1 -1
  273. package/dist/types/additional-payload/utils/lighthouse-metrics/utils/observer/index.d.ts +2 -2
  274. package/dist/types/assets/index.d.ts +1 -3
  275. package/dist/types/assets/utils.d.ts +4 -4
  276. package/dist/types/bundle-eval-timing/index.d.ts +2 -2
  277. package/dist/types/coinflip/index.d.ts +1 -1
  278. package/dist/types/common/react-ufo-payload-schema.d.ts +1 -0
  279. package/dist/types/config/index.d.ts +16 -14
  280. package/dist/types/create-experimental-interaction-metrics-payload/index.d.ts +4 -5
  281. package/dist/types/create-payload/common/utils/index.d.ts +8 -7
  282. package/dist/types/create-payload/index.d.ts +1 -97
  283. package/dist/types/create-payload/utils/get-interaction-status.d.ts +1 -1
  284. package/dist/types/create-payload/utils/get-page-visibility-up-to-ttai.d.ts +1 -1
  285. package/dist/types/create-payload/utils/get-react-ufo-payload-version.d.ts +1 -1
  286. package/dist/types/create-payload/utils/get-ssr-done-time-value.d.ts +1 -1
  287. package/dist/types/create-payload/utils/get-vc-metrics.d.ts +2 -2
  288. package/dist/types/create-post-interaction-log-payload/index.d.ts +1 -1
  289. package/dist/types/custom-data/index.d.ts +1 -1
  290. package/dist/types/custom-mark/index.d.ts +1 -1
  291. package/dist/types/custom-spans/index.d.ts +1 -1
  292. package/dist/types/custom-timings/index.d.ts +2 -2
  293. package/dist/types/experience-trace-id-context/index.d.ts +7 -7
  294. package/dist/types/experience-trace-id-context/utils/make-trace-http-request-headers/index.d.ts +1 -1
  295. package/dist/types/feature-flags-accessed/common/utils/index.d.ts +2 -2
  296. package/dist/types/feature-flags-accessed/index.d.ts +1 -1
  297. package/dist/types/generate-id/index.d.ts +1 -1
  298. package/dist/types/global-error-handler/index.d.ts +3 -3
  299. package/dist/types/initial-page-load-extra-timing/index.d.ts +2 -2
  300. package/dist/types/interaction-context/index.d.ts +1 -1
  301. package/dist/types/interaction-metrics/index.d.ts +44 -44
  302. package/dist/types/interaction-metrics/post-interaction-log.d.ts +0 -1
  303. package/dist/types/interaction-metrics-init/index.d.ts +1 -1
  304. package/dist/types/interaction-metrics-init/schedule-idle-callback.d.ts +1 -1
  305. package/dist/types/resource-timing/common/utils/config.d.ts +2 -2
  306. package/dist/types/resource-timing/common/utils/resource-timing-buffer.d.ts +5 -5
  307. package/dist/types/resource-timing/main.d.ts +1 -1
  308. package/dist/types/resource-timing/utils.d.ts +1 -1
  309. package/dist/types/round-number/index.d.ts +1 -1
  310. package/dist/types/route-name/index.d.ts +3 -3
  311. package/dist/types/segment/schedule-on-paint.d.ts +1 -1
  312. package/dist/types/set-interaction-error/index.d.ts +1 -1
  313. package/dist/types/short-id/index.d.ts +1 -1
  314. package/dist/types/ssr/index.d.ts +5 -5
  315. package/dist/types/trace-interaction/index.d.ts +1 -1
  316. package/dist/types/trace-pageload/index.d.ts +2 -2
  317. package/dist/types/trace-press/index.d.ts +1 -1
  318. package/dist/types/trace-redirect/index.d.ts +1 -1
  319. package/dist/types/trace-transition/index.d.ts +1 -1
  320. package/dist/types/trace-transition/utils/generate-span-id/index.d.ts +1 -1
  321. package/dist/types/trace-transition/utils/set-interaction-active-trace/index.d.ts +1 -1
  322. package/dist/types/vc/index.d.ts +2 -2
  323. package/dist/types/vc/vc-observer/attachAbortListeners.d.ts +2 -2
  324. package/dist/types/vc/vc-observer/getVCRevisionsData.d.ts +5 -5
  325. package/dist/types/vc/vc-observer/getViewport.d.ts +2 -2
  326. package/dist/types/vc/vc-observer/heatmap/heatmap.d.ts +1 -1
  327. package/dist/types/vc/vc-observer/index.d.ts +4 -4
  328. package/dist/types/vc/vc-observer/media-wrapper/vc-utils.d.ts +1 -1
  329. package/dist/types/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.d.ts +4 -4
  330. package/dist/types/vc/vc-observer/revisions/revisions.d.ts +1 -1
  331. package/dist/types/vc/vc-observer-new/get-element-name.d.ts +1 -1
  332. package/dist/types/vc/vc-observer-new/get-unique-element-name.d.ts +1 -1
  333. package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/canvas-pixel.d.ts +3 -2
  334. package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.d.ts +2 -2
  335. package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/index.d.ts +2 -2
  336. package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/index.d.ts +1 -1
  337. package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/calc-union-area.d.ts +1 -1
  338. package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/index.d.ts +2 -2
  339. package/dist/types/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.d.ts +1 -1
  340. package/dist/types/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.d.ts +1 -1
  341. package/dist/types/vc/vc-observer-new/metric-calculator/utils/is-viewport-entry-data.d.ts +1 -1
  342. package/dist/types/vc/vc-observer-new/metric-calculator/utils/task-yield.d.ts +1 -1
  343. package/dist/types/vc/vc-observer-new/viewport-observer/index.d.ts +1 -1
  344. package/dist/types/vc/vc-observer-new/viewport-observer/intersection-observer/index.d.ts +1 -1
  345. package/dist/types/vc/vc-observer-new/viewport-observer/mutation-observer/index.d.ts +1 -1
  346. package/dist/types/vc/vc-observer-new/viewport-observer/performance-observer/index.d.ts +2 -2
  347. package/dist/types-ts4.5/additional-payload/utils/cache-hit-ratio/index.d.ts +2 -2
  348. package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/cls/index.d.ts +1 -1
  349. package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/index.d.ts +3 -3
  350. package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/tbt/index.d.ts +1 -1
  351. package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/utils/observer/index.d.ts +2 -2
  352. package/dist/types-ts4.5/assets/index.d.ts +1 -3
  353. package/dist/types-ts4.5/assets/utils.d.ts +4 -4
  354. package/dist/types-ts4.5/bundle-eval-timing/index.d.ts +2 -2
  355. package/dist/types-ts4.5/coinflip/index.d.ts +1 -1
  356. package/dist/types-ts4.5/common/react-ufo-payload-schema.d.ts +1 -0
  357. package/dist/types-ts4.5/config/index.d.ts +20 -14
  358. package/dist/types-ts4.5/create-experimental-interaction-metrics-payload/index.d.ts +4 -5
  359. package/dist/types-ts4.5/create-payload/common/utils/index.d.ts +8 -7
  360. package/dist/types-ts4.5/create-payload/index.d.ts +1 -97
  361. package/dist/types-ts4.5/create-payload/utils/get-interaction-status.d.ts +1 -1
  362. package/dist/types-ts4.5/create-payload/utils/get-page-visibility-up-to-ttai.d.ts +1 -1
  363. package/dist/types-ts4.5/create-payload/utils/get-react-ufo-payload-version.d.ts +1 -1
  364. package/dist/types-ts4.5/create-payload/utils/get-ssr-done-time-value.d.ts +1 -1
  365. package/dist/types-ts4.5/create-payload/utils/get-vc-metrics.d.ts +2 -2
  366. package/dist/types-ts4.5/create-post-interaction-log-payload/index.d.ts +1 -1
  367. package/dist/types-ts4.5/custom-data/index.d.ts +1 -1
  368. package/dist/types-ts4.5/custom-mark/index.d.ts +1 -1
  369. package/dist/types-ts4.5/custom-spans/index.d.ts +1 -1
  370. package/dist/types-ts4.5/custom-timings/index.d.ts +2 -2
  371. package/dist/types-ts4.5/experience-trace-id-context/index.d.ts +7 -7
  372. package/dist/types-ts4.5/experience-trace-id-context/utils/make-trace-http-request-headers/index.d.ts +1 -1
  373. package/dist/types-ts4.5/feature-flags-accessed/common/utils/index.d.ts +2 -2
  374. package/dist/types-ts4.5/feature-flags-accessed/index.d.ts +1 -1
  375. package/dist/types-ts4.5/generate-id/index.d.ts +1 -1
  376. package/dist/types-ts4.5/global-error-handler/index.d.ts +3 -3
  377. package/dist/types-ts4.5/initial-page-load-extra-timing/index.d.ts +2 -2
  378. package/dist/types-ts4.5/interaction-context/index.d.ts +1 -1
  379. package/dist/types-ts4.5/interaction-metrics/index.d.ts +44 -44
  380. package/dist/types-ts4.5/interaction-metrics/post-interaction-log.d.ts +0 -1
  381. package/dist/types-ts4.5/interaction-metrics-init/index.d.ts +1 -1
  382. package/dist/types-ts4.5/interaction-metrics-init/schedule-idle-callback.d.ts +1 -1
  383. package/dist/types-ts4.5/resource-timing/common/utils/config.d.ts +2 -2
  384. package/dist/types-ts4.5/resource-timing/common/utils/resource-timing-buffer.d.ts +5 -5
  385. package/dist/types-ts4.5/resource-timing/main.d.ts +1 -1
  386. package/dist/types-ts4.5/resource-timing/utils.d.ts +1 -1
  387. package/dist/types-ts4.5/round-number/index.d.ts +1 -1
  388. package/dist/types-ts4.5/route-name/index.d.ts +3 -3
  389. package/dist/types-ts4.5/segment/schedule-on-paint.d.ts +1 -1
  390. package/dist/types-ts4.5/set-interaction-error/index.d.ts +1 -1
  391. package/dist/types-ts4.5/short-id/index.d.ts +1 -1
  392. package/dist/types-ts4.5/ssr/index.d.ts +5 -5
  393. package/dist/types-ts4.5/trace-interaction/index.d.ts +1 -1
  394. package/dist/types-ts4.5/trace-pageload/index.d.ts +2 -2
  395. package/dist/types-ts4.5/trace-press/index.d.ts +1 -1
  396. package/dist/types-ts4.5/trace-redirect/index.d.ts +1 -1
  397. package/dist/types-ts4.5/trace-transition/index.d.ts +1 -1
  398. package/dist/types-ts4.5/trace-transition/utils/generate-span-id/index.d.ts +1 -1
  399. package/dist/types-ts4.5/trace-transition/utils/set-interaction-active-trace/index.d.ts +1 -1
  400. package/dist/types-ts4.5/vc/index.d.ts +2 -2
  401. package/dist/types-ts4.5/vc/vc-observer/attachAbortListeners.d.ts +2 -2
  402. package/dist/types-ts4.5/vc/vc-observer/getVCRevisionsData.d.ts +5 -5
  403. package/dist/types-ts4.5/vc/vc-observer/getViewport.d.ts +2 -2
  404. package/dist/types-ts4.5/vc/vc-observer/heatmap/heatmap.d.ts +1 -1
  405. package/dist/types-ts4.5/vc/vc-observer/index.d.ts +4 -4
  406. package/dist/types-ts4.5/vc/vc-observer/media-wrapper/vc-utils.d.ts +1 -1
  407. package/dist/types-ts4.5/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.d.ts +4 -4
  408. package/dist/types-ts4.5/vc/vc-observer/revisions/revisions.d.ts +1 -1
  409. package/dist/types-ts4.5/vc/vc-observer-new/get-element-name.d.ts +1 -1
  410. package/dist/types-ts4.5/vc/vc-observer-new/get-unique-element-name.d.ts +1 -1
  411. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/canvas-pixel.d.ts +3 -2
  412. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.d.ts +2 -2
  413. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/index.d.ts +2 -2
  414. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/index.d.ts +1 -1
  415. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/calc-union-area.d.ts +1 -1
  416. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/index.d.ts +2 -2
  417. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.d.ts +1 -1
  418. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.d.ts +1 -1
  419. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/utils/is-viewport-entry-data.d.ts +1 -1
  420. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/utils/task-yield.d.ts +1 -1
  421. package/dist/types-ts4.5/vc/vc-observer-new/viewport-observer/index.d.ts +1 -1
  422. package/dist/types-ts4.5/vc/vc-observer-new/viewport-observer/intersection-observer/index.d.ts +1 -1
  423. package/dist/types-ts4.5/vc/vc-observer-new/viewport-observer/mutation-observer/index.d.ts +1 -1
  424. package/dist/types-ts4.5/vc/vc-observer-new/viewport-observer/performance-observer/index.d.ts +2 -2
  425. package/package.json +4 -1
  426. package/dist/cjs/self-measurements/index.js +0 -261
  427. package/dist/es2019/self-measurements/index.js +0 -213
  428. package/dist/esm/self-measurements/index.js +0 -246
  429. package/dist/types/self-measurements/index.d.ts +0 -57
  430. package/dist/types-ts4.5/self-measurements/index.d.ts +0 -57
@@ -1,7 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- var _VCObserver;
3
2
  import { fg } from '@atlaskit/platform-feature-flags';
4
- import { markProfilingEnd, markProfilingStart, withProfiling } from '../../self-measurements';
5
3
  import { attachAbortListeners } from './attachAbortListeners';
6
4
  import { getVCRevisionsData } from './getVCRevisionsData';
7
5
  import { getViewportHeight, getViewportWidth } from './getViewport';
@@ -15,7 +13,7 @@ const abortReason = {
15
13
  error: 'error'
16
14
  };
17
15
  const UNUSED_SECTOR = 0;
18
- const filterComponentsLog = withProfiling(function filterComponentsLog(log) {
16
+ function filterComponentsLog(log) {
19
17
  return Object.fromEntries(Object.entries(log).map(([timestamp, entries]) => [Number(timestamp), entries.map(entry => {
20
18
  const {
21
19
  __debug__element,
@@ -23,7 +21,7 @@ const filterComponentsLog = withProfiling(function filterComponentsLog(log) {
23
21
  } = entry;
24
22
  return rest;
25
23
  })]));
26
- }, ['vc']);
24
+ }
27
25
  export class VCObserver {
28
26
  constructor(options) {
29
27
  /* abort logic */
@@ -481,7 +479,6 @@ export class VCObserver {
481
479
  }
482
480
  this.unbind = unbinds;
483
481
  });
484
- const operationTimer = markProfilingStart('VCObserver constructor');
485
482
  this.arraySize = options.heatmapSize || 200;
486
483
  this.devToolsEnabled = options.devToolsEnabled || false;
487
484
  this.oldDomUpdatesEnabled = options.oldDomUpdates || false;
@@ -502,32 +499,6 @@ export class VCObserver {
502
499
  devToolsEnabled: this.devToolsEnabled
503
500
  });
504
501
  this.isPostInteraction = options.isPostInteraction || false;
505
- this.start = withProfiling(this.start.bind(this), ['vc']);
506
- this.stop = withProfiling(this.stop.bind(this), ['vc']);
507
- this.getAbortReasonInfo = withProfiling(this.getAbortReasonInfo.bind(this), ['vc']); // TODO: confirm correct value of `this`
508
- this.getVCRawData = withProfiling(this.getVCRawData.bind(this), ['vc']); // TODO: confirm correct value of `this`
509
- this.getIgnoredElements = withProfiling(this.getIgnoredElements.bind(this), ['vc']);
510
- this.getVCResult = withProfiling(this.getVCResult.bind(this), ['vc']);
511
- this.setSSRElement = withProfiling(this.setSSRElement.bind(this), ['vc']);
512
- this.setReactRootRenderStart = withProfiling(this.setReactRootRenderStart.bind(this), ['vc']);
513
- this.setReactRootRenderStop = withProfiling(this.setReactRootRenderStop.bind(this), ['vc']);
514
- this.handleUpdate = withProfiling(this.handleUpdate.bind(this), ['vc']); // TODO: confirm correct value of `this`
515
- this.legacyHandleUpdate = withProfiling(this.legacyHandleUpdate.bind(this), ['vc']); // TODO: confirm correct value of `this`
516
- this.onViewportChangeDetected = withProfiling(this.onViewportChangeDetected.bind(this), ['vc']); // TODO: confirm correct value of `this`
517
- this.setAbortReason = withProfiling(this.setAbortReason.bind(this), ['vc']);
518
- this.resetState = withProfiling(this.resetState.bind(this), ['vc']);
519
- this.setViewportSize = withProfiling(this.setViewportSize.bind(this), ['vc']);
520
- this.mapPixelsToHeatmap = withProfiling(this.mapPixelsToHeatmap.bind(this), ['vc']); // TODO: confirm correct value of `this`
521
- this.getElementRatio = withProfiling(this.getElementRatio.bind(this), ['vc']); // TODO: confirm correct value of `this`
522
- this.applyChangesToHeatMap = withProfiling(this.applyChangesToHeatMap.bind(this), ['vc']);
523
- this.abortReasonCallback = withProfiling(this.abortReasonCallback.bind(this), ['vc']); // TODO: confirm correct value of `this`
524
- this.attachAbortListeners = withProfiling(this.attachAbortListeners.bind(this), ['vc']); // TODO: confirm correct value of `this`
525
- this.detachAbortListeners = withProfiling(this.detachAbortListeners.bind(this), ['vc']);
526
- this.measureStart = withProfiling(this.measureStart.bind(this), ['vc']);
527
- this.measureStop = withProfiling(this.measureStop.bind(this), ['vc']);
528
- markProfilingEnd(operationTimer, {
529
- tags: ['vc']
530
- });
531
502
  }
532
503
  start({
533
504
  startTime
@@ -559,6 +530,100 @@ export class VCObserver {
559
530
  ignoreReason
560
531
  }));
561
532
  }
533
+ static calculateVC({
534
+ heatmap,
535
+ ssr = UNUSED_SECTOR,
536
+ componentsLog,
537
+ viewport
538
+ }) {
539
+ const lastUpdate = {};
540
+ let totalPainted = 0;
541
+ if (ssr !== UNUSED_SECTOR) {
542
+ var _window$document;
543
+ const element = {
544
+ __debug__element: new WeakRef((_window$document = window.document) === null || _window$document === void 0 ? void 0 : _window$document.body),
545
+ intersectionRect: {
546
+ top: 0,
547
+ left: 0,
548
+ right: 0,
549
+ bottom: 0,
550
+ x: 0,
551
+ y: 0,
552
+ width: viewport.w,
553
+ height: viewport.h,
554
+ toJSON() {
555
+ return {};
556
+ }
557
+ },
558
+ targetName: 'SSR'
559
+ };
560
+ if (!componentsLog[ssr]) {
561
+ componentsLog[ssr] = [];
562
+ }
563
+ componentsLog[ssr].push(element);
564
+ }
565
+ heatmap.forEach(line => {
566
+ line.forEach(entry => {
567
+ const rounded = Math.floor(entry === UNUSED_SECTOR && ssr !== UNUSED_SECTOR ? ssr : entry);
568
+ totalPainted += rounded !== UNUSED_SECTOR ? 1 : 0;
569
+ if (rounded !== UNUSED_SECTOR) {
570
+ lastUpdate[rounded] = lastUpdate[rounded] ? lastUpdate[rounded] + 1 : 1;
571
+ }
572
+ });
573
+ });
574
+ const entries = Object.entries(lastUpdate).map(a => [parseInt(a[0], 10), a[1]]).sort((a, b) => a[0] > b[0] ? 1 : -1);
575
+ const VC = VCObserver.makeVCReturnObj();
576
+ const VCBox = VCObserver.makeVCReturnObj();
577
+
578
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
579
+ const isCalcSpeedIndexEnabled = fg('ufo-calc-speed-index');
580
+ entries.reduce((acc = 0, v) => {
581
+ const currRatio = v[1] / totalPainted;
582
+ let VCRatio = currRatio + acc;
583
+ const preciseCurrRatio = Math.round(100 * (v[1] / totalPainted));
584
+ const preciseAccRatio = Math.round(acc * 100);
585
+ VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
586
+ const time = v[0];
587
+ VCObserver.VCParts.forEach(key => {
588
+ const value = parseInt(key, 10);
589
+ if ((VC[key] === null || VC[key] === undefined) && VCRatio >= value / 100) {
590
+ var _componentsLog$time;
591
+ VC[key] = time;
592
+ VCBox[key] = [...new Set((_componentsLog$time = componentsLog[time]) === null || _componentsLog$time === void 0 ? void 0 : _componentsLog$time.filter(v => !v.ignoreReason).map(v => v.targetName))];
593
+ }
594
+ });
595
+ return VCRatio;
596
+ }, 0);
597
+ const VCEntries = entries.reduce((acc, [timestamp, entryPainted], i) => {
598
+ var _acc$abs, _componentsLog$timest, _acc$rel$vc, _acc$rel;
599
+ const currentlyPainted = entryPainted + (((_acc$abs = acc.abs[i - 1]) === null || _acc$abs === void 0 ? void 0 : _acc$abs[1]) || 0);
600
+ const currentlyPaintedRatio = Math.round(currentlyPainted / totalPainted * 1000) / 10;
601
+ const logEntry = [...new Set((_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.filter(v => !v.ignoreReason).map(v => v.targetName))];
602
+ const ratioDelta = (currentlyPaintedRatio - ((_acc$rel$vc = (_acc$rel = acc.rel[i - 1]) === null || _acc$rel === void 0 ? void 0 : _acc$rel.vc) !== null && _acc$rel$vc !== void 0 ? _acc$rel$vc : 0)) / 100;
603
+ if (isCalcSpeedIndexEnabled) {
604
+ const speedIndex = timestamp * ratioDelta;
605
+ acc.speedIndex += speedIndex;
606
+ }
607
+ acc.abs.push([timestamp, currentlyPainted]);
608
+ acc.rel.push({
609
+ time: timestamp,
610
+ vc: currentlyPaintedRatio,
611
+ elements: logEntry
612
+ });
613
+ return acc;
614
+ }, {
615
+ abs: [],
616
+ rel: [],
617
+ speedIndex: 0
618
+ });
619
+ VCEntries.speedIndex = Math.round(VCEntries.speedIndex);
620
+ return {
621
+ VC,
622
+ VCBox,
623
+ VCEntries,
624
+ totalPainted
625
+ };
626
+ }
562
627
  setSSRElement(element) {
563
628
  this.observers.setReactRootElement(element);
564
629
  }
@@ -628,6 +693,13 @@ export class VCObserver {
628
693
  }
629
694
  }
630
695
  }
696
+ static makeVCReturnObj() {
697
+ const vc = {};
698
+ VCObserver.VCParts.forEach(v => {
699
+ vc[v] = null;
700
+ });
701
+ return vc;
702
+ }
631
703
  detachAbortListeners() {
632
704
  this.unbind.forEach(fn => fn());
633
705
  this.unbind = [];
@@ -643,107 +715,5 @@ export class VCObserver {
643
715
  this._startMeasureTimestamp = -1;
644
716
  }
645
717
  }
646
- _VCObserver = VCObserver;
647
718
  /** config * */
648
- _defineProperty(VCObserver, "VCParts", ['25', '50', '75', '80', '85', '90', '95', '98', '99']);
649
- _defineProperty(VCObserver, "calculateVC", withProfiling(function calculateVC({
650
- heatmap,
651
- ssr = UNUSED_SECTOR,
652
- componentsLog,
653
- viewport
654
- }) {
655
- const lastUpdate = {};
656
- let totalPainted = 0;
657
- if (ssr !== UNUSED_SECTOR) {
658
- var _window$document;
659
- const element = {
660
- __debug__element: new WeakRef((_window$document = window.document) === null || _window$document === void 0 ? void 0 : _window$document.body),
661
- intersectionRect: {
662
- top: 0,
663
- left: 0,
664
- right: 0,
665
- bottom: 0,
666
- x: 0,
667
- y: 0,
668
- width: viewport.w,
669
- height: viewport.h,
670
- toJSON() {
671
- return {};
672
- }
673
- },
674
- targetName: 'SSR'
675
- };
676
- if (!componentsLog[ssr]) {
677
- componentsLog[ssr] = [];
678
- }
679
- componentsLog[ssr].push(element);
680
- }
681
- heatmap.forEach(line => {
682
- line.forEach(entry => {
683
- const rounded = Math.floor(entry === UNUSED_SECTOR && ssr !== UNUSED_SECTOR ? ssr : entry);
684
- totalPainted += rounded !== UNUSED_SECTOR ? 1 : 0;
685
- if (rounded !== UNUSED_SECTOR) {
686
- lastUpdate[rounded] = lastUpdate[rounded] ? lastUpdate[rounded] + 1 : 1;
687
- }
688
- });
689
- });
690
- const entries = Object.entries(lastUpdate).map(a => [parseInt(a[0], 10), a[1]]).sort((a, b) => a[0] > b[0] ? 1 : -1);
691
- const VC = _VCObserver.makeVCReturnObj();
692
- const VCBox = _VCObserver.makeVCReturnObj();
693
-
694
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
695
- const isCalcSpeedIndexEnabled = fg('ufo-calc-speed-index');
696
- entries.reduce((acc = 0, v) => {
697
- const currRatio = v[1] / totalPainted;
698
- let VCRatio = currRatio + acc;
699
- const preciseCurrRatio = Math.round(100 * (v[1] / totalPainted));
700
- const preciseAccRatio = Math.round(acc * 100);
701
- VCRatio = (preciseCurrRatio + preciseAccRatio) / 100;
702
- const time = v[0];
703
- _VCObserver.VCParts.forEach(key => {
704
- const value = parseInt(key, 10);
705
- if ((VC[key] === null || VC[key] === undefined) && VCRatio >= value / 100) {
706
- var _componentsLog$time;
707
- VC[key] = time;
708
- VCBox[key] = [...new Set((_componentsLog$time = componentsLog[time]) === null || _componentsLog$time === void 0 ? void 0 : _componentsLog$time.filter(v => !v.ignoreReason).map(v => v.targetName))];
709
- }
710
- });
711
- return VCRatio;
712
- }, 0);
713
- const VCEntries = entries.reduce((acc, [timestamp, entryPainted], i) => {
714
- var _acc$abs, _componentsLog$timest, _acc$rel$vc, _acc$rel;
715
- const currentlyPainted = entryPainted + (((_acc$abs = acc.abs[i - 1]) === null || _acc$abs === void 0 ? void 0 : _acc$abs[1]) || 0);
716
- const currentlyPaintedRatio = Math.round(currentlyPainted / totalPainted * 1000) / 10;
717
- const logEntry = [...new Set((_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.filter(v => !v.ignoreReason).map(v => v.targetName))];
718
- const ratioDelta = (currentlyPaintedRatio - ((_acc$rel$vc = (_acc$rel = acc.rel[i - 1]) === null || _acc$rel === void 0 ? void 0 : _acc$rel.vc) !== null && _acc$rel$vc !== void 0 ? _acc$rel$vc : 0)) / 100;
719
- if (isCalcSpeedIndexEnabled) {
720
- const speedIndex = timestamp * ratioDelta;
721
- acc.speedIndex += speedIndex;
722
- }
723
- acc.abs.push([timestamp, currentlyPainted]);
724
- acc.rel.push({
725
- time: timestamp,
726
- vc: currentlyPaintedRatio,
727
- elements: logEntry
728
- });
729
- return acc;
730
- }, {
731
- abs: [],
732
- rel: [],
733
- speedIndex: 0
734
- });
735
- VCEntries.speedIndex = Math.round(VCEntries.speedIndex);
736
- return {
737
- VC,
738
- VCBox,
739
- VCEntries,
740
- totalPainted
741
- };
742
- }, ['vc']));
743
- _defineProperty(VCObserver, "makeVCReturnObj", withProfiling(function makeVCReturnObj() {
744
- const vc = {};
745
- _VCObserver.VCParts.forEach(v => {
746
- vc[v] = null;
747
- });
748
- return vc;
749
- }, ['vc']));
719
+ _defineProperty(VCObserver, "VCParts", ['25', '50', '75', '80', '85', '90', '95', '98', '99']);
@@ -1,6 +1,5 @@
1
- import { withProfiling } from '../../../self-measurements';
2
1
  import { MEDIA_WRAPPER_TAG } from './index';
3
- export const isContainedWithinMediaWrapper = withProfiling(function isContainedWithinMediaWrapper(node) {
2
+ export function isContainedWithinMediaWrapper(node) {
4
3
  while (node) {
5
4
  if (node instanceof Element && node.hasAttribute(MEDIA_WRAPPER_TAG)) {
6
5
  return true;
@@ -8,4 +7,4 @@ export const isContainedWithinMediaWrapper = withProfiling(function isContainedW
8
7
  node = node.parentNode;
9
8
  }
10
9
  return false;
11
- });
10
+ }
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { markProfilingEnd, markProfilingStart, withProfiling } from '../../../../self-measurements';
3
2
  const placeholderDataKey = 'editorLnvPlaceholder'; // data-editor-lnv-placeholder
4
3
  const replaceDataKey = 'editorLnvPlaceholderReplace'; // data-editor-lnv-placeholder-replace
5
4
 
@@ -64,23 +63,7 @@ export class EditorLnvHandler {
64
63
  return;
65
64
  }
66
65
  });
67
- const operationTimer = markProfilingStart('EditorLnvHandler constructor');
68
66
  this.intersectionObserver = new IntersectionObserver(entries => entries.filter(entry => entry.intersectionRatio > 0).forEach(this.intersectionObserverCallback));
69
- this.shouldHandleAddedNode = withProfiling(this.shouldHandleAddedNode.bind(this), ['vc']);
70
- this.handleAddedNode = withProfiling(this.handleAddedNode.bind(this), ['vc']);
71
- this.clear = withProfiling(this.clear.bind(this), ['vc']);
72
- this.handleAddedPlaceholderNode = withProfiling(this.handleAddedPlaceholderNode.bind(this), ['vc']);
73
- this.handleAddedReplaceNode = withProfiling(this.handleAddedReplaceNode.bind(this), ['vc']);
74
- this.isExistingPlaceholder = withProfiling(this.isExistingPlaceholder.bind(this), ['vc']);
75
- this.registerPlaceholder = withProfiling(this.registerPlaceholder.bind(this), ['vc']);
76
- this.getSize = withProfiling(this.getSize.bind(this), ['vc']);
77
- this.isAddedPlaceholderMatchingSize = withProfiling(this.isAddedPlaceholderMatchingSize.bind(this), ['vc']);
78
- this.isAddedReplaceMatchingSize = withProfiling(this.isAddedReplaceMatchingSize.bind(this), ['vc']);
79
- this.areRectsSameSize = withProfiling(this.areRectsSameSize.bind(this), ['vc']);
80
- this.intersectionObserverCallback = withProfiling(this.intersectionObserverCallback.bind(this), ['vc']);
81
- markProfilingEnd(operationTimer, {
82
- tags: ['vc']
83
- });
84
67
  }
85
68
  shouldHandleAddedNode(el) {
86
69
  var _el$dataset, _el$dataset2;
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { shouldHandleEditorLnv } from '../../../config';
4
- import { markProfilingEnd, markProfilingStart, withProfiling } from '../../../self-measurements';
5
4
  import { isContainedWithinMediaWrapper } from '../media-wrapper/vc-utils';
6
5
  import { EditorLnvHandler } from './editor-lnv';
7
6
  import isNonVisualStyleMutation from './non-visual-styles/is-non-visual-style-mutation';
@@ -11,7 +10,7 @@ const state = {
11
10
  waitingForFirstRender: 2,
12
11
  ignoring: 3
13
12
  };
14
- const isElementVisible = withProfiling(function isElementVisible(target) {
13
+ function isElementVisible(target) {
15
14
  if (!target || typeof target.checkVisibility !== 'function') {
16
15
  return true;
17
16
  }
@@ -21,7 +20,7 @@ const isElementVisible = withProfiling(function isElementVisible(target) {
21
20
  visibilityProperty: true
22
21
  });
23
22
  return isVisible;
24
- }, ['vc']);
23
+ }
25
24
  export class Observers {
26
25
  constructor(opts) {
27
26
  _defineProperty(this, "observedMutations", new WeakMap());
@@ -65,7 +64,6 @@ export class Observers {
65
64
  });
66
65
  }
67
66
  });
68
- const operationTimer = markProfilingStart('Observers constructor');
69
67
  this.selectorConfig = {
70
68
  ...this.selectorConfig,
71
69
  ...opts.selectorConfig
@@ -74,23 +72,6 @@ export class Observers {
74
72
  this.mutationObserver = this.getMutationObserver();
75
73
  this.ssrPlaceholderHandler = new SSRPlaceholderHandlers();
76
74
  this.editorLnvHandler = new EditorLnvHandler();
77
- this.isBrowserSupported = withProfiling(this.isBrowserSupported.bind(this), ['vc']);
78
- this.observe = withProfiling(this.observe.bind(this), ['vc']);
79
- this.disconnect = withProfiling(this.disconnect.bind(this), ['vc']);
80
- this.subscribeResults = withProfiling(this.subscribeResults.bind(this), ['vc']);
81
- this.getTotalTime = withProfiling(this.getTotalTime.bind(this), ['vc']);
82
- this.setReactRootElement = withProfiling(this.setReactRootElement.bind(this), ['vc']);
83
- this.setReactRootRenderStart = withProfiling(this.setReactRootRenderStart.bind(this), ['vc']);
84
- this.setReactRootRenderStop = withProfiling(this.setReactRootRenderStop.bind(this), ['vc']);
85
- this.observeElement = withProfiling(this.observeElement.bind(this), ['vc']);
86
- this.getMutationObserver = withProfiling(this.getMutationObserver.bind(this), ['vc']);
87
- this.getElementName = withProfiling(this.getElementName.bind(this), ['vc']);
88
- this.getIntersectionObserver = withProfiling(this.getIntersectionObserver.bind(this), ['vc']);
89
- this.measureStart = withProfiling(this.measureStart.bind(this), ['vc']);
90
- this.measureStop = withProfiling(this.measureStop.bind(this), ['vc']);
91
- markProfilingEnd(operationTimer, {
92
- tags: ['vc']
93
- });
94
75
  }
95
76
  isBrowserSupported() {
96
77
  return typeof window.IntersectionObserver === 'function' && typeof window.MutationObserver === 'function';
@@ -142,7 +123,6 @@ export class Observers {
142
123
  }
143
124
  const shouldHandleEditorLnvLocal = shouldHandleEditorLnv();
144
125
  return new MutationObserver(mutations => {
145
- const operationTimer = markProfilingStart('mutationObserverCallback');
146
126
  this.measureStart();
147
127
  mutations.forEach(mutation => {
148
128
  // patching element if timestamp not automatically added
@@ -236,9 +216,6 @@ export class Observers {
236
216
  }
237
217
  }
238
218
  });
239
- markProfilingEnd(operationTimer, {
240
- tags: ['vc']
241
- });
242
219
  });
243
220
  }
244
221
  getElementName(element) {
@@ -271,7 +248,6 @@ export class Observers {
271
248
  return null;
272
249
  }
273
250
  return new IntersectionObserver(entries => {
274
- const operationTimer = markProfilingStart('intersectionObserverCallback');
275
251
  this.measureStart();
276
252
  entries.forEach(({
277
253
  isIntersecting,
@@ -306,9 +282,6 @@ export class Observers {
306
282
  }
307
283
  });
308
284
  this.measureStop();
309
- markProfilingEnd(operationTimer, {
310
- tags: ['vc']
311
- });
312
285
  });
313
286
  }
314
287
  measureStart() {
@@ -1,5 +1,3 @@
1
- import { withProfiling } from '../../../../self-measurements';
2
-
3
1
  /**
4
2
  * Checks if a mutation record represents a non-visual style change
5
3
  * @param mutation - The mutation record to check
@@ -10,7 +8,7 @@ import { withProfiling } from '../../../../self-measurements';
10
8
  * - The changed attribute is either 'class' or 'style'
11
9
  */
12
10
 
13
- const isNonVisualStyleMutation = withProfiling(function isNonVisualStyleMutation({
11
+ function isNonVisualStyleMutation({
14
12
  target,
15
13
  attributeName
16
14
  }) {
@@ -24,5 +22,5 @@ const isNonVisualStyleMutation = withProfiling(function isNonVisualStyleMutation
24
22
  return false;
25
23
  }
26
24
  return true;
27
- }, ['vc']);
25
+ }
28
26
  export default isNonVisualStyleMutation;
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { markProfilingEnd, markProfilingStart, withProfiling } from '../../../../self-measurements';
3
2
  const ANCESTOR_LOOKUP_LIMIT = 10;
4
3
  export class SSRPlaceholderHandlers {
5
4
  constructor() {
@@ -60,7 +59,6 @@ export class SSRPlaceholderHandlers {
60
59
  this.reactValidateCallbacks.delete(staticKey);
61
60
  }
62
61
  });
63
- const operationTimer = markProfilingStart('SSRPlaceholderHandlers constructor');
64
62
  if (typeof IntersectionObserver === 'function') {
65
63
  // Only instantiate the IntersectionObserver if it's supported
66
64
  this.intersectionObserver = new IntersectionObserver(entries => entries.filter(entry => entry.intersectionRatio > 0).forEach(this.intersectionObserverCallback));
@@ -96,20 +94,6 @@ export class SSRPlaceholderHandlers {
96
94
  delete window.__SSR_PLACEHOLDERS_DIMENSIONS__;
97
95
  }
98
96
  }
99
- this.clear = withProfiling(this.clear.bind(this), ['vc']);
100
- this.isPlaceholder = withProfiling(this.isPlaceholder.bind(this), ['vc']);
101
- this.isPlaceholderReplacement = withProfiling(this.isPlaceholderReplacement.bind(this), ['vc']);
102
- this.isPlaceholderIgnored = withProfiling(this.isPlaceholderIgnored.bind(this), ['vc']);
103
- this.findNearestPlaceholderContainerIfIgnored = withProfiling(this.findNearestPlaceholderContainerIfIgnored.bind(this), ['vc']);
104
- this.checkIfExistedAndSizeMatching = withProfiling(this.checkIfExistedAndSizeMatching.bind(this), ['vc']);
105
- this.getSize = withProfiling(this.getSize.bind(this), ['vc']);
106
- this.validateReactComponentMatchToPlaceholder = withProfiling(this.validateReactComponentMatchToPlaceholder.bind(this), ['vc']);
107
- this.hasSameSizePosition = withProfiling(this.hasSameSizePosition.bind(this), ['vc']);
108
- this.isDummyRect = withProfiling(this.isDummyRect.bind(this), ['vc']);
109
- this.intersectionObserverCallback = withProfiling(this.intersectionObserverCallback.bind(this), ['vc']);
110
- markProfilingEnd(operationTimer, {
111
- tags: ['vc']
112
- });
113
97
  }
114
98
  clear() {
115
99
  this.staticPlaceholders = new Map();
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { withProfiling } from '../../../self-measurements';
3
2
  import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
4
3
  const legacyIgnoreReasons = ['image', 'ssr-hydration', 'editor-lazy-node-view'];
5
4
  export class FY25_01Classifier extends ViewportUpdateClassifier {
@@ -51,7 +50,6 @@ export class FY25_01Classifier extends ViewportUpdateClassifier {
51
50
  }
52
51
  }]);
53
52
  this.mergeConfig();
54
- this.VCCalculationMethod = withProfiling(this.VCCalculationMethod.bind(this), ['vc']);
55
53
  }
56
54
  }
57
55
  export const revFY25_01Classifier = new FY25_01Classifier();
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { withProfiling } from '../../../self-measurements';
3
2
  import { FY25_01Classifier } from './fy25_01';
4
3
  export class FY25_02Classifier extends FY25_01Classifier {
5
4
  // @todo remove it once fixed as described: https://product-fabric.atlassian.net/browse/AFO-3443
@@ -31,7 +30,6 @@ export class FY25_02Classifier extends FY25_01Classifier {
31
30
  }]);
32
31
  _defineProperty(this, "removedFilters", []);
33
32
  this.mergeConfig();
34
- this.filterComponentsLog = withProfiling(this.filterComponentsLog.bind(this), ['vc']);
35
33
  }
36
34
  }
37
35
  export const revFY25_02Classifier = new FY25_02Classifier();
@@ -1,8 +1,7 @@
1
1
  import { fg } from '@atlaskit/platform-feature-flags';
2
- import { withProfiling } from '../../../self-measurements';
3
2
  import { revFY25_01Classifier } from './fy25_01';
4
3
  import { revFY25_02Classifier } from './fy25_02';
5
- export const getRevisions = withProfiling(function getRevisions() {
4
+ export function getRevisions() {
6
5
  if (fg('platform_ufo_disable_ttvc_v1')) {
7
6
  return [{
8
7
  name: 'fy25.02',
@@ -16,4 +15,4 @@ export const getRevisions = withProfiling(function getRevisions() {
16
15
  name: 'fy25.02',
17
16
  classifier: revFY25_02Classifier
18
17
  }];
19
- }, ['vc']);
18
+ }
@@ -1,18 +1,9 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { markProfilingEnd, markProfilingStart, withProfiling } from '../../../self-measurements';
3
2
  export default class EntriesTimeline {
4
3
  constructor() {
5
4
  _defineProperty(this, "unorderedEntries", []);
6
5
  _defineProperty(this, "sortedEntriesCache", new Map());
7
- const operationTimer = markProfilingStart('EntriesTimeline constructor');
8
6
  this.unorderedEntries = [];
9
- this.push = withProfiling(this.push.bind(this), ['vc']);
10
- this.getCacheKey = withProfiling(this.getCacheKey.bind(this), ['vc']);
11
- this.getOrderedEntries = withProfiling(this.getOrderedEntries.bind(this), ['vc']);
12
- this.clear = withProfiling(this.clear.bind(this), ['vc']);
13
- markProfilingEnd(operationTimer, {
14
- tags: ['vc']
15
- });
16
7
  }
17
8
  push(entry) {
18
9
  this.unorderedEntries.push(entry);
@@ -1,6 +1,5 @@
1
- import { withProfiling } from '../../self-measurements';
2
1
  const nameCache = new WeakMap();
3
- const getElementName = withProfiling(function getElementName(selectorConfig, element) {
2
+ function getElementName(selectorConfig, element) {
4
3
  if (!(element instanceof HTMLElement)) {
5
4
  return 'error';
6
5
  }
@@ -65,5 +64,5 @@ const getElementName = withProfiling(function getElementName(selectorConfig, ele
65
64
  const name = `${tagName}${attributes || classList}`;
66
65
  nameCache.set(element, name);
67
66
  return name;
68
- }, ['vc']);
67
+ }
69
68
  export default getElementName;
@@ -1,24 +1,23 @@
1
- import { withProfiling } from '../../self-measurements';
2
1
  const nameCache = new WeakMap();
3
- const getAttributeSelector = withProfiling(function getAttributeSelector(element, attributeName) {
2
+ function getAttributeSelector(element, attributeName) {
4
3
  const attrValue = element.getAttribute(attributeName);
5
4
  if (!attrValue) {
6
5
  return '';
7
6
  }
8
7
  return `[${attributeName}="${attrValue}"]`;
9
- }, ['vc']);
10
- const isValidSelector = withProfiling(function isValidSelector(selector) {
8
+ }
9
+ function isValidSelector(selector) {
11
10
  try {
12
11
  document.querySelector(selector);
13
12
  return true;
14
13
  } catch (err) {
15
14
  return false;
16
15
  }
17
- }, ['vc']);
18
- const isSelectorUnique = withProfiling(function isSelectorUnique(selector) {
16
+ }
17
+ function isSelectorUnique(selector) {
19
18
  return document.querySelectorAll(selector).length === 1;
20
- }, ['vc']);
21
- const getUniqueSelector = withProfiling(function getUniqueSelector(selectorConfig, element) {
19
+ }
20
+ function getUniqueSelector(selectorConfig, element) {
22
21
  let currentElement = element;
23
22
  const parts = [];
24
23
  const MAX_DEPTH = 3;
@@ -60,8 +59,8 @@ const getUniqueSelector = withProfiling(function getUniqueSelector(selectorConfi
60
59
  }
61
60
  }
62
61
  return potentialSelector;
63
- }, ['vc']);
64
- const getElementName = withProfiling(function getElementName(selectorConfig, element) {
62
+ }
63
+ function getElementName(selectorConfig, element) {
65
64
  if (!(element instanceof HTMLElement)) {
66
65
  return 'error';
67
66
  }
@@ -72,5 +71,5 @@ const getElementName = withProfiling(function getElementName(selectorConfig, ele
72
71
  const uniqueSelector = getUniqueSelector(selectorConfig, element);
73
72
  nameCache.set(element, uniqueSelector);
74
73
  return uniqueSelector;
75
- }, ['vc']);
74
+ }
76
75
  export default getElementName;
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { markProfilingEnd, markProfilingStart, withProfiling } from '../../self-measurements';
3
2
  import EntriesTimeline from './entries-timeline';
4
3
  import getElementName from './get-element-name';
5
4
  import VCCalculator_FY25_03 from './metric-calculator/fy25_03';
@@ -17,7 +16,6 @@ export default class VCObserverNew {
17
16
  var _config$selectorConfi;
18
17
  _defineProperty(this, "viewportObserver", null);
19
18
  _defineProperty(this, "windowEventObserver", null);
20
- const operationTimer = markProfilingStart('VCObserverNew constructor');
21
19
  this.entriesTimeline = new EntriesTimeline();
22
20
  this.selectorConfig = (_config$selectorConfi = config.selectorConfig) !== null && _config$selectorConfi !== void 0 ? _config$selectorConfi : DEFAULT_SELECTOR_CONFIG;
23
21
  this.viewportObserver = new ViewportObserver({
@@ -63,13 +61,6 @@ export default class VCObserverNew {
63
61
  });
64
62
  }
65
63
  });
66
- this.start = withProfiling(this.start.bind(this), ['vc']);
67
- this.stop = withProfiling(this.stop.bind(this), ['vc']);
68
- this.getVCResult = withProfiling(this.getVCResult.bind(this), ['vc']);
69
- this.getElementName = withProfiling(this.getElementName.bind(this), ['vc']);
70
- markProfilingEnd(operationTimer, {
71
- tags: ['vc']
72
- });
73
64
  }
74
65
  start({
75
66
  startTime
@@ -1,11 +1,9 @@
1
- import { withProfiling } from '../../../self-measurements';
2
1
  import calculateTTVCPercentiles from './percentile-calc';
3
2
  import getViewportHeight from './utils/get-viewport-height';
4
3
  import getViewportWidth from './utils/get-viewport-width';
5
4
  export default class AbstractVCCalculatorBase {
6
5
  constructor(revisionNo) {
7
6
  this.revisionNo = revisionNo;
8
- this.calculate = withProfiling(this.calculate.bind(this), ['vc']);
9
7
  }
10
8
  async calculate({
11
9
  startTime,
@@ -1,4 +1,3 @@
1
- import { withProfiling } from '../../../../self-measurements';
2
1
  import AbstractVCCalculatorBase from '../abstract-base-vc-calculator';
3
2
  import isViewportEntryData from '../utils/is-viewport-entry-data';
4
3
  const ABORTING_WINDOW_EVENT = ['wheel', 'scroll', 'keydown', 'resize'];
@@ -12,8 +11,6 @@ export const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-ta
12
11
  export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
13
12
  constructor() {
14
13
  super(REVISION_NO);
15
- this.isEntryIncluded = withProfiling(this.isEntryIncluded.bind(this), ['vc']);
16
- this.isVCClean = withProfiling(this.isVCClean.bind(this), ['vc']);
17
14
  }
18
15
  isEntryIncluded(entry) {
19
16
  if (!CONSIDERED_ENTRY_TYPE.includes(entry.type)) {