sparkforensics-server 0.1.0 → 0.2.0

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 (440) hide show
  1. package/README.md +6 -0
  2. package/index.js +40 -49
  3. package/lib/static-files.js +10 -6
  4. package/package.json +20 -1
  5. package/public/assets/AutoscalingChurn-CFJkiqxW.js +1 -0
  6. package/public/assets/CacheUtilization-kTKZBzDA.js +1 -0
  7. package/public/assets/CachingOpportunity-CU70EWcF.js +1 -0
  8. package/public/assets/ColdStart-hOI-WOvm.js +1 -0
  9. package/public/assets/ConfigAudit-B4oAksZY.js +1 -0
  10. package/public/assets/CoreUsageArea-D-dR3SQk.js +1 -0
  11. package/public/assets/Dashboard-MDhohsq4.js +4 -0
  12. package/public/assets/DuplicatePlanSubtree-54RKsfI7.js +1 -0
  13. package/public/assets/DurationHistogram-CviQyPNM.js +1 -0
  14. package/public/assets/EmptyState-v2ehFncc.js +1 -0
  15. package/public/assets/ExecutorUtilization-vHyFHgL6.js +1 -0
  16. package/public/assets/GcPressure-DINuhcno.js +1 -0
  17. package/public/assets/ImpactEstimate-C6GzFOY9.js +1 -0
  18. package/public/assets/IncompleteRun-a1kuCnU6.js +1 -0
  19. package/public/assets/JobFailures-CYwPfUhR.js +1 -0
  20. package/public/assets/MemoryUtilization-Dlfj0e_f.js +1 -0
  21. package/public/assets/OverBroadcast-BMu7Y8l9.js +1 -0
  22. package/public/assets/PartitionSizing-CvMGfSVB.js +1 -0
  23. package/public/assets/PlanExplorer-xYFme_Rx.js +1 -0
  24. package/public/assets/PlanGraphRoute-a3OGg6ET.js +1 -0
  25. package/public/assets/RetryWaste-JKRjOZ-J.js +1 -0
  26. package/public/assets/RowPagination-DypWbnic.js +1 -0
  27. package/public/assets/ShuffleIO-Mi8HiVu-.js +1 -0
  28. package/public/assets/Skew-C3iOScTC.js +1 -0
  29. package/public/assets/SlowHost-DKBg18v-.js +1 -0
  30. package/public/assets/SmallFiles-CCCB6AIu.js +1 -0
  31. package/public/assets/SpeculationWaste-DUNupw0_.js +1 -0
  32. package/public/assets/Spill-BlLdatik.js +1 -0
  33. package/public/assets/StageFailed-qtY7C7Yo.js +1 -0
  34. package/public/assets/StageFindingGroup-CoVdEZYs.js +1 -0
  35. package/public/assets/StageHeader-uDBLHgdg.js +1 -0
  36. package/public/assets/StagePill-CYCMdlIx.js +1 -0
  37. package/public/assets/StageShape-zs0mAjQJ.js +1 -0
  38. package/public/assets/StageSlowness-C7vg0u5Q.js +1 -0
  39. package/public/assets/Straggler-4BRGAQP4.js +1 -0
  40. package/public/assets/TaskFailures-CSjO23Kg.js +1 -0
  41. package/public/assets/TinyTask-6Zuovcn5.js +1 -0
  42. package/public/assets/UnderBroadcast-CePjo0ZV.js +1 -0
  43. package/public/assets/WidgetLeadSummary-DRNRVvn7.js +1 -0
  44. package/public/assets/{charts-vendor-NMqKV0H4.js → charts-vendor-Cf1-wzeH.js} +2 -2
  45. package/public/assets/downsample-D8XmJk6i.js +1 -0
  46. package/public/assets/finding-anchor-4TmpXd7j.js +1 -0
  47. package/public/assets/impact-sort-Cq6KOLqh.js +1 -0
  48. package/public/assets/inbox-DBFovbUX.js +1 -0
  49. package/public/assets/index-CHjV2-jB.js +9 -0
  50. package/public/assets/index-DMEtaP4u.css +1 -0
  51. package/public/assets/parser-worker-BMPPE37w.js +64 -0
  52. package/public/assets/plan-graph-vendor-B96a-e4N.js +7 -0
  53. package/public/assets/react-vendor-DA6opS-q.js +9 -0
  54. package/public/assets/select-D5fK-za0.js +1 -0
  55. package/public/assets/toggle-group-lbIXRG0W.js +1 -0
  56. package/public/assets/usePagedRows-CFoZrPr4.js +1 -0
  57. package/public/assets/useRecentFiles-BPGQ6XII.js +13 -0
  58. package/public/assets/useSortMode-BOPpfLhJ.js +1 -0
  59. package/public/docs/404.html +3 -3
  60. package/public/docs/assets/{app.Bxy4_HVA.js → app.BgzsaTS3.js} +1 -1
  61. package/public/docs/assets/aqe-loop.IwQSATHw.svg +1 -0
  62. package/public/docs/assets/aqe-loop.dark.DGbaxqJE.svg +1 -0
  63. package/public/docs/assets/broadcast-vs-shuffle.Db4WY1XK.svg +1 -0
  64. package/public/docs/assets/broadcast-vs-shuffle.dark.C7Bxs0mG.svg +1 -0
  65. package/public/docs/assets/cache-lifecycle.dark.B-hS7AgU.svg +1 -0
  66. package/public/docs/assets/cache-lifecycle.rEOVYQNU.svg +1 -0
  67. package/public/docs/assets/chunks/@localSearchIndexroot.PQ5JepCp.js +1 -0
  68. package/public/docs/assets/chunks/{VPLocalSearchBox.L5jNOIR3.js → VPLocalSearchBox.DOq3t-On.js} +1 -1
  69. package/public/docs/assets/chunks/duplicate-plan-subtree.dark.Cdp70QhV.js +1 -0
  70. package/public/docs/assets/chunks/{framework.CNDaxUod.js → framework.DSg0KOwT.js} +1 -1
  71. package/public/docs/assets/chunks/retry-escalation-ladder.dark.DHipdJgZ.js +1 -0
  72. package/public/docs/assets/chunks/theme.BP14rGBx.js +2 -0
  73. package/public/docs/assets/cold-start-timeline.DxC_Sc7w.svg +1 -0
  74. package/public/docs/assets/cold-start-timeline.dark.CZ17YcAG.svg +1 -0
  75. package/public/docs/assets/columnar-layout.PghGeOEA.svg +1 -0
  76. package/public/docs/assets/columnar-layout.dark.BVNlz0ff.svg +1 -0
  77. package/public/docs/assets/container-memory.DIO0AnIm.svg +1 -0
  78. package/public/docs/assets/container-memory.dark.CP-5zuCl.svg +1 -0
  79. package/public/docs/assets/contributor-guide_architecture_board-widgets.md.B-OsL91z.js +1 -0
  80. package/public/docs/assets/contributor-guide_architecture_board-widgets.md.B-OsL91z.lean.js +1 -0
  81. package/public/docs/assets/contributor-guide_architecture_detector-contract.md.BOeH4d1J.js +1 -0
  82. package/public/docs/assets/contributor-guide_architecture_detector-contract.md.BOeH4d1J.lean.js +1 -0
  83. package/public/docs/assets/contributor-guide_architecture_drill-down.md.BtPdlM7r.js +1 -0
  84. package/public/docs/assets/contributor-guide_architecture_drill-down.md.BtPdlM7r.lean.js +1 -0
  85. package/public/docs/assets/{contributor-guide_architecture_impact-estimation.md.CzlXOnCq.js → contributor-guide_architecture_impact-estimation.md.DYCDPgkh.js} +1 -1
  86. package/public/docs/assets/{contributor-guide_architecture_impact-estimation.md.CzlXOnCq.lean.js → contributor-guide_architecture_impact-estimation.md.DYCDPgkh.lean.js} +1 -1
  87. package/public/docs/assets/{contributor-guide_architecture_index.md.94lNbF-4.js → contributor-guide_architecture_index.md.3TO9ic6w.js} +1 -1
  88. package/public/docs/assets/{contributor-guide_architecture_index.md.94lNbF-4.lean.js → contributor-guide_architecture_index.md.3TO9ic6w.lean.js} +1 -1
  89. package/public/docs/assets/{contributor-guide_architecture_overview.md.mQFlN66o.js → contributor-guide_architecture_overview.md.CehiRmGn.js} +1 -1
  90. package/public/docs/assets/{contributor-guide_architecture_overview.md.mQFlN66o.lean.js → contributor-guide_architecture_overview.md.CehiRmGn.lean.js} +1 -1
  91. package/public/docs/assets/contributor-guide_architecture_state-and-history.md.m3S3UdMk.js +1 -0
  92. package/public/docs/assets/contributor-guide_architecture_state-and-history.md.m3S3UdMk.lean.js +1 -0
  93. package/public/docs/assets/contributor-guide_architecture_widget-rendering.md.DbqPf2OT.js +1 -0
  94. package/public/docs/assets/contributor-guide_architecture_widget-rendering.md.DbqPf2OT.lean.js +1 -0
  95. package/public/docs/assets/{contributor-guide_architecture_worker-protocol.md.BaS_L10g.js → contributor-guide_architecture_worker-protocol.md.B93qJ_tT.js} +2 -2
  96. package/public/docs/assets/{contributor-guide_architecture_worker-protocol.md.BaS_L10g.lean.js → contributor-guide_architecture_worker-protocol.md.B93qJ_tT.lean.js} +1 -1
  97. package/public/docs/assets/contributor-guide_contributing.md.CvRsdr6J.js +1 -0
  98. package/public/docs/assets/contributor-guide_contributing.md.CvRsdr6J.lean.js +1 -0
  99. package/public/docs/assets/{contributor-guide_development-setup.md.CpUMVtIK.js → contributor-guide_development-setup.md.DvAN_9mK.js} +1 -1
  100. package/public/docs/assets/{contributor-guide_development-setup.md.CpUMVtIK.lean.js → contributor-guide_development-setup.md.DvAN_9mK.lean.js} +1 -1
  101. package/public/docs/assets/{contributor-guide_testing.md.C0q-BJfl.js → contributor-guide_testing.md.6rIKqSyY.js} +1 -1
  102. package/public/docs/assets/{contributor-guide_testing.md.C0q-BJfl.lean.js → contributor-guide_testing.md.6rIKqSyY.lean.js} +1 -1
  103. package/public/docs/assets/dag-stages.DSz_S937.svg +1 -0
  104. package/public/docs/assets/dag-stages.dark.F72UzxH4.svg +1 -0
  105. package/public/docs/assets/driver-executor.D5pQ7YN1.svg +1 -0
  106. package/public/docs/assets/driver-executor.dark.BmX9cPvh.svg +1 -0
  107. package/public/docs/assets/duplicate-plan-subtree.B4cvN6fj.svg +1 -0
  108. package/public/docs/assets/duplicate-plan-subtree.dark.Dw8wS0Ag.svg +1 -0
  109. package/public/docs/assets/{index.md.CETnDZzR.js → index.md.CHJVslga.js} +1 -1
  110. package/public/docs/assets/{index.md.CETnDZzR.lean.js → index.md.CHJVslga.lean.js} +1 -1
  111. package/public/docs/assets/join-strategy.C_FvrCEo.svg +1 -0
  112. package/public/docs/assets/join-strategy.dark.ChMLnNII.svg +1 -0
  113. package/public/docs/assets/memory-borrowing.BqQRJg0u.svg +1 -0
  114. package/public/docs/assets/memory-borrowing.dark.Yhh20O9C.svg +1 -0
  115. package/public/docs/assets/memory-regions.XHvO7jHG.svg +1 -0
  116. package/public/docs/assets/memory-regions.dark.D4TP9_08.svg +1 -0
  117. package/public/docs/assets/repartition-vs-coalesce.BovLRrpj.svg +1 -0
  118. package/public/docs/assets/repartition-vs-coalesce.dark.BhAczKZQ.svg +1 -0
  119. package/public/docs/assets/retry-escalation-ladder.DyTKJJmZ.svg +1 -0
  120. package/public/docs/assets/retry-escalation-ladder.dark.BdsabtU3.svg +1 -0
  121. package/public/docs/assets/shuffle-map-reduce.KuOEZVmg.svg +1 -0
  122. package/public/docs/assets/shuffle-map-reduce.dark.BgQZnFSb.svg +1 -0
  123. package/public/docs/assets/spill-classification.BU2euYDO.svg +1 -0
  124. package/public/docs/assets/spill-classification.dark.D7i1M40d.svg +1 -0
  125. package/public/docs/assets/{style.D2mY0HUs.css → style.DXOMCXxn.css} +1 -1
  126. package/public/docs/assets/tuning-reference_anti-patterns.md.Df1YMIHu.js +1 -0
  127. package/public/docs/assets/tuning-reference_anti-patterns.md.Df1YMIHu.lean.js +1 -0
  128. package/public/docs/assets/tuning-reference_aqe.md.BIsCtLzm.js +1 -0
  129. package/public/docs/assets/tuning-reference_aqe.md.BIsCtLzm.lean.js +1 -0
  130. package/public/docs/assets/tuning-reference_bottleneck-broadcast-sizing.md.CEstB3Ia.js +1 -0
  131. package/public/docs/assets/tuning-reference_bottleneck-broadcast-sizing.md.CEstB3Ia.lean.js +1 -0
  132. package/public/docs/assets/tuning-reference_bottleneck-cold-start.md.CEuy-72y.js +7 -0
  133. package/public/docs/assets/tuning-reference_bottleneck-cold-start.md.CEuy-72y.lean.js +1 -0
  134. package/public/docs/assets/tuning-reference_bottleneck-duplicate-plan-subtree.md.CIohQDfn.js +1 -0
  135. package/public/docs/assets/tuning-reference_bottleneck-duplicate-plan-subtree.md.CIohQDfn.lean.js +1 -0
  136. package/public/docs/assets/tuning-reference_bottleneck-failures.md.4z5BXGJ2.js +6 -0
  137. package/public/docs/assets/tuning-reference_bottleneck-failures.md.4z5BXGJ2.lean.js +1 -0
  138. package/public/docs/assets/tuning-reference_bottleneck-gc.md.DSxzZRK7.js +6 -0
  139. package/public/docs/assets/tuning-reference_bottleneck-gc.md.DSxzZRK7.lean.js +1 -0
  140. package/public/docs/assets/tuning-reference_bottleneck-job-failure-rate.md.BaJl__1W.js +8 -0
  141. package/public/docs/assets/tuning-reference_bottleneck-job-failure-rate.md.BaJl__1W.lean.js +1 -0
  142. package/public/docs/assets/tuning-reference_bottleneck-memory-utilization.md.DbP-SJZc.js +7 -0
  143. package/public/docs/assets/tuning-reference_bottleneck-memory-utilization.md.DbP-SJZc.lean.js +1 -0
  144. package/public/docs/assets/tuning-reference_bottleneck-retry-waste.md.D5JMjVOt.js +1 -0
  145. package/public/docs/assets/tuning-reference_bottleneck-retry-waste.md.D5JMjVOt.lean.js +1 -0
  146. package/public/docs/assets/tuning-reference_bottleneck-shuffle.md.CM-nTmIH.js +12 -0
  147. package/public/docs/assets/tuning-reference_bottleneck-shuffle.md.CM-nTmIH.lean.js +1 -0
  148. package/public/docs/assets/tuning-reference_bottleneck-skew.md.BdUwiDhn.js +14 -0
  149. package/public/docs/assets/tuning-reference_bottleneck-skew.md.BdUwiDhn.lean.js +1 -0
  150. package/public/docs/assets/tuning-reference_bottleneck-slow-host.md.BlIo6UDW.js +7 -0
  151. package/public/docs/assets/tuning-reference_bottleneck-slow-host.md.BlIo6UDW.lean.js +1 -0
  152. package/public/docs/assets/tuning-reference_bottleneck-small-files.md.B8kloyx8.js +5 -0
  153. package/public/docs/assets/tuning-reference_bottleneck-small-files.md.B8kloyx8.lean.js +1 -0
  154. package/public/docs/assets/tuning-reference_bottleneck-spill.md.PNH7mITt.js +6 -0
  155. package/public/docs/assets/tuning-reference_bottleneck-spill.md.PNH7mITt.lean.js +1 -0
  156. package/public/docs/assets/tuning-reference_bottleneck-straggler.md.DY36fHN5.js +7 -0
  157. package/public/docs/assets/tuning-reference_bottleneck-straggler.md.DY36fHN5.lean.js +1 -0
  158. package/public/docs/assets/tuning-reference_bottleneck-tiny-tasks.md.QTV7O8kU.js +8 -0
  159. package/public/docs/assets/tuning-reference_bottleneck-tiny-tasks.md.QTV7O8kU.lean.js +1 -0
  160. package/public/docs/assets/tuning-reference_bottleneck-utilization.md.DTiueZC3.js +5 -0
  161. package/public/docs/assets/tuning-reference_bottleneck-utilization.md.DTiueZC3.lean.js +1 -0
  162. package/public/docs/assets/tuning-reference_caching.md.B7aQ8asB.js +1 -0
  163. package/public/docs/assets/tuning-reference_caching.md.B7aQ8asB.lean.js +1 -0
  164. package/public/docs/assets/tuning-reference_cluster-config.md.ZVmDGsQ3.js +1 -0
  165. package/public/docs/assets/tuning-reference_cluster-config.md.ZVmDGsQ3.lean.js +1 -0
  166. package/public/docs/assets/tuning-reference_config.md.UvveiWG3.js +1 -0
  167. package/public/docs/assets/tuning-reference_config.md.UvveiWG3.lean.js +1 -0
  168. package/public/docs/assets/tuning-reference_data-formats.md.bjCAWH3N.js +1 -0
  169. package/public/docs/assets/tuning-reference_data-formats.md.bjCAWH3N.lean.js +1 -0
  170. package/public/docs/assets/tuning-reference_index.md.BQ_NooMV.js +1 -0
  171. package/public/docs/assets/tuning-reference_index.md.BQ_NooMV.lean.js +1 -0
  172. package/public/docs/assets/tuning-reference_intro.md.CobD-lGB.js +1 -0
  173. package/public/docs/assets/tuning-reference_intro.md.CobD-lGB.lean.js +1 -0
  174. package/public/docs/assets/tuning-reference_joins.md.BtKs_CuW.js +1 -0
  175. package/public/docs/assets/tuning-reference_joins.md.BtKs_CuW.lean.js +1 -0
  176. package/public/docs/assets/tuning-reference_memory-model.md.DhT-n4y3.js +1 -0
  177. package/public/docs/assets/tuning-reference_memory-model.md.DhT-n4y3.lean.js +1 -0
  178. package/public/docs/assets/tuning-reference_metrics.md.mLOh7Apj.js +1 -0
  179. package/public/docs/assets/tuning-reference_metrics.md.mLOh7Apj.lean.js +1 -0
  180. package/public/docs/assets/tuning-reference_partitioning.md.q0zKF_8X.js +1 -0
  181. package/public/docs/assets/tuning-reference_partitioning.md.q0zKF_8X.lean.js +1 -0
  182. package/public/docs/assets/tuning-reference_pyspark.md.DDCfvN9t.js +6 -0
  183. package/public/docs/assets/tuning-reference_pyspark.md.DDCfvN9t.lean.js +1 -0
  184. package/public/docs/assets/tuning-reference_shuffle.md.BZZ7R4Ix.js +1 -0
  185. package/public/docs/assets/tuning-reference_shuffle.md.BZZ7R4Ix.lean.js +1 -0
  186. package/public/docs/assets/tuning-reference_spark-architecture.md.Dwzm5avO.js +1 -0
  187. package/public/docs/assets/tuning-reference_spark-architecture.md.Dwzm5avO.lean.js +1 -0
  188. package/public/docs/assets/tuning-reference_table-formats.md.D6wj-2dX.js +1 -0
  189. package/public/docs/assets/tuning-reference_table-formats.md.D6wj-2dX.lean.js +1 -0
  190. package/public/docs/assets/udf-execution-models.BUFDICuG.svg +1 -0
  191. package/public/docs/assets/udf-execution-models.dark.YTNS6GDq.svg +1 -0
  192. package/public/docs/assets/user-guide_alternative-log-retrieval.md.sU3KGarf.js +1 -0
  193. package/public/docs/assets/user-guide_alternative-log-retrieval.md.sU3KGarf.lean.js +1 -0
  194. package/public/docs/assets/user-guide_getting-started.md.DtEM37MK.js +3 -0
  195. package/public/docs/assets/user-guide_getting-started.md.DtEM37MK.lean.js +1 -0
  196. package/public/docs/assets/{user-guide_mcp-tools.md.DwYI1d6C.js → user-guide_mcp-tools.md.C8MiIu7F.js} +35 -5
  197. package/public/docs/assets/{user-guide_mcp-tools.md.DwYI1d6C.lean.js → user-guide_mcp-tools.md.C8MiIu7F.lean.js} +1 -1
  198. package/public/docs/assets/{user-guide_run-comparison.md.5-oaOfTu.js → user-guide_run-comparison.md.S0TWWmLY.js} +1 -1
  199. package/public/docs/assets/{user-guide_run-comparison.md.5-oaOfTu.lean.js → user-guide_run-comparison.md.S0TWWmLY.lean.js} +1 -1
  200. package/public/docs/assets/user-guide_understanding-findings.md.D0R_Y-R2.js +1 -0
  201. package/public/docs/assets/{user-guide_understanding-findings.md.CK2WZ0Tf.lean.js → user-guide_understanding-findings.md.D0R_Y-R2.lean.js} +1 -1
  202. package/public/docs/contributor-guide/architecture/board-widgets.html +7 -7
  203. package/public/docs/contributor-guide/architecture/detector-contract.html +7 -7
  204. package/public/docs/contributor-guide/architecture/drill-down.html +7 -7
  205. package/public/docs/contributor-guide/architecture/impact-estimation.html +7 -7
  206. package/public/docs/contributor-guide/architecture/index.html +7 -7
  207. package/public/docs/contributor-guide/architecture/overview.html +7 -7
  208. package/public/docs/contributor-guide/architecture/state-and-history.html +7 -7
  209. package/public/docs/contributor-guide/architecture/widget-rendering.html +7 -7
  210. package/public/docs/contributor-guide/architecture/worker-protocol.html +8 -8
  211. package/public/docs/contributor-guide/contributing.html +7 -7
  212. package/public/docs/contributor-guide/development-setup.html +7 -7
  213. package/public/docs/contributor-guide/testing.html +7 -7
  214. package/public/docs/hashmap.json +1 -1
  215. package/public/docs/index.html +7 -7
  216. package/public/docs/tuning-reference/anti-patterns.html +29 -0
  217. package/public/docs/tuning-reference/aqe.html +29 -0
  218. package/public/docs/tuning-reference/bottleneck-broadcast-sizing.html +29 -0
  219. package/public/docs/tuning-reference/bottleneck-cold-start.html +35 -0
  220. package/public/docs/tuning-reference/bottleneck-duplicate-plan-subtree.html +30 -0
  221. package/public/docs/tuning-reference/bottleneck-failures.html +35 -0
  222. package/public/docs/tuning-reference/bottleneck-gc.html +34 -0
  223. package/public/docs/tuning-reference/bottleneck-job-failure-rate.html +37 -0
  224. package/public/docs/tuning-reference/bottleneck-memory-utilization.html +35 -0
  225. package/public/docs/tuning-reference/bottleneck-retry-waste.html +30 -0
  226. package/public/docs/tuning-reference/bottleneck-shuffle.html +40 -0
  227. package/public/docs/tuning-reference/bottleneck-skew.html +42 -0
  228. package/public/docs/tuning-reference/bottleneck-slow-host.html +35 -0
  229. package/public/docs/tuning-reference/bottleneck-small-files.html +33 -0
  230. package/public/docs/tuning-reference/bottleneck-spill.html +34 -0
  231. package/public/docs/tuning-reference/bottleneck-straggler.html +35 -0
  232. package/public/docs/tuning-reference/bottleneck-tiny-tasks.html +36 -0
  233. package/public/docs/tuning-reference/bottleneck-utilization.html +34 -0
  234. package/public/docs/tuning-reference/caching.html +29 -0
  235. package/public/docs/tuning-reference/cluster-config.html +29 -0
  236. package/public/docs/tuning-reference/config.html +29 -0
  237. package/public/docs/tuning-reference/data-formats.html +29 -0
  238. package/public/docs/tuning-reference/index.html +29 -0
  239. package/public/docs/tuning-reference/intro.html +29 -0
  240. package/public/docs/tuning-reference/joins.html +29 -0
  241. package/public/docs/tuning-reference/memory-model.html +29 -0
  242. package/public/docs/tuning-reference/metrics.html +29 -0
  243. package/public/docs/tuning-reference/partitioning.html +29 -0
  244. package/public/docs/tuning-reference/pyspark.html +34 -0
  245. package/public/docs/tuning-reference/shuffle.html +29 -0
  246. package/public/docs/tuning-reference/spark-architecture.html +29 -0
  247. package/public/docs/tuning-reference/table-formats.html +29 -0
  248. package/public/docs/user-guide/alternative-log-retrieval.html +29 -0
  249. package/public/docs/user-guide/getting-started.html +8 -8
  250. package/public/docs/user-guide/mcp-tools.html +41 -11
  251. package/public/docs/user-guide/run-comparison.html +7 -7
  252. package/public/docs/user-guide/understanding-findings.html +7 -7
  253. package/public/index.html +6 -6
  254. package/vendor-core/analyzer.js +74 -74
  255. package/vendor-core/cli/budgets.js +13 -27
  256. package/vendor-core/cli/collect-run.js +43 -19
  257. package/vendor-core/core-count.js +25 -27
  258. package/vendor-core/core-locality-ratio.js +4 -11
  259. package/vendor-core/core-time-series.js +6 -12
  260. package/vendor-core/core-usage-locality.js +3 -4
  261. package/vendor-core/detectors.js +256 -375
  262. package/vendor-core/docs-config.js +69 -21
  263. package/vendor-core/docs-content/chapters/01-intro.md +32 -0
  264. package/vendor-core/docs-content/chapters/02-spark-architecture.md +76 -0
  265. package/vendor-core/docs-content/chapters/03-memory-model.md +73 -0
  266. package/vendor-core/docs-content/chapters/04-partitioning.md +65 -0
  267. package/vendor-core/docs-content/chapters/05-joins.md +62 -0
  268. package/vendor-core/docs-content/chapters/06-shuffle.md +59 -0
  269. package/vendor-core/docs-content/chapters/07-data-formats.md +81 -0
  270. package/vendor-core/docs-content/chapters/07b-table-formats.md +56 -0
  271. package/vendor-core/docs-content/chapters/08-caching.md +58 -0
  272. package/vendor-core/docs-content/chapters/09-pyspark.md +78 -0
  273. package/vendor-core/docs-content/chapters/10-aqe.md +167 -0
  274. package/vendor-core/docs-content/chapters/11-cluster-config.md +170 -0
  275. package/vendor-core/docs-content/chapters/12-anti-patterns.md +171 -0
  276. package/vendor-core/docs-content/chapters/14-metrics.md +87 -0
  277. package/vendor-core/docs-content/chapters/15-config.md +93 -0
  278. package/vendor-core/docs-content/chapters/nav-index.json +370 -0
  279. package/vendor-core/docs-content/detection/cache.md +6 -0
  280. package/vendor-core/docs-content/detection/cfg.md +15 -0
  281. package/vendor-core/docs-content/detection/chrn.md +7 -0
  282. package/vendor-core/docs-content/detection/cold.md +4 -0
  283. package/vendor-core/docs-content/detection/cstor.md +4 -0
  284. package/vendor-core/docs-content/detection/fail.md +5 -0
  285. package/vendor-core/docs-content/detection/gc.md +4 -0
  286. package/vendor-core/docs-content/detection/host.md +5 -0
  287. package/vendor-core/docs-content/detection/incmp.md +6 -0
  288. package/vendor-core/docs-content/detection/jobs.md +4 -0
  289. package/vendor-core/docs-content/detection/local.md +7 -0
  290. package/vendor-core/docs-content/detection/mem.md +10 -0
  291. package/vendor-core/docs-content/detection/part.md +5 -0
  292. package/vendor-core/docs-content/detection/plan.md +14 -0
  293. package/vendor-core/docs-content/detection/retry.md +4 -0
  294. package/vendor-core/docs-content/detection/sfail.md +5 -0
  295. package/vendor-core/docs-content/detection/shape.md +5 -0
  296. package/vendor-core/docs-content/detection/shfl.md +4 -0
  297. package/vendor-core/docs-content/detection/skew.md +6 -0
  298. package/vendor-core/docs-content/detection/slow.md +6 -0
  299. package/vendor-core/docs-content/detection/spec.md +7 -0
  300. package/vendor-core/docs-content/detection/spill.md +7 -0
  301. package/vendor-core/docs-content/detection/strag.md +5 -0
  302. package/vendor-core/docs-content/detection/tiny.md +4 -0
  303. package/vendor-core/docs-content/detection/util.md +4 -0
  304. package/vendor-core/docs-content/diagrams/aqe-loop.dark.svg +1 -0
  305. package/vendor-core/docs-content/diagrams/aqe-loop.svg +1 -0
  306. package/vendor-core/docs-content/diagrams/broadcast-vs-shuffle.dark.svg +1 -0
  307. package/vendor-core/docs-content/diagrams/broadcast-vs-shuffle.svg +1 -0
  308. package/vendor-core/docs-content/diagrams/cache-lifecycle.dark.svg +1 -0
  309. package/vendor-core/docs-content/diagrams/cache-lifecycle.svg +1 -0
  310. package/vendor-core/docs-content/diagrams/cold-start-timeline.dark.svg +1 -0
  311. package/vendor-core/docs-content/diagrams/cold-start-timeline.svg +1 -0
  312. package/vendor-core/docs-content/diagrams/columnar-layout.dark.svg +1 -0
  313. package/vendor-core/docs-content/diagrams/columnar-layout.svg +1 -0
  314. package/vendor-core/docs-content/diagrams/container-memory.dark.svg +1 -0
  315. package/vendor-core/docs-content/diagrams/container-memory.svg +1 -0
  316. package/vendor-core/docs-content/diagrams/dag-stages.dark.svg +1 -0
  317. package/vendor-core/docs-content/diagrams/dag-stages.svg +1 -0
  318. package/vendor-core/docs-content/diagrams/driver-executor.dark.svg +1 -0
  319. package/vendor-core/docs-content/diagrams/driver-executor.svg +1 -0
  320. package/vendor-core/docs-content/diagrams/duplicate-plan-subtree.dark.svg +1 -0
  321. package/vendor-core/docs-content/diagrams/duplicate-plan-subtree.svg +1 -0
  322. package/vendor-core/docs-content/diagrams/join-strategy.dark.svg +1 -0
  323. package/vendor-core/docs-content/diagrams/join-strategy.svg +1 -0
  324. package/vendor-core/docs-content/diagrams/memory-borrowing.dark.svg +1 -0
  325. package/vendor-core/docs-content/diagrams/memory-borrowing.svg +1 -0
  326. package/vendor-core/docs-content/diagrams/memory-regions.dark.svg +1 -0
  327. package/vendor-core/docs-content/diagrams/memory-regions.svg +1 -0
  328. package/vendor-core/docs-content/diagrams/repartition-vs-coalesce.dark.svg +1 -0
  329. package/vendor-core/docs-content/diagrams/repartition-vs-coalesce.svg +1 -0
  330. package/vendor-core/docs-content/diagrams/retry-escalation-ladder.dark.svg +1 -0
  331. package/vendor-core/docs-content/diagrams/retry-escalation-ladder.svg +1 -0
  332. package/vendor-core/docs-content/diagrams/shuffle-map-reduce.dark.svg +1 -0
  333. package/vendor-core/docs-content/diagrams/shuffle-map-reduce.svg +1 -0
  334. package/vendor-core/docs-content/diagrams/spill-classification.dark.svg +1 -0
  335. package/vendor-core/docs-content/diagrams/spill-classification.svg +1 -0
  336. package/vendor-core/docs-content/diagrams/udf-execution-models.dark.svg +1 -0
  337. package/vendor-core/docs-content/diagrams/udf-execution-models.svg +1 -0
  338. package/vendor-core/docs-content/tuning/broadcast-sizing.md +78 -0
  339. package/vendor-core/docs-content/tuning/cold-start.md +81 -0
  340. package/vendor-core/docs-content/tuning/duplicate-plan-subtree.md +45 -0
  341. package/vendor-core/docs-content/tuning/failures.md +124 -0
  342. package/vendor-core/docs-content/tuning/gc.md +110 -0
  343. package/vendor-core/docs-content/tuning/job-failure-rate.md +101 -0
  344. package/vendor-core/docs-content/tuning/memory-utilization.md +58 -0
  345. package/vendor-core/docs-content/tuning/retry-waste.md +90 -0
  346. package/vendor-core/docs-content/tuning/shuffle.md +154 -0
  347. package/vendor-core/docs-content/tuning/skew.md +123 -0
  348. package/vendor-core/docs-content/tuning/slow-host.md +117 -0
  349. package/vendor-core/docs-content/tuning/small-files.md +99 -0
  350. package/vendor-core/docs-content/tuning/spill.md +114 -0
  351. package/vendor-core/docs-content/tuning/straggler.md +103 -0
  352. package/vendor-core/docs-content/tuning/tiny-tasks.md +94 -0
  353. package/vendor-core/docs-content/tuning/utilization.md +90 -0
  354. package/vendor-core/docs-site-config.js +10 -17
  355. package/vendor-core/efficiency-model.js +7 -13
  356. package/vendor-core/etl-phases.js +3 -5
  357. package/vendor-core/event-handlers.js +232 -134
  358. package/vendor-core/event-schemas.js +48 -114
  359. package/vendor-core/evidence-availability.js +5 -10
  360. package/vendor-core/evidence-report.js +72 -122
  361. package/vendor-core/export-data.js +48 -0
  362. package/vendor-core/finding-action-label.js +4 -10
  363. package/vendor-core/finding-filter-predicate.js +3 -7
  364. package/vendor-core/finding-generic-recommendation.js +112 -0
  365. package/vendor-core/finding-names.js +51 -0
  366. package/vendor-core/format-utils.js +112 -38
  367. package/vendor-core/impact-band.js +18 -24
  368. package/vendor-core/impact-estimator.js +38 -74
  369. package/vendor-core/ingest.js +7 -13
  370. package/vendor-core/job-groups.js +3 -6
  371. package/vendor-core/list-runs.js +278 -0
  372. package/vendor-core/load-vendored.js +6 -12
  373. package/vendor-core/log-header-peek.js +81 -0
  374. package/vendor-core/lz4-block.js +4 -6
  375. package/vendor-core/mcp-server-factory.js +38 -8
  376. package/vendor-core/mcp-tools.js +105 -76
  377. package/vendor-core/model-assembler.js +8 -16
  378. package/vendor-core/occupancy.js +5 -9
  379. package/vendor-core/parser-worker.js +18 -27
  380. package/vendor-core/plan-dot.js +2 -5
  381. package/vendor-core/plan-duration-attribution.js +78 -29
  382. package/vendor-core/plan-graph-model.js +126 -69
  383. package/vendor-core/plan-node-detail.js +31 -17
  384. package/vendor-core/plan-summary.js +19 -8
  385. package/vendor-core/recommendation-rollup.js +35 -39
  386. package/vendor-core/redact.js +72 -16
  387. package/vendor-core/rolling-log-reassembly.js +4 -6
  388. package/vendor-core/run-comparison.js +65 -70
  389. package/vendor-core/scaling-sim.js +5 -7
  390. package/vendor-core/session-snapshot.js +1 -1
  391. package/vendor-core/shs-fetch.js +4 -6
  392. package/vendor-core/shs-load.js +9 -13
  393. package/vendor-core/shs-request.js +1 -1
  394. package/vendor-core/stage-quantiles.js +14 -0
  395. package/vendor-core/types.js +78 -18
  396. package/vendor-core/wasted-core-hours.js +7 -12
  397. package/public/assets/AutoscalingChurn-CP5OjN6v.js +0 -1
  398. package/public/assets/CacheUtilization-BjyawXL6.js +0 -1
  399. package/public/assets/CachingOpportunity-DV2ABG2G.js +0 -1
  400. package/public/assets/ConfigAudit-DMiBhAoG.js +0 -1
  401. package/public/assets/CoreUsageArea-CGYIgPnt.js +0 -1
  402. package/public/assets/Dashboard-D1_IrWRs.js +0 -12
  403. package/public/assets/ExecutorTimeline-DkaAGqQT.js +0 -1
  404. package/public/assets/Failures-Crngoicu.js +0 -1
  405. package/public/assets/GcPressure-CFXm4BnA.js +0 -1
  406. package/public/assets/IncompleteRun-BWEJTb13.js +0 -1
  407. package/public/assets/JobFailures-BmjxCA-h.js +0 -1
  408. package/public/assets/MemoryUtilization-Bu2uQJbd.js +0 -1
  409. package/public/assets/PlanExplorer-DKUwF0uz.js +0 -1
  410. package/public/assets/PlanGraphRoute-BjPSugIG.js +0 -1
  411. package/public/assets/ShuffleIO--Rur3neu.js +0 -1
  412. package/public/assets/Spill-DIMpt8c2.js +0 -1
  413. package/public/assets/TaskSkew-BDr1DbeI.js +0 -1
  414. package/public/assets/index-4id52G-A.js +0 -9
  415. package/public/assets/index-D9kwVYIO.css +0 -1
  416. package/public/assets/parser-worker-00O9WEQC.js +0 -65
  417. package/public/assets/plan-graph-vendor-vZQHG2EJ.js +0 -7
  418. package/public/assets/react-vendor-u4pyvC5Y.js +0 -9
  419. package/public/assets/useRecentFiles-46iBU9zJ.js +0 -5
  420. package/public/docs/assets/chunks/@localSearchIndexroot.DclgKtlT.js +0 -1
  421. package/public/docs/assets/chunks/theme.CoT6y5bf.js +0 -2
  422. package/public/docs/assets/contributor-guide_architecture_board-widgets.md.BtjoE_1k.js +0 -1
  423. package/public/docs/assets/contributor-guide_architecture_board-widgets.md.BtjoE_1k.lean.js +0 -1
  424. package/public/docs/assets/contributor-guide_architecture_detector-contract.md.DQyCHQNM.js +0 -1
  425. package/public/docs/assets/contributor-guide_architecture_detector-contract.md.DQyCHQNM.lean.js +0 -1
  426. package/public/docs/assets/contributor-guide_architecture_drill-down.md.BKfyDQck.js +0 -1
  427. package/public/docs/assets/contributor-guide_architecture_drill-down.md.BKfyDQck.lean.js +0 -1
  428. package/public/docs/assets/contributor-guide_architecture_state-and-history.md.DaqttKgQ.js +0 -1
  429. package/public/docs/assets/contributor-guide_architecture_state-and-history.md.DaqttKgQ.lean.js +0 -1
  430. package/public/docs/assets/contributor-guide_architecture_widget-rendering.md.Bk6Iyj9S.js +0 -1
  431. package/public/docs/assets/contributor-guide_architecture_widget-rendering.md.Bk6Iyj9S.lean.js +0 -1
  432. package/public/docs/assets/contributor-guide_contributing.md.C-lKs70I.js +0 -1
  433. package/public/docs/assets/contributor-guide_contributing.md.C-lKs70I.lean.js +0 -1
  434. package/public/docs/assets/user-guide_getting-started.md.BJdD7a7_.js +0 -3
  435. package/public/docs/assets/user-guide_getting-started.md.BJdD7a7_.lean.js +0 -1
  436. package/public/docs/assets/user-guide_understanding-findings.md.CK2WZ0Tf.js +0 -1
  437. package/public/vendor/spark-doc/anchors.json +0 -205
  438. package/public/vendor/spark-doc/index.html +0 -4202
  439. package/public/vendor/spark-doc/landing.html +0 -418
  440. package/public/vendor/spark-doc/meta.html +0 -970
@@ -26,10 +26,8 @@ function taskDataTrusted(appModel ) {
26
26
  return entry?.state === 'present';
27
27
  }
28
28
 
29
- // `Finding.value` is `number | string` (some detectors, e.g. stageFailed/
30
- // configAudit, put human-readable text there instead of a magnitude; see
31
- // types.ts). The 'spill' findings this is used for are always numeric; the
32
- // typeof guard below narrows without changing behavior for real input.
29
+ // Finding.value is number|string (some detectors put text there); spill findings are
30
+ // always numeric, so the typeof guard narrows without changing behavior for real input.
33
31
  function maxFindingValue(catalog , type ) {
34
32
  const values = catalog
35
33
  .filter((f) => f.type === type)
@@ -68,10 +66,8 @@ function checkSkew(appModel , maxSkewRatio ) {
68
66
  if (stages.length === 0) {
69
67
  return { name: 'max-skew', status: 'inconclusive', detail: 'No stage data observed in this event log.' };
70
68
  }
71
- // Recompute the true ratio per stage (not from the finding catalog): the
72
- // skew detector floors its findings at thresholds.ratioWarn (3), so a
73
- // budget stricter than that floor could never be enforced by reading
74
- // catalog findings alone.
69
+ // Recompute the true ratio per stage: the skew detector floors findings at
70
+ // thresholds.ratioWarn (3), so a stricter budget can't be enforced from catalog alone.
75
71
  const ratios = stages
76
72
  .map((stage) => computeSkewRatio(stage, SKEW_MIN_TASKS_FOR_P95))
77
73
  .filter((r) => r !== null)
@@ -96,10 +92,8 @@ function checkFailedTaskRate(appModel , catalog , maxPct
96
92
  if ((appModel.jobs?.size ?? 0) === 0) {
97
93
  return { name: 'max-failed-task-rate', status: 'inconclusive', detail: 'No job data observed in this event log.' };
98
94
  }
99
- // Jobs completed but the jobFailureRate detector never fired: job failure
100
- // rate is below its own 10% info floor (src/detectors.js), so the task
101
- // failure rate is implicitly low too. Known v1 limitation: a budget
102
- // stricter than that floor cannot be enforced.
95
+ // jobFailureRate never fired => rate below its 10% info floor, so task failure rate is
96
+ // implicitly low. v1 limitation: a budget stricter than that floor can't be enforced.
103
97
  return { name: 'max-failed-task-rate', status: 'pass', detail: `No job-failure-rate finding: task failure rate is below the detector's reporting floor.` };
104
98
  }
105
99
 
@@ -125,10 +119,8 @@ function checkRegression(comparison , maxRegressionPct
125
119
  if (!row || row.direction === 'unavailable' || row.baseline == null || row.delta == null) {
126
120
  return { name: 'max-regression', status: 'inconclusive', detail: `Metric "${regressionMetric}" is unavailable for this comparison.` };
127
121
  }
128
- // A neutral-direction metric (inputBytes, outputBytes, taskCount,
129
- // executorsAdded — see NEUTRAL_METRIC_KEYS in run-comparison.ts) measures
130
- // workload volume, not performance: an increase isn't a regression, so a
131
- // regression budget can't be meaningfully evaluated against it either way.
122
+ // A neutral-direction metric (inputBytes/outputBytes/taskCount/executorsAdded) measures
123
+ // workload volume, not performance: an increase isn't a regression, so no direction to check.
132
124
  if (row.direction === 'neutral') {
133
125
  return { name: 'max-regression', status: 'inconclusive', detail: `Metric "${regressionMetric}" measures workload volume, not performance: it has no regression direction to check.` };
134
126
  }
@@ -156,8 +148,7 @@ function checkFailOnIntroduced(comparison , band )
156
148
  : { name: 'fail-on-introduced', status: 'pass', detail: `No introduced findings match "${band}".` };
157
149
  }
158
150
 
159
- // Shared by both comparison-dependent budgets below: each needs the same
160
- // "no comparison yet -> inconclusive" fallback instead of actually checking.
151
+ // Both comparison-dependent budgets share the "no comparison yet -> inconclusive" fallback.
161
152
  function pushComparisonBudget(
162
153
  results ,
163
154
  comparison ,
@@ -176,18 +167,13 @@ export function evaluateBudgets({ appModel, catalog, budgets, comparison }
176
167
  if (Number.isFinite(budgets.maxSkewRatio)) results.push(checkSkew(appModel, budgets.maxSkewRatio ));
177
168
  if (Number.isFinite(budgets.maxFailedTaskRatePct)) results.push(checkFailedTaskRate(appModel, catalog, budgets.maxFailedTaskRatePct ));
178
169
  if (Number.isFinite(budgets.minEfficiencyPct)) results.push(checkEfficiency(appModel, budgets.minEfficiencyPct ));
179
- // Guarded here (not just at the CLI/mcp-tools call sites) so any caller of
180
- // evaluateBudgets() gets this for free: regressionMetric with no
181
- // maxRegressionPct would otherwise skip the whole `if` below silently,
182
- // reporting nothing at all instead of a visible inconclusive result.
170
+ // Guarded here so any evaluateBudgets caller benefits: regressionMetric without
171
+ // maxRegressionPct would otherwise skip the `if` silently, reporting nothing.
183
172
  if (budgets.regressionMetric !== undefined && budgets.maxRegressionPct === undefined) {
184
173
  results.push({ name: 'max-regression', status: 'inconclusive', detail: `regressionMetric "${budgets.regressionMetric}" was set without maxRegressionPct; the regression budget was not evaluated.` });
185
174
  } else if (budgets.maxRegressionPct !== undefined) {
186
- // `!== undefined`, not `Number.isFinite`: a zero-baseline regression's pct
187
- // is itself `Infinity` (see checkRegression), so an "unlimited" budget is a
188
- // legitimate finite-typed-as-number input here (CLI's own flag validation
189
- // already rejects non-finite --max-regression-pct input, so this only
190
- // widens what a direct evaluateBudgets caller, e.g. a test, can express).
175
+ // `!== undefined`, not Number.isFinite: a zero-baseline regression's pct is Infinity,
176
+ // so an "unlimited" budget is a legitimate input (the CLI already rejects non-finite flags).
191
177
  pushComparisonBudget(results, comparison, 'max-regression',
192
178
  (c) => checkRegression(c, budgets.maxRegressionPct , budgets.regressionMetric ?? 'wallClock'));
193
179
  }
@@ -1,4 +1,4 @@
1
- import { readFileSync, readdirSync, statSync } from 'node:fs';
1
+ import { readFileSync, readdirSync, statSync, openSync, readSync, closeSync } from 'node:fs';
2
2
  import { join, basename } from 'node:path';
3
3
  import { createState, runParse, runParseFiles, reassembleRollingEntries } from '../parser-worker.js';
4
4
  import { createModelCallbacks } from '../model-assembler.js';
@@ -23,8 +23,7 @@ export function emptyAppModel() {
23
23
  };
24
24
  }
25
25
 
26
- // Mirrors tests/parser-worker.test.js's fakeFile: the proven File-like shape
27
- // runParse/runParseFiles need (name, size, slice().arrayBuffer(), arrayBuffer()).
26
+ // File-like shape runParse/runParseFiles need: name, size, slice().arrayBuffer(), arrayBuffer().
28
27
  export function nodeFileFromPath(path ) {
29
28
  const bytes = readFileSync(path);
30
29
  const u8 = new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);
@@ -39,27 +38,53 @@ export function nodeFileFromPath(path ) {
39
38
  };
40
39
  }
41
40
 
42
- // Delegates to src/ingest.js's routeMessage: the single source of truth for
43
- // worker-message-type -> handler-callback wiring, shared by the browser
44
- // Worker context and this synchronous-in-Node CLI path. No pendingTaskRequests
45
- // map: the CLI never sends a 'getTaskData' request, so it never receives a
46
- // 'taskData' message back.
41
+ // Lazy-loading variant for peekLogHeader: only reads the requested byte range from disk,
42
+ // avoiding eager full-file slurps for large logs during directory scans.
43
+ // Used by list_runs local-mode scanning; does NOT have arrayBuffer() since peekLogHeader
44
+ // only needs slice() for bounded reads of the file header.
45
+ export function nodeLazyPeekableFromPath(path )
46
+
47
+
48
+
49
+ {
50
+ const size = statSync(path).size;
51
+ return {
52
+ name: basename(path),
53
+ size,
54
+ slice(start , end ) {
55
+ return {
56
+ async arrayBuffer() {
57
+ const len = Math.max(0, Math.min(end, size) - start);
58
+ if (len === 0) return new ArrayBuffer(0);
59
+ const buf = Buffer.alloc(len);
60
+ const fd = openSync(path, 'r');
61
+ try {
62
+ readSync(fd, buf, 0, len, start);
63
+ } finally {
64
+ closeSync(fd);
65
+ }
66
+ return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
67
+ },
68
+ };
69
+ },
70
+ };
71
+ }
72
+
73
+ // routeMessage is the single source of truth for worker-message -> handler wiring, shared by
74
+ // the browser Worker and this Node CLI path. No pendingTaskRequests: the CLI never sends
75
+ // 'getTaskData', so never receives 'taskData' back.
47
76
  export function dispatch(msg , handlers ) {
48
77
  routeMessage(msg , handlers);
49
78
  }
50
79
 
51
- function isRollingLogDirectory(dirPath ) {
80
+ export function isRollingLogDirectory(dirPath ) {
52
81
  const names = readdirSync(dirPath);
53
82
  return names.some((n ) => /^events_\d+_/.test(n));
54
83
  }
55
84
 
56
- // Shared ingest scaffold for both consumers of routeMessage's onDone/onError
57
- // dispatch pattern (this file's collectRun, over a local file/dir, and
58
- // shs-load.ts's collectShsAppModel, over fetched archive bytes): builds a
59
- // fresh AppModel wired to the shared handlers, then hands `run` a
60
- // (state, emit, reject) triple so each caller only supplies its own decode
61
- // step (and its own error type via `onDecodeError` — a plain Error here, an
62
- // mcpError over in shs-load.ts).
85
+ // Shared ingest scaffold for both routeMessage consumers (this file's collectRun over a
86
+ // local file/dir, shs-load.ts's collectShsAppModel over fetched bytes): each caller supplies
87
+ // its own decode step and error type via onDecodeError.
63
88
  export function collectViaDispatch(
64
89
  run ,
65
90
  onDecodeError ,
@@ -96,9 +121,8 @@ export async function collectRun(inputPath )
96
121
  return;
97
122
  }
98
123
  const files = ordered.map((name) => nodeFileFromPath(join(inputPath, name)));
99
- // .catch(reject), not void: an unexpected throw past the parser's own
100
- // guards (e.g. in decoder.flush) would otherwise leave this Promise
101
- // pending forever and surface only as an unhandled rejection.
124
+ // .catch(reject), not void: a throw past the parser's guards would otherwise leave
125
+ // this Promise pending forever, surfacing only as an unhandled rejection.
102
126
  runParseFiles(files, state, { emit }).catch(reject);
103
127
  } else {
104
128
  runParse(nodeFileFromPath(inputPath), state, { emit }).catch(reject);
@@ -1,6 +1,4 @@
1
- // Total cores computation: sum real executor totalCores, or fallback to
2
- // peakExecutors × configured cores. Used by efficiency model, scaling simulator,
3
- // wasted core-hours calculation, and utilization/memory-utilization detectors.
1
+ // Total cores: sum executor totalCores, else peakExecutors x configured cores.
4
2
  export function computeTotalCores(app , executorsAdded ) {
5
3
  let total = executorsAdded.reduce((s, e) => s + (e.totalCores ?? 0), 0);
6
4
  if (total <= 0) {
@@ -10,19 +8,11 @@ export function computeTotalCores(app
10
8
  return total;
11
9
  }
12
10
 
13
- // Peak concurrently-alive core count: sweeps add/remove events by timestamp
14
- // (add contributes +totalCores at its own executorId, remove contributes
15
- // -totalCores looked up from that same executorId) and tracks the running
16
- // total's max, rather than summing every addition regardless of overlap.
17
- // computeTotalCores's cumulative sum overstates capacity under dynamic
18
- // allocation/executor replacement, since a churned-through executor's cores
19
- // are never actually concurrent with its replacement's; this is the
20
- // concurrency-aware sibling used to bound the impact estimator's ceiling
21
- // (src/occupancy.ts's computeCeiling) against that inflation.
22
- // Tie-break same-timestamp events by delta ascending, so a removal is applied
23
- // before a same-instant replacement's addition: without this, a seamless swap
24
- // (old executor gone exactly when its replacement joins) would momentarily
25
- // double-count both as concurrent.
11
+ // Peak concurrently-alive core count: sweep add/remove events by timestamp, track running max,
12
+ // rather than summing every addition. A cumulative sum overstates capacity under dynamic
13
+ // allocation (a churned-through executor's cores were never concurrent with its replacement's).
14
+ // Tie-break same-timestamp events by delta ascending so a removal applies before a same-instant
15
+ // addition; else a seamless swap would momentarily double-count both as concurrent.
26
16
  function sweepPeak(events ) {
27
17
  const sorted = [...events].sort((a, b) => a.time - b.time || a.delta - b.delta);
28
18
  let running = 0;
@@ -41,28 +31,36 @@ export function computePeakConcurrentCores(
41
31
  ) {
42
32
  const coresByExecutor = new Map ();
43
33
  const coreEvents = [];
44
- const countEvents = [];
45
34
  for (const e of executorsAdded) {
46
35
  const cores = e.totalCores ?? 0;
47
36
  coresByExecutor.set(e.executorId, cores);
48
37
  coreEvents.push({ time: e.timestamp, delta: cores });
49
- countEvents.push({ time: e.timestamp, delta: 1 });
50
38
  }
51
39
  for (const e of executorsRemoved) {
52
40
  const cores = coresByExecutor.get(e.executorId) ?? 0;
53
41
  coreEvents.push({ time: e.timestamp, delta: -cores });
54
- countEvents.push({ time: e.timestamp, delta: -1 });
55
42
  }
56
43
  const peak = sweepPeak(coreEvents);
57
44
  if (peak > 0) return peak;
58
- // Real totalCores data is missing/zero for every add event, so the cores
59
- // sweep above can't tell us anything. Falling back to
60
- // `executorsAdded.length * cores` here would reintroduce the exact
61
- // cumulative-historical-additions overcount this function exists to avoid
62
- // (a churned-through executor and its replacement both counted, even
63
- // though they were never alive at once). Sweep peak *executor count*
64
- // instead: still concurrency-aware, just cores-blind.
65
- const peakExecutorCount = sweepPeak(countEvents);
45
+ // totalCores missing/zero for every add, so the cores sweep is blind. Falling back to
46
+ // executorsAdded.length * cores would reintroduce the cumulative overcount this avoids;
47
+ // sweep peak executor count instead: concurrency-aware, cores-blind.
48
+ const peakExecutorCount = computePeakConcurrentExecutorCount(executorsAdded, executorsRemoved);
66
49
  const cores = app.resources?.executor?.cores ?? null;
67
50
  return cores != null ? peakExecutorCount * cores : 0;
68
51
  }
52
+
53
+ // Peak concurrently-alive executor COUNT (not cores): the denominator memoryUtilization's
54
+ // per-executor waste math (allocatedMB x executor count) needs. Same sweep as
55
+ // computePeakConcurrentCores, over add/remove events rather than cores, so a churned-through
56
+ // executor's slot is never double-counted against its replacement's.
57
+ export function computePeakConcurrentExecutorCount(
58
+ executorsAdded ,
59
+ executorsRemoved ,
60
+ ) {
61
+ const countEvents = [
62
+ ...executorsAdded.map((e) => ({ time: e.timestamp, delta: 1 })),
63
+ ...executorsRemoved.map((e) => ({ time: e.timestamp, delta: -1 })),
64
+ ];
65
+ return sweepPeak(countEvents);
66
+ }
@@ -1,14 +1,7 @@
1
- // Whole-run core-usage-locality ratio: non-local task share across every
2
- // stage's `stage.localityStats`. Mirrors wasted-core-hours.js's shape (pure
3
- // reducer, no detector or view coupling), importable by both the
4
- // `coreLocality` detector (src/detectors.js) and CoreUsageArea.tsx's
5
- // stage-breakdown list.
6
- //
7
- // Locality classification (Spark, best to worst): PROCESS_LOCAL > NODE_LOCAL
8
- // > NO_PREF > RACK_LOCAL > ANY. NO_PREF is not a locality failure; it's what
9
- // shuffle-read stages report because there's no location-preference concept
10
- // for a shuffle fetch, so it stays in the denominator (diluting the ratio for
11
- // shuffle-heavy stages, which is correct) but never in the numerator.
1
+ // Whole-run core-usage-locality ratio: non-local task share across every stage's localityStats.
2
+ // Locality tiers (Spark, best to worst): PROCESS_LOCAL > NODE_LOCAL > NO_PREF > RACK_LOCAL > ANY.
3
+ // NO_PREF is not a locality failure (shuffle-read stages report it, no location preference for a
4
+ // shuffle fetch), so it stays in the denominator but never the numerator.
12
5
  const NON_LOCAL_TIERS = new Set(['RACK_LOCAL', 'ANY']);
13
6
  const TOP_N = 5;
14
7
  const MIN_TASKS_PER_STAGE = 10;
@@ -1,11 +1,7 @@
1
- // Sweep-line "busy cores over time" computation. Pure and side-effect-free so
2
- // it can run inside parser-worker.js (over retained task launch/finish
3
- // timestamps) or on the main thread (scaling simulator). One core per task:
4
- // Spark's default task-to-core mapping.
5
- //
6
- // `hypotheticalCores` clamps the concurrent busy-core count to N (the
7
- // deterministic "utilization at N cores" curve). It does NOT re-schedule tasks;
8
- // makespan re-estimation is the scaling simulator's job, layered on this signal.
1
+ // Sweep-line "busy cores over time". Pure so it runs in parser-worker (over retained task
2
+ // timestamps) or on the main thread (scaling simulator). One core per task: Spark's default.
3
+ // `hypotheticalCores` clamps the concurrent busy-core count to N; it does NOT re-schedule
4
+ // tasks (makespan re-estimation is the scaling simulator's job, layered on this signal).
9
5
 
10
6
 
11
7
 
@@ -19,18 +15,16 @@
19
15
 
20
16
 
21
17
  function buildStepFunction(intervals , hypotheticalCores ) {
22
- // Emit +1 at launch, -1 at finish. Skip empty/negative intervals.
23
18
  const events = [];
24
19
  for (const { launch, finish } of intervals) {
25
20
  if (!(finish > launch)) continue;
26
21
  events.push({ t: launch, delta: 1 });
27
22
  events.push({ t: finish, delta: -1 });
28
23
  }
29
- // Sort by time; at equal time process -1 before +1 so [launch, finish) is
30
- // half-open (a task finishing exactly as another launches does not overlap).
24
+ // At equal time process -1 before +1 so [launch, finish) is half-open (a task finishing
25
+ // exactly as another launches does not overlap).
31
26
  events.sort((a, b) => (a.t - b.t) || (a.delta - b.delta));
32
27
 
33
- // Walk consecutive timestamps, emitting the busy level held on each interval.
34
28
  const segments = [];
35
29
  let busy = 0;
36
30
  for (let i = 0; i < events.length; i++) {
@@ -1,7 +1,6 @@
1
- // Stage-granular approximation of core-usage-by-locality over time. See the
2
- // plan's Task 6 DEVIATION note: per-task locality is not retained, so this
3
- // distributes each stage's executorRunTime across its wall-clock window,
4
- // split by localityStats proportions. Not exact; approximate by construction.
1
+ // Stage-granular approximation of core-usage-by-locality over time. Per-task locality is not
2
+ // retained, so this distributes each stage's executorRunTime across its wall-clock window,
3
+ // split by localityStats proportions. Approximate by construction.
5
4
  export const LOCALITY_TIERS = ['PROCESS_LOCAL', 'NODE_LOCAL', 'RACK_LOCAL', 'NO_PREF', 'ANY'];
6
5
 
7
6