sparkforensics-server 0.5.1 → 0.5.2

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 (199) hide show
  1. package/package.json +1 -1
  2. package/public/assets/{AutoscalingChurn-5hDGIXi4.js → AutoscalingChurn-8t3U3isq.js} +1 -1
  3. package/public/assets/{CacheUtilization-CT2SCnJJ.js → CacheUtilization-CJs9tTum.js} +1 -1
  4. package/public/assets/CachingOpportunity-D1NcHs0V.js +1 -0
  5. package/public/assets/{ColdStart-B38OiAOp.js → ColdStart-CdRJ9gD8.js} +1 -1
  6. package/public/assets/{ConfigAudit-BoplryCH.js → ConfigAudit-B5Gbe5js.js} +1 -1
  7. package/public/assets/CoreUsageArea-a--NTRGY.js +1 -0
  8. package/public/assets/{Dashboard-BgKodJl2.js → Dashboard-C1hNeX49.js} +2 -2
  9. package/public/assets/DisclosureContext-ZpE6CkHx.js +1 -0
  10. package/public/assets/{DuplicatePlanSubtree-BqS2A2j4.js → DuplicatePlanSubtree-dobXdz7E.js} +1 -1
  11. package/public/assets/{ExecutorUtilization-Dp52QGWo.js → ExecutorUtilization-D9grwi7t.js} +1 -1
  12. package/public/assets/{GcPressure-CT1yzR_s.js → GcPressure-8-G2ri10.js} +1 -1
  13. package/public/assets/{IncompleteRun-C7Qkjtjn.js → IncompleteRun-B91lky7a.js} +1 -1
  14. package/public/assets/{JobFailures-WHl3ELfh.js → JobFailures-BsWvBMyJ.js} +1 -1
  15. package/public/assets/{MemoryUtilization-D8IUDHJI.js → MemoryUtilization-BM5schZI.js} +1 -1
  16. package/public/assets/{OverBroadcast-6oSSAQ_R.js → OverBroadcast-DdN8JIJH.js} +1 -1
  17. package/public/assets/{PartitionSizing-BwdFL-mw.js → PartitionSizing-CY5HDYtp.js} +1 -1
  18. package/public/assets/{PlanExplorer-DcxmiQWL.js → PlanExplorer-DgHCDBD_.js} +1 -1
  19. package/public/assets/PlanGraphRoute-DH3KJb8j.js +1 -0
  20. package/public/assets/{RetryWaste-BTbeHkJc.js → RetryWaste-DOnE9vGF.js} +1 -1
  21. package/public/assets/{ShuffleIO-CRhrYNE0.js → ShuffleIO-MMnDESkF.js} +1 -1
  22. package/public/assets/{Skew-DSNXRG9V.js → Skew-BmZZJ5ms.js} +1 -1
  23. package/public/assets/{SlowHost-B7Lwu2EU.js → SlowHost-CsJzfEqo.js} +1 -1
  24. package/public/assets/{SmallFiles-C082c2rd.js → SmallFiles-BoK3R1Ex.js} +1 -1
  25. package/public/assets/{SpeculationWaste-BS2vpadr.js → SpeculationWaste-CnVxB5AJ.js} +1 -1
  26. package/public/assets/Spill-BhNicyBy.js +1 -0
  27. package/public/assets/{StageFailed-D3ac9Sou.js → StageFailed-mAhHU4l_.js} +1 -1
  28. package/public/assets/StageFindingGroup-BEtPWcT0.js +1 -0
  29. package/public/assets/{StageHeader-pI1nTwVf.js → StageHeader-DJkYkrsU.js} +1 -1
  30. package/public/assets/{StageShape-eO5le8iG.js → StageShape-BDxRknLp.js} +1 -1
  31. package/public/assets/{StageSlowness-BaNyfNvL.js → StageSlowness-BPRw-otN.js} +1 -1
  32. package/public/assets/{Straggler-D5Fnok_y.js → Straggler-CZCbnOWP.js} +1 -1
  33. package/public/assets/{TaskFailures-BWnC-K_G.js → TaskFailures-C57YcLFQ.js} +1 -1
  34. package/public/assets/{TinyTask-8_5lpq_2.js → TinyTask-Bi84qU7n.js} +1 -1
  35. package/public/assets/{UnderBroadcast-DJ0XSwth.js → UnderBroadcast-DdQV7htE.js} +1 -1
  36. package/public/assets/{finding-anchor-Cys8Z6Yn.js → finding-anchor-Cl6_5hfV.js} +1 -1
  37. package/public/assets/{impact-sort-BTQndbof.js → impact-sort-CssZ6MT2.js} +1 -1
  38. package/public/assets/index-2h_TgUAb.css +2 -0
  39. package/public/assets/index-B-03mG7K.js +14 -0
  40. package/public/assets/{parser-worker-DmeCnLWU.js → parser-worker-CA5RxqKc.js} +8 -8
  41. package/public/assets/{select-DIYN6D3y.js → select-CQjNhprm.js} +1 -1
  42. package/public/assets/{usePagedRows-BxvdFnPk.js → usePagedRows-Dyl6T8Ok.js} +1 -1
  43. package/public/assets/useRecentFiles-XZEnLlal.js +11 -0
  44. package/public/assets/{useSortMode-B8SRfAoG.js → useSortMode-Dhvit8dt.js} +1 -1
  45. package/public/docs/404.html +2 -2
  46. package/public/docs/assets/{app.D2GqAkhy.js → app.eYTPqTeq.js} +1 -1
  47. package/public/docs/assets/chunks/@localSearchIndexroot.u_e5bQz4.js +1 -0
  48. package/public/docs/assets/chunks/{VPLocalSearchBox.BS4cSmtW.js → VPLocalSearchBox.DsZrQKQR.js} +1 -1
  49. package/public/docs/assets/chunks/{theme.BuxVpb0H.js → theme.DsTNE2pE.js} +2 -2
  50. package/public/docs/assets/contributor-guide_architecture_detector-contract_threshold-tables.md.CKjWG56Y.js +1 -0
  51. package/public/docs/assets/contributor-guide_architecture_state-and-history_run-comparison-internals.md.CZA0JLtV.js +1 -0
  52. package/public/docs/assets/{contributor-guide_architecture_state-and-history_run-comparison-internals.md.uuAKpY0Y.lean.js → contributor-guide_architecture_state-and-history_run-comparison-internals.md.CZA0JLtV.lean.js} +1 -1
  53. package/public/docs/assets/contributor-guide_architecture_worker-protocol_cli-and-mcp.md.DC1YqXBp.js +1 -0
  54. package/public/docs/assets/{user-guide_getting-started_ci-and-automation.md.DpnfKz3x.js → user-guide_getting-started_ci-and-automation.md.OUQqw3mI.js} +5 -4
  55. package/public/docs/assets/user-guide_getting-started_ci-and-automation.md.OUQqw3mI.lean.js +1 -0
  56. package/public/docs/assets/{user-guide_mcp-tools_compare-runs.md.CPowlb2q.js → user-guide_mcp-tools_compare-runs.md.Cc_gLoix.js} +3 -2
  57. package/public/docs/assets/{user-guide_mcp-tools_compare-runs.md.CPowlb2q.lean.js → user-guide_mcp-tools_compare-runs.md.Cc_gLoix.lean.js} +1 -1
  58. package/public/docs/assets/{user-guide_mcp-tools_evaluate-budgets.md.Dq5Azk8G.js → user-guide_mcp-tools_evaluate-budgets.md.BB0nDY3Z.js} +2 -2
  59. package/public/docs/assets/{user-guide_mcp-tools_evaluate-budgets.md.Dq5Azk8G.lean.js → user-guide_mcp-tools_evaluate-budgets.md.BB0nDY3Z.lean.js} +1 -1
  60. package/public/docs/assets/user-guide_run-comparison.md.BUALkohi.js +1 -0
  61. package/public/docs/assets/user-guide_run-comparison.md.BUALkohi.lean.js +1 -0
  62. package/public/docs/assets/user-guide_run-comparison_how-stages-are-matched.md.DSXGu2tA.js +1 -0
  63. package/public/docs/assets/user-guide_run-comparison_how-stages-are-matched.md.DSXGu2tA.lean.js +1 -0
  64. package/public/docs/assets/user-guide_understanding-findings.md.C9YRruMT.js +1 -0
  65. package/public/docs/assets/user-guide_understanding-findings.md.C9YRruMT.lean.js +1 -0
  66. package/public/docs/contributor-guide/architecture/board-widgets/caching-and-memory.html +3 -3
  67. package/public/docs/contributor-guide/architecture/board-widgets/plan-advisor.html +3 -3
  68. package/public/docs/contributor-guide/architecture/board-widgets/visual-system-and-templating.html +3 -3
  69. package/public/docs/contributor-guide/architecture/board-widgets.html +3 -3
  70. package/public/docs/contributor-guide/architecture/detector-contract/plan-attribution.html +3 -3
  71. package/public/docs/contributor-guide/architecture/detector-contract/threshold-tables.html +5 -5
  72. package/public/docs/contributor-guide/architecture/detector-contract.html +3 -3
  73. package/public/docs/contributor-guide/architecture/drill-down/plan-graph.html +3 -3
  74. package/public/docs/contributor-guide/architecture/drill-down.html +3 -3
  75. package/public/docs/contributor-guide/architecture/impact-estimation/caveats-tuning-and-coverage.html +3 -3
  76. package/public/docs/contributor-guide/architecture/impact-estimation/stage-union-rollup.html +3 -3
  77. package/public/docs/contributor-guide/architecture/impact-estimation.html +3 -3
  78. package/public/docs/contributor-guide/architecture/index.html +3 -3
  79. package/public/docs/contributor-guide/architecture/overview.html +3 -3
  80. package/public/docs/contributor-guide/architecture/state-and-history/history-server-intake.html +3 -3
  81. package/public/docs/contributor-guide/architecture/state-and-history/run-comparison-internals.html +5 -5
  82. package/public/docs/contributor-guide/architecture/state-and-history.html +3 -3
  83. package/public/docs/contributor-guide/architecture/widget-rendering/findings-tab.html +3 -3
  84. package/public/docs/contributor-guide/architecture/widget-rendering/investigation-routing.html +3 -3
  85. package/public/docs/contributor-guide/architecture/widget-rendering/list-sort-mode.html +3 -3
  86. package/public/docs/contributor-guide/architecture/widget-rendering/reference-section.html +3 -3
  87. package/public/docs/contributor-guide/architecture/widget-rendering/row-expand-contract.html +3 -3
  88. package/public/docs/contributor-guide/architecture/widget-rendering.html +3 -3
  89. package/public/docs/contributor-guide/architecture/worker-protocol/cli-and-mcp.html +5 -5
  90. package/public/docs/contributor-guide/architecture/worker-protocol/core-and-event-validation.html +3 -3
  91. package/public/docs/contributor-guide/architecture/worker-protocol/evidence-availability.html +3 -3
  92. package/public/docs/contributor-guide/architecture/worker-protocol/evidence-report.html +3 -3
  93. package/public/docs/contributor-guide/architecture/worker-protocol.html +3 -3
  94. package/public/docs/contributor-guide/contributing.html +3 -3
  95. package/public/docs/contributor-guide/development-setup.html +3 -3
  96. package/public/docs/contributor-guide/testing.html +3 -3
  97. package/public/docs/hashmap.json +1 -1
  98. package/public/docs/index.html +3 -3
  99. package/public/docs/tuning-reference/anti-patterns.html +3 -3
  100. package/public/docs/tuning-reference/aqe.html +3 -3
  101. package/public/docs/tuning-reference/bottleneck-broadcast-sizing.html +3 -3
  102. package/public/docs/tuning-reference/bottleneck-cold-start.html +3 -3
  103. package/public/docs/tuning-reference/bottleneck-duplicate-plan-subtree.html +3 -3
  104. package/public/docs/tuning-reference/bottleneck-failures.html +3 -3
  105. package/public/docs/tuning-reference/bottleneck-gc.html +3 -3
  106. package/public/docs/tuning-reference/bottleneck-job-failure-rate.html +3 -3
  107. package/public/docs/tuning-reference/bottleneck-memory-utilization.html +3 -3
  108. package/public/docs/tuning-reference/bottleneck-retry-waste.html +3 -3
  109. package/public/docs/tuning-reference/bottleneck-shuffle.html +3 -3
  110. package/public/docs/tuning-reference/bottleneck-skew.html +3 -3
  111. package/public/docs/tuning-reference/bottleneck-slow-host.html +3 -3
  112. package/public/docs/tuning-reference/bottleneck-small-files.html +3 -3
  113. package/public/docs/tuning-reference/bottleneck-spill.html +3 -3
  114. package/public/docs/tuning-reference/bottleneck-straggler.html +3 -3
  115. package/public/docs/tuning-reference/bottleneck-tiny-tasks.html +3 -3
  116. package/public/docs/tuning-reference/bottleneck-utilization.html +3 -3
  117. package/public/docs/tuning-reference/caching.html +3 -3
  118. package/public/docs/tuning-reference/cluster-config.html +3 -3
  119. package/public/docs/tuning-reference/config.html +3 -3
  120. package/public/docs/tuning-reference/data-formats.html +3 -3
  121. package/public/docs/tuning-reference/index.html +3 -3
  122. package/public/docs/tuning-reference/intro.html +3 -3
  123. package/public/docs/tuning-reference/joins.html +3 -3
  124. package/public/docs/tuning-reference/memory-model.html +3 -3
  125. package/public/docs/tuning-reference/metrics.html +3 -3
  126. package/public/docs/tuning-reference/partitioning.html +3 -3
  127. package/public/docs/tuning-reference/pyspark.html +3 -3
  128. package/public/docs/tuning-reference/shuffle.html +3 -3
  129. package/public/docs/tuning-reference/spark-architecture.html +3 -3
  130. package/public/docs/tuning-reference/table-formats.html +3 -3
  131. package/public/docs/user-guide/alternative-log-retrieval/managed-platforms.html +3 -3
  132. package/public/docs/user-guide/alternative-log-retrieval/ssh-bastion.html +3 -3
  133. package/public/docs/user-guide/alternative-log-retrieval.html +3 -3
  134. package/public/docs/user-guide/getting-started/ci-and-automation.html +8 -7
  135. package/public/docs/user-guide/getting-started/reading-the-dashboard.html +3 -3
  136. package/public/docs/user-guide/getting-started/regression-metric-keys.html +3 -3
  137. package/public/docs/user-guide/getting-started/tuning-thresholds.html +3 -3
  138. package/public/docs/user-guide/getting-started.html +3 -3
  139. package/public/docs/user-guide/mcp-tools/compare-runs.html +7 -6
  140. package/public/docs/user-guide/mcp-tools/diagnose-run.html +3 -3
  141. package/public/docs/user-guide/mcp-tools/evaluate-budgets.html +5 -5
  142. package/public/docs/user-guide/mcp-tools/get-finding-documentation.html +3 -3
  143. package/public/docs/user-guide/mcp-tools/get-finding-evidence.html +3 -3
  144. package/public/docs/user-guide/mcp-tools/get-reference-doc.html +3 -3
  145. package/public/docs/user-guide/mcp-tools/get-run-summary.html +3 -3
  146. package/public/docs/user-guide/mcp-tools/list-runs.html +3 -3
  147. package/public/docs/user-guide/mcp-tools.html +3 -3
  148. package/public/docs/user-guide/run-comparison/how-stages-are-matched.html +5 -5
  149. package/public/docs/user-guide/run-comparison.html +5 -5
  150. package/public/docs/user-guide/understanding-findings.html +5 -5
  151. package/public/export-template.html +3 -3
  152. package/public/index.html +3 -3
  153. package/vendor-core/cli/budgets.js +62 -2
  154. package/vendor-core/cli/regression-budgets.js +35 -0
  155. package/vendor-core/comparison-output.js +2 -1
  156. package/vendor-core/core-source-hash.txt +1 -1
  157. package/vendor-core/detectors.js +219 -56
  158. package/vendor-core/docs-content/detection/chrn.md +3 -1
  159. package/vendor-core/docs-content/detection/cold.md +2 -1
  160. package/vendor-core/docs-content/detection/plan.md +9 -2
  161. package/vendor-core/docs-content/detection/shfl.md +8 -2
  162. package/vendor-core/docs-content/detection/skew.md +11 -5
  163. package/vendor-core/docs-content/detection/slow.md +6 -2
  164. package/vendor-core/docs-content/detection/spill.md +4 -1
  165. package/vendor-core/docs-content/detection/strag.md +5 -3
  166. package/vendor-core/docs-content/detection/tiny.md +3 -2
  167. package/vendor-core/evidence-report.js +11 -11
  168. package/vendor-core/finding-presentation.js +39 -13
  169. package/vendor-core/finding-types.js +50 -6
  170. package/vendor-core/mcp-server-factory.js +6 -2
  171. package/vendor-core/mcp-tools.js +10 -1
  172. package/vendor-core/median.js +8 -0
  173. package/vendor-core/run-comparison.js +2 -0
  174. package/vendor-core/sequence-alignment.js +83 -0
  175. package/vendor-core/stage-alignment.js +387 -63
  176. package/vendor-core/stage-quantiles.js +3 -1
  177. package/vendor-core/stage-structure.js +83 -0
  178. package/public/assets/CachingOpportunity-D_O_WkbH.js +0 -1
  179. package/public/assets/CoreUsageArea-csgwNxkl.js +0 -1
  180. package/public/assets/DisclosureContext-B0siMVdg.js +0 -1
  181. package/public/assets/PlanGraphRoute-pqnHTt4i.js +0 -1
  182. package/public/assets/Spill-B4DVKHXx.js +0 -1
  183. package/public/assets/StageFindingGroup-D9naK109.js +0 -1
  184. package/public/assets/index-BcqTLKFp.css +0 -2
  185. package/public/assets/index-DCeWge12.js +0 -13
  186. package/public/assets/useRecentFiles-C3Ov47U7.js +0 -11
  187. package/public/docs/assets/chunks/@localSearchIndexroot.D4OdkQjy.js +0 -1
  188. package/public/docs/assets/contributor-guide_architecture_detector-contract_threshold-tables.md.fkPBXsU2.js +0 -1
  189. package/public/docs/assets/contributor-guide_architecture_state-and-history_run-comparison-internals.md.uuAKpY0Y.js +0 -1
  190. package/public/docs/assets/contributor-guide_architecture_worker-protocol_cli-and-mcp.md.Dk08VS7n.js +0 -1
  191. package/public/docs/assets/user-guide_getting-started_ci-and-automation.md.DpnfKz3x.lean.js +0 -1
  192. package/public/docs/assets/user-guide_run-comparison.md.B6aNtDYF.js +0 -1
  193. package/public/docs/assets/user-guide_run-comparison.md.B6aNtDYF.lean.js +0 -1
  194. package/public/docs/assets/user-guide_run-comparison_how-stages-are-matched.md.XBzQ1oEU.js +0 -1
  195. package/public/docs/assets/user-guide_run-comparison_how-stages-are-matched.md.XBzQ1oEU.lean.js +0 -1
  196. package/public/docs/assets/user-guide_understanding-findings.md.Dqt2H_C1.js +0 -1
  197. package/public/docs/assets/user-guide_understanding-findings.md.Dqt2H_C1.lean.js +0 -1
  198. /package/public/docs/assets/{contributor-guide_architecture_detector-contract_threshold-tables.md.fkPBXsU2.lean.js → contributor-guide_architecture_detector-contract_threshold-tables.md.CKjWG56Y.lean.js} +0 -0
  199. /package/public/docs/assets/{contributor-guide_architecture_worker-protocol_cli-and-mcp.md.Dk08VS7n.lean.js → contributor-guide_architecture_worker-protocol_cli-and-mcp.md.DC1YqXBp.lean.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sparkforensics-server",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Local companion server for the SparkForensics dashboard: serves the app and proxies Spark History Server fetches to avoid browser CORS restrictions.",
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t,T as n,f as r,l as i,o as a,s as o,t as s,v as c,w as l}from"./charts-vendor-0VMaLVLN.js";import{S as u,d,u as f}from"./DisclosureContext-B0siMVdg.js";import{p}from"./plan-graph-vendor-BYl-AzN5.js";import{_ as m,b as h}from"./useRecentFiles-C3Ov47U7.js";import{C as g}from"./index-DCeWge12.js";import{c as _,o as v,t as y}from"./Dashboard-BgKodJl2.js";var b=e(t(),1),x=p(),S=60,C=6e4,w=220;function T(e,t,n,r,i){if(e.length===0&&t.length===0)return[];let a=Math.max(i,r-n),o=Math.max(1,Math.ceil(a/i)),s=[];for(let e=0;e<o;e++)s.push({tStart:n+e*i,adds:0,removes:0});let c=e=>Math.min(o-1,Math.max(0,Math.floor((e-n)/i)));for(let t of e)s[c(t.timestamp)].adds++;for(let e of t)s[c(e.timestamp)].removes++;return s}function E(e,t){let n=Math.max(1,t-e);return Math.max(C,Math.ceil(n/S))}function D(e){if(e<=0)return 1;let t=10**Math.floor(Math.log10(e)),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function O(e){let t=D(e.reduce((e,t)=>Math.max(e,Math.abs(t.added),Math.abs(t.removed)),0));return{domain:[-t,t],ticks:[-t,-t/2,0,t/2,t]}}function k(e){return Math.abs(e.height)<1?null:(0,x.jsx)(l,{...e})}function A({finding:e}){return(0,x.jsxs)(`div`,{className:`flex flex-col gap-1 transition-colors`,children:[(0,x.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Short-lived executors: `,(0,x.jsxs)(`strong`,{children:[e.value,`%`]})]}),(0,x.jsx)(y,{finding:e}),(0,x.jsxs)(`p`,{className:`flex flex-wrap items-start gap-2 text-sm`,children:[(0,x.jsx)(f,{impactBand:e.impactBand,className:`mt-1.5`}),(0,x.jsx)(`span`,{children:(0,x.jsx)(u,{anchor:`#config-autoscale-bounds`,children:`Tuning executorIdleTimeout and the min/max bounds`})})]})]})}var j=(0,b.memo)(function({appModel:e,activeFileId:t,catalog:l=[],defaultCollapsed:u=!0}){let f=(0,b.useMemo)(()=>{let t=e.executors.added,n=e.executors.removed;if(t.length===0&&n.length===0)return{hasEvents:!1,added:t,removed:n};let r=e.app,i=r?.startTime??0,a=r?.endTime??i,o=E(i,a),s=_(T(t,n,i,a,o)).map(e=>({t:`${Math.round((e.tStart-i)/1e3)}s`,added:e.adds,removed:-e.removes}));return{hasEvents:!0,added:t,removed:n,rows:s,yAxisScale:O(s)}},[e,t]);if(!f.hasEvents)return(0,x.jsx)(g,{title:`Autoscaling Churn`,summary:(0,x.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`No executor add/remove events (static allocation).`}),children:(0,x.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`No executor add/remove events (static allocation).`})});let{added:p,removed:y,rows:S,yAxisScale:C}=f,D=l.find(e=>e.type===`autoscalingChurn`);return(0,x.jsx)(g,{title:`Autoscaling Churn`,impactBand:D?.impactBand,fixFor:D?[D]:[],badges:D&&(0,x.jsx)(d,{type:`autoscalingChurn`,impactBand:D.impactBand}),defaultCollapsed:u,summary:(0,x.jsx)(v,{value:`${p.length} added / ${y.length} removed`,context:D?`${D.value}% short-lived executors, ${D.impactBand}`:`executor churn events`}),children:(0,x.jsxs)(`div`,{className:`space-y-2`,children:[D&&(0,x.jsx)(A,{finding:D}),(0,x.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`executors added / removed over time`}),(0,x.jsx)(h,{ariaLabel:`Executor added and removed counts per time bucket over the run.`,height:w,table:{caption:`Executor added/removed counts by time bucket`,columns:[`Time`,`Executors added`,`Executors removed`],rows:S.map(e=>[e.t,e.added,Math.abs(e.removed)]),align:[`right`,`right`,`right`]},children:(0,x.jsxs)(s,{data:S,children:[(0,x.jsx)(r,{stroke:m.muted,strokeOpacity:.2}),(0,x.jsx)(o,{dataKey:`t`,tick:{fontSize:10}}),(0,x.jsx)(a,{tick:{fontSize:10},width:32,domain:C.domain,ticks:C.ticks}),(0,x.jsx)(c,{formatter:(e,t)=>[Math.abs(Number(e)),t]}),(0,x.jsx)(n,{wrapperStyle:{fontSize:10}}),(0,x.jsx)(i,{dataKey:`added`,name:`Added`,stackId:`churn`,fill:m.clean,shape:k}),(0,x.jsx)(i,{dataKey:`removed`,name:`Removed`,stackId:`churn`,fill:m.muted,shape:k})]})})]})})});export{j as AutoscalingChurn};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t,T as n,f as r,l as i,o as a,s as o,t as s,v as c,w as l}from"./charts-vendor-0VMaLVLN.js";import{S as u,d,u as f}from"./DisclosureContext-ZpE6CkHx.js";import{p}from"./plan-graph-vendor-BYl-AzN5.js";import{d as m,m as h}from"./useRecentFiles-XZEnLlal.js";import{k as g}from"./index-B-03mG7K.js";import{c as _,o as v,t as y}from"./Dashboard-C1hNeX49.js";var b=e(t(),1),x=p(),S=60,C=6e4,w=220;function T(e,t,n,r,i){if(e.length===0&&t.length===0)return[];let a=Math.max(i,r-n),o=Math.max(1,Math.ceil(a/i)),s=[];for(let e=0;e<o;e++)s.push({tStart:n+e*i,adds:0,removes:0});let c=e=>Math.min(o-1,Math.max(0,Math.floor((e-n)/i)));for(let t of e)s[c(t.timestamp)].adds++;for(let e of t)s[c(e.timestamp)].removes++;return s}function E(e,t){let n=Math.max(1,t-e);return Math.max(C,Math.ceil(n/S))}function D(e){if(e<=0)return 1;let t=10**Math.floor(Math.log10(e)),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function O(e){let t=D(e.reduce((e,t)=>Math.max(e,Math.abs(t.added),Math.abs(t.removed)),0));return{domain:[-t,t],ticks:[-t,-t/2,0,t/2,t]}}function k(e){return Math.abs(e.height)<1?null:(0,x.jsx)(l,{...e})}function A({finding:e}){return(0,x.jsxs)(`div`,{className:`flex flex-col gap-1 transition-colors`,children:[(0,x.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Short-lived executors: `,(0,x.jsxs)(`strong`,{children:[e.value,`%`]})]}),(0,x.jsx)(y,{finding:e}),(0,x.jsxs)(`p`,{className:`flex flex-wrap items-start gap-2 text-sm`,children:[(0,x.jsx)(f,{impactBand:e.impactBand,className:`mt-1.5`}),(0,x.jsx)(`span`,{children:(0,x.jsx)(u,{anchor:`#config-autoscale-bounds`,children:`Tuning executorIdleTimeout and the min/max bounds`})})]})]})}var j=(0,b.memo)(function({appModel:e,activeFileId:t,catalog:l=[],defaultCollapsed:u=!0}){let f=(0,b.useMemo)(()=>{let t=e.executors.added,n=e.executors.removed;if(t.length===0&&n.length===0)return{hasEvents:!1,added:t,removed:n};let r=e.app,i=r?.startTime??0,a=r?.endTime??i,o=E(i,a),s=_(T(t,n,i,a,o)).map(e=>({t:`${Math.round((e.tStart-i)/1e3)}s`,added:e.adds,removed:-e.removes}));return{hasEvents:!0,added:t,removed:n,rows:s,yAxisScale:O(s)}},[e,t]);if(!f.hasEvents)return(0,x.jsx)(g,{title:`Autoscaling Churn`,summary:(0,x.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`No executor add/remove events (static allocation).`}),children:(0,x.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`No executor add/remove events (static allocation).`})});let{added:p,removed:y,rows:S,yAxisScale:C}=f,D=l.find(e=>e.type===`autoscalingChurn`);return(0,x.jsx)(g,{title:`Autoscaling Churn`,impactBand:D?.impactBand,fixFor:D?[D]:[],badges:D&&(0,x.jsx)(d,{type:`autoscalingChurn`,impactBand:D.impactBand}),defaultCollapsed:u,summary:(0,x.jsx)(v,{value:`${p.length} added / ${y.length} removed`,context:D?`${D.value}% short-lived executors, ${D.impactBand}`:`executor churn events`}),children:(0,x.jsxs)(`div`,{className:`space-y-2`,children:[D&&(0,x.jsx)(A,{finding:D}),(0,x.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`executors added / removed over time`}),(0,x.jsx)(h,{ariaLabel:`Executor added and removed counts per time bucket over the run.`,height:w,table:{caption:`Executor added/removed counts by time bucket`,columns:[`Time`,`Executors added`,`Executors removed`],rows:S.map(e=>[e.t,e.added,Math.abs(e.removed)]),align:[`right`,`right`,`right`]},children:(0,x.jsxs)(s,{data:S,children:[(0,x.jsx)(r,{stroke:m.muted,strokeOpacity:.2}),(0,x.jsx)(o,{dataKey:`t`,tick:{fontSize:10}}),(0,x.jsx)(a,{tick:{fontSize:10},width:32,domain:C.domain,ticks:C.ticks}),(0,x.jsx)(c,{formatter:(e,t)=>[Math.abs(Number(e)),t]}),(0,x.jsx)(n,{wrapperStyle:{fontSize:10}}),(0,x.jsx)(i,{dataKey:`added`,name:`Added`,stackId:`churn`,fill:m.clean,shape:k}),(0,x.jsx)(i,{dataKey:`removed`,name:`Removed`,stackId:`churn`,fill:m.muted,shape:k})]})})]})})});export{j as AutoscalingChurn};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{$ as n,S as r,U as i,Y as a,at as o,d as s,it as c,u as l,ut as u}from"./DisclosureContext-B0siMVdg.js";import{p as d}from"./plan-graph-vendor-BYl-AzN5.js";import{m as f}from"./useRecentFiles-C3Ov47U7.js";import{C as p,F as m,I as h,L as g,M as _,N as v,O as y,R as b}from"./index-DCeWge12.js";import{o as x,r as S,t as C}from"./Dashboard-BgKodJl2.js";import{n as w}from"./finding-anchor-Cys8Z6Yn.js";import{t as T}from"./usePagedRows-BxvdFnPk.js";var E=e(t(),1),D=d(),O=70;function k(e){if(!e)return`—`;let t=[];return e.useMemory&&t.push(`Memory`),e.useDisk&&t.push(`Disk`),e.deserialized?t.push(`Deserialized`):(e.useMemory||e.useDisk)&&t.push(`Serialized`),(e.replication??1)>1&&t.push(`x${e.replication}`),t.join(` · `)||`—`}function A(e){return e.name||`RDD ${e.id}`}function j(e){let t=o(A(e));return t.length<=O?t:`${t.slice(0,O)}…`}function M(e){if(e.variant===`storageUnobserved`)return`No block updates logged: cached partition counts and sizes are unknown`;let t=n(`pct`,c(e));return e.variant===`diskSpillover`?`${t} spilled to disk: ${a(e.diskSize??0)} disk / ${a(e.memorySize??0)} memory`:`${t} cached (${e.numCachedPartitions??0}/${e.numPartitions??0} partitions)`}function N({finding:e}){let t=w([e]),n=e.dataUnavailable?`Cache storage not logged`:e.rddName??`RDD ${e.rddId}`;return(0,D.jsxs)(`div`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`space-y-1 transition-colors ${t.flashClassName}`,children:[(0,D.jsxs)(`p`,{className:`flex flex-wrap items-start gap-2`,children:[(0,D.jsx)(l,{impactBand:e.impactBand,className:`mt-1.5`}),(0,D.jsx)(`span`,{children:n})]}),(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.dataUnavailable?e.recommendation:M(e)}),(0,D.jsx)(C,{finding:e})]})}var P=(0,E.memo)(function({appModel:e,catalog:t}){let[n,o]=(0,E.useState)(0),[d,C]=(0,E.useState)(0),w=e.app?.rddInfo,O=(0,E.useMemo)(()=>w?[...w.values()].filter(e=>(e.storageLevel?.useMemory||e.storageLevel?.useDisk)&&(e.numCachedPartitions??0)>0).sort((e,t)=>(t.memorySize??0)+(t.diskSize??0)-((e.memorySize??0)+(e.diskSize??0))):[],[w]),M=(0,E.useMemo)(()=>f(t,`cacheUtilization`).sort((e,t)=>i[e.impactBand]-i[t.impactBand]),[t]),P=T(O,n,o),F=y(),I=F?M.findIndex(e=>e===F.finding):null,L=T(M,d,C,I),R=M.find(e=>e.dataUnavailable);if(O.length===0&&!R)return null;let z=e=>M.filter(t=>t.rddId===e),B=O.reduce((e,t)=>e+(t.memorySize??0)+(t.diskSize??0),0);return(0,D.jsx)(`div`,{"data-widget":`cache-utilization`,children:(0,D.jsxs)(p,{title:`Cache Storage`,fixFor:M,impactBand:u(M),badges:(0,D.jsxs)(D.Fragment,{children:[M.length>0?(0,D.jsx)(s,{type:`cacheUtilization`,impactBand:u(M)??`info`}):null,(0,D.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[O.length>0?`${O.length} cached RDD${O.length===1?``:`s`}`:`cache storage not logged`,`, see`,` `,(0,D.jsx)(r,{anchor:`#memory-model`,children:`how Spark accounts cached memory`})]})]}),defaultCollapsed:!0,summary:O.length>0?(0,D.jsx)(x,{value:a(B),context:`cached across memory + disk`}):(0,D.jsx)(x,{value:`Unknown`,context:`${c(R)} persisted, no block updates`}),children:[O.length>0?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(_,{children:[(0,D.jsx)(g,{children:(0,D.jsxs)(b,{children:[(0,D.jsx)(h,{children:`RDD`}),(0,D.jsx)(h,{children:`Storage level`}),(0,D.jsx)(h,{className:`text-right`,children:`Cached partitions`}),(0,D.jsx)(h,{className:`text-right`,children:`Memory`}),(0,D.jsx)(h,{className:`text-right`,children:`Disk`})]})}),(0,D.jsx)(v,{children:P.visible.map(e=>{let t=A(e),n=j(e),r=z(e.id);return(0,D.jsxs)(b,{children:[(0,D.jsxs)(m,{className:`max-w-80 truncate`,title:t===n?void 0:t,children:[n,r.length>0&&(0,D.jsx)(l,{impactBand:u(r)??`info`,className:`ml-1.5`})]}),(0,D.jsx)(m,{children:k(e.storageLevel)}),(0,D.jsxs)(m,{className:`text-right`,children:[e.numCachedPartitions,` / `,e.numPartitions]}),(0,D.jsx)(m,{className:`text-right`,children:a(e.memorySize??0)}),(0,D.jsx)(m,{className:`text-right`,children:a(e.diskSize??0)})]},e.id)})})]}),(0,D.jsx)(S,{page:P.effectivePage,totalPages:P.totalPages,onPrev:()=>o(e=>e-1),onNext:()=>o(e=>e+1)})]}):null,M.length>0?(0,D.jsxs)(`div`,{className:`mt-3 space-y-2 text-sm`,children:[L.visible.map(e=>(0,D.jsx)(N,{finding:e},e.id)),(0,D.jsx)(S,{page:L.effectivePage,totalPages:L.totalPages,onPrev:()=>C(e=>e-1),onNext:()=>C(e=>e+1)})]}):null]})})});export{P as CacheUtilization};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{$ as n,S as r,U as i,Y as a,at as o,d as s,it as c,u as l,ut as u}from"./DisclosureContext-ZpE6CkHx.js";import{p as d}from"./plan-graph-vendor-BYl-AzN5.js";import{c as f}from"./useRecentFiles-XZEnLlal.js";import{H as p,P as m,R as h,U as g,V as _,W as v,k as y,z as b}from"./index-B-03mG7K.js";import{o as x,r as S,t as C}from"./Dashboard-C1hNeX49.js";import{n as w}from"./finding-anchor-Cl6_5hfV.js";import{t as T}from"./usePagedRows-Dyl6T8Ok.js";var E=e(t(),1),D=d(),O=70;function k(e){if(!e)return`—`;let t=[];return e.useMemory&&t.push(`Memory`),e.useDisk&&t.push(`Disk`),e.deserialized?t.push(`Deserialized`):(e.useMemory||e.useDisk)&&t.push(`Serialized`),(e.replication??1)>1&&t.push(`x${e.replication}`),t.join(` · `)||`—`}function A(e){return e.name||`RDD ${e.id}`}function j(e){let t=o(A(e));return t.length<=O?t:`${t.slice(0,O)}…`}function M(e){if(e.variant===`storageUnobserved`)return`No block updates logged: cached partition counts and sizes are unknown`;let t=n(`pct`,c(e));return e.variant===`diskSpillover`?`${t} spilled to disk: ${a(e.diskSize??0)} disk / ${a(e.memorySize??0)} memory`:`${t} cached (${e.numCachedPartitions??0}/${e.numPartitions??0} partitions)`}function N({finding:e}){let t=w([e]),n=e.dataUnavailable?`Cache storage not logged`:e.rddName??`RDD ${e.rddId}`;return(0,D.jsxs)(`div`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`space-y-1 transition-colors ${t.flashClassName}`,children:[(0,D.jsxs)(`p`,{className:`flex flex-wrap items-start gap-2`,children:[(0,D.jsx)(l,{impactBand:e.impactBand,className:`mt-1.5`}),(0,D.jsx)(`span`,{children:n})]}),(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.dataUnavailable?e.recommendation:M(e)}),(0,D.jsx)(C,{finding:e})]})}var P=(0,E.memo)(function({appModel:e,catalog:t}){let[n,o]=(0,E.useState)(0),[d,C]=(0,E.useState)(0),w=e.app?.rddInfo,O=(0,E.useMemo)(()=>w?[...w.values()].filter(e=>(e.storageLevel?.useMemory||e.storageLevel?.useDisk)&&(e.numCachedPartitions??0)>0).sort((e,t)=>(t.memorySize??0)+(t.diskSize??0)-((e.memorySize??0)+(e.diskSize??0))):[],[w]),M=(0,E.useMemo)(()=>f(t,`cacheUtilization`).sort((e,t)=>i[e.impactBand]-i[t.impactBand]),[t]),P=T(O,n,o),F=m(),I=F?M.findIndex(e=>e===F.finding):null,L=T(M,d,C,I),R=M.find(e=>e.dataUnavailable);if(O.length===0&&!R)return null;let z=e=>M.filter(t=>t.rddId===e),B=O.reduce((e,t)=>e+(t.memorySize??0)+(t.diskSize??0),0);return(0,D.jsx)(`div`,{"data-widget":`cache-utilization`,children:(0,D.jsxs)(y,{title:`Cache Storage`,fixFor:M,impactBand:u(M),badges:(0,D.jsxs)(D.Fragment,{children:[M.length>0?(0,D.jsx)(s,{type:`cacheUtilization`,impactBand:u(M)??`info`}):null,(0,D.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[O.length>0?`${O.length} cached RDD${O.length===1?``:`s`}`:`cache storage not logged`,`, see`,` `,(0,D.jsx)(r,{anchor:`#memory-model`,children:`how Spark accounts cached memory`})]})]}),defaultCollapsed:!0,summary:O.length>0?(0,D.jsx)(x,{value:a(B),context:`cached across memory + disk`}):(0,D.jsx)(x,{value:`Unknown`,context:`${c(R)} persisted, no block updates`}),children:[O.length>0?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(h,{children:[(0,D.jsx)(g,{children:(0,D.jsxs)(v,{children:[(0,D.jsx)(p,{children:`RDD`}),(0,D.jsx)(p,{children:`Storage level`}),(0,D.jsx)(p,{className:`text-right`,children:`Cached partitions`}),(0,D.jsx)(p,{className:`text-right`,children:`Memory`}),(0,D.jsx)(p,{className:`text-right`,children:`Disk`})]})}),(0,D.jsx)(b,{children:P.visible.map(e=>{let t=A(e),n=j(e),r=z(e.id);return(0,D.jsxs)(v,{children:[(0,D.jsxs)(_,{className:`max-w-80 truncate`,title:t===n?void 0:t,children:[n,r.length>0&&(0,D.jsx)(l,{impactBand:u(r)??`info`,className:`ml-1.5`})]}),(0,D.jsx)(_,{children:k(e.storageLevel)}),(0,D.jsxs)(_,{className:`text-right`,children:[e.numCachedPartitions,` / `,e.numPartitions]}),(0,D.jsx)(_,{className:`text-right`,children:a(e.memorySize??0)}),(0,D.jsx)(_,{className:`text-right`,children:a(e.diskSize??0)})]},e.id)})})]}),(0,D.jsx)(S,{page:P.effectivePage,totalPages:P.totalPages,onPrev:()=>o(e=>e-1),onNext:()=>o(e=>e+1)})]}):null,M.length>0?(0,D.jsxs)(`div`,{className:`mt-3 space-y-2 text-sm`,children:[L.visible.map(e=>(0,D.jsx)(N,{finding:e},e.id)),(0,D.jsx)(S,{page:L.effectivePage,totalPages:L.totalPages,onPrev:()=>C(e=>e-1),onNext:()=>C(e=>e+1)})]}):null]})})});export{P as CacheUtilization};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{E as n,Y as r,_t as i,d as a,p as o}from"./DisclosureContext-ZpE6CkHx.js";import{p as s}from"./plan-graph-vendor-BYl-AzN5.js";import{c,l}from"./useRecentFiles-XZEnLlal.js";import{H as u,P as d,R as f,U as p,V as m,W as h,k as g,z as _}from"./index-B-03mG7K.js";import{o as v,r as y,t as b}from"./Dashboard-C1hNeX49.js";import{n as x}from"./finding-anchor-Cl6_5hfV.js";import{t as S}from"./usePagedRows-Dyl6T8Ok.js";var C={name:`git-merge`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]};C.node;var w=i(C),T=e(t(),1),E=s();function D({relations:e,operator:t}){let n=t===`union`?`union`:`join`;return(0,E.jsx)(`span`,{className:`inline-flex flex-wrap items-baseline`,children:e.map((e,t)=>(0,E.jsxs)(`span`,{children:[t>0?(0,E.jsxs)(E.Fragment,{children:[` `,(0,E.jsx)(`span`,{className:`mx-1 font-semibold uppercase text-xs tracking-wide text-primary`,children:n}),` `]}):null,e.relation]},e.relation))})}function O({finding:e}){let t=x([e]),i=e.variant===`composite`;return(0,E.jsxs)(h,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`transition-colors ${t.flashClassName}`,children:[(0,E.jsx)(m,{children:(0,E.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[i?(0,E.jsx)(w,{className:`size-3.5 text-muted-foreground`,"aria-hidden":`true`}):null,i&&e.relations&&e.relations.length>0?(0,E.jsx)(D,{relations:e.relations,operator:e.operator}):(0,E.jsx)(`span`,{children:e.relation}),i?(0,E.jsx)(n,{variant:`outline`,className:`text-xs uppercase border-dashed`,children:e.operator?.toUpperCase()}):(0,E.jsx)(n,{variant:`secondary`,className:`text-xs uppercase`,children:e.format})]})}),(0,E.jsxs)(m,{children:[e.value,` queries`]}),(0,E.jsx)(m,{className:`text-right`,children:r(e.totalReadBytes)}),(0,E.jsxs)(m,{children:[(0,E.jsx)(b,{finding:e}),(0,E.jsx)(o,{children:(0,E.jsx)(l,{confidence:e.confidence,validationRequired:e.validationRequired})})]})]})}var k=(0,T.memo)(function({catalog:e,defaultCollapsed:t=!0}){let[n,r]=(0,T.useState)(0),i=(0,T.useMemo)(()=>c(e,`cachingOpportunity`).sort((e,t)=>t.totalReadBytes-e.totalReadBytes||(t.value??0)-(e.value??0)),[e]),s=d(),l=s?i.findIndex(e=>e===s.finding):null,{totalPages:m,effectivePage:b,visible:x}=S(i,n,r,l);if(i.length===0)return null;let C=i[0];return(0,E.jsx)(g,{title:`Caching Opportunities`,fixFor:i,impactBand:`info`,badges:(0,E.jsx)(a,{type:`cachingOpportunity`,impactBand:`info`}),defaultCollapsed:t,summary:(0,E.jsx)(v,{value:`${C.value}×`,context:`read by ${C.value} queries: ${C.relation}`}),children:(0,E.jsxs)(`div`,{className:`space-y-3`,children:[(0,E.jsxs)(f,{children:[(0,E.jsx)(p,{children:(0,E.jsxs)(h,{children:[(0,E.jsx)(u,{children:`Relation`}),(0,E.jsx)(u,{children:`Read by`}),(0,E.jsx)(u,{className:`text-right`,children:`Data read`}),(0,E.jsx)(u,{children:`Estimate`})]})}),(0,E.jsx)(_,{children:x.map((e,t)=>(0,E.jsx)(O,{finding:e},`${e.format}:${e.relation}:${(e.executionIds??[]).join(`,`)}:${t}`))})]}),(0,E.jsx)(o,{children:(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Reuse is inferred from plan structure, not confirmed by execution. Verify before caching.`})}),(0,E.jsx)(y,{page:b,totalPages:m,onPrev:()=>r(e=>e-1),onNext:()=>r(e=>e+1)})]})})});export{k as CachingOpportunity};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{U as n,d as r,u as i}from"./DisclosureContext-B0siMVdg.js";import{p as a}from"./plan-graph-vendor-BYl-AzN5.js";import{C as o,O as s}from"./index-DCeWge12.js";import{o as c,r as l,s as u,t as d}from"./Dashboard-BgKodJl2.js";import{r as f}from"./impact-sort-BTQndbof.js";import{n as p}from"./finding-anchor-Cys8Z6Yn.js";import{t as m}from"./usePagedRows-BxvdFnPk.js";import{n as h,t as g}from"./useSortMode-B8SRfAoG.js";var _=e(t(),1),v=a();function y(e){return`${e.value}s`}function b({finding:e}){let t=p([e]);return(0,v.jsxs)(`li`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`space-y-1 text-sm transition-colors ${t.flashClassName}`,children:[(0,v.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,v.jsx)(i,{impactBand:e.impactBand}),(0,v.jsx)(`strong`,{children:y(e)})]}),(0,v.jsx)(d,{finding:e})]})}var x=(0,_.memo)(function({catalog:e,defaultCollapsed:t=!0}){let{sortMode:i,setSortMode:a,orderBy:d}=g(),[p,x]=(0,_.useState)(!t),[S,C]=(0,_.useState)(0),w=e.filter(e=>e.type===`coldStart`).slice().sort((e,t)=>n[e.impactBand]-n[t.impactBand]),T=d(w,e=>[e],e=>e.stageId??null),E=s(),D=E?T.findIndex(e=>e===E.finding):null,{totalPages:O,effectivePage:k,visible:A}=m(T,S,C,D);return w.length===0?null:(0,v.jsxs)(o,{title:`Cold Start`,fixFor:w,impactBand:w[0].impactBand,badges:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(r,{type:`coldStart`,impactBand:w[0].impactBand}),f(w,w.length,p)?(0,v.jsx)(h,{mode:i,onChange:a}):null]}),open:p,onOpenChange:x,summary:(0,v.jsx)(c,{value:y(w[0]),context:u(w.length)}),children:[(0,v.jsx)(`ul`,{className:`space-y-2`,children:A.map(e=>(0,v.jsx)(b,{finding:e},e.id))}),(0,v.jsx)(l,{page:k,totalPages:O,onPrev:()=>C(e=>e-1),onNext:()=>C(e=>e+1)})]})});export{x as ColdStart};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{U as n,d as r,u as i}from"./DisclosureContext-ZpE6CkHx.js";import{p as a}from"./plan-graph-vendor-BYl-AzN5.js";import{P as o,k as s}from"./index-B-03mG7K.js";import{o as c,r as l,s as u,t as d}from"./Dashboard-C1hNeX49.js";import{r as f}from"./impact-sort-CssZ6MT2.js";import{n as p}from"./finding-anchor-Cl6_5hfV.js";import{t as m}from"./usePagedRows-Dyl6T8Ok.js";import{n as h,t as g}from"./useSortMode-Dhvit8dt.js";var _=e(t(),1),v=a();function y(e){return`${e.value}s`}function b({finding:e}){let t=p([e]);return(0,v.jsxs)(`li`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`space-y-1 text-sm transition-colors ${t.flashClassName}`,children:[(0,v.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,v.jsx)(i,{impactBand:e.impactBand}),(0,v.jsx)(`strong`,{children:y(e)})]}),(0,v.jsx)(d,{finding:e})]})}var x=(0,_.memo)(function({catalog:e,defaultCollapsed:t=!0}){let{sortMode:i,setSortMode:a,orderBy:d}=g(),[p,x]=(0,_.useState)(!t),[S,C]=(0,_.useState)(0),w=e.filter(e=>e.type===`coldStart`).slice().sort((e,t)=>n[e.impactBand]-n[t.impactBand]),T=d(w,e=>[e],e=>e.stageId??null),E=o(),D=E?T.findIndex(e=>e===E.finding):null,{totalPages:O,effectivePage:k,visible:A}=m(T,S,C,D);return w.length===0?null:(0,v.jsxs)(s,{title:`Cold Start`,fixFor:w,impactBand:w[0].impactBand,badges:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(r,{type:`coldStart`,impactBand:w[0].impactBand}),f(w,w.length,p)?(0,v.jsx)(h,{mode:i,onChange:a}):null]}),open:p,onOpenChange:x,summary:(0,v.jsx)(c,{value:y(w[0]),context:u(w.length)}),children:[(0,v.jsx)(`ul`,{className:`space-y-2`,children:A.map(e=>(0,v.jsx)(b,{finding:e},e.id))}),(0,v.jsx)(l,{page:k,totalPages:O,onPrev:()=>C(e=>e-1),onNext:()=>C(e=>e+1)})]})});export{x as ColdStart};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{S as n,U as r,d as i,j as a,p as o,u as s,ut as c}from"./DisclosureContext-B0siMVdg.js";import{p as l}from"./plan-graph-vendor-BYl-AzN5.js";import{h as u,m as d}from"./useRecentFiles-C3Ov47U7.js";import{C as f,O as p,l as m}from"./index-DCeWge12.js";import{o as h,r as g,t as _}from"./Dashboard-BgKodJl2.js";import{n as v}from"./finding-anchor-Cys8Z6Yn.js";import{t as y}from"./usePagedRows-BxvdFnPk.js";var b=e(t(),1),x=l();function S({finding:e}){let t=v([e]);return(0,x.jsxs)(`li`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`space-y-1 transition-colors ${t.flashClassName}`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(s,{impactBand:e.impactBand}),(0,x.jsx)(`code`,{className:`text-xs`,children:e.property}),(0,x.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`=`}),(0,x.jsx)(`code`,{className:`rounded bg-accent/10 px-1.5 py-0.5 font-mono text-xs text-accent`,children:e.valueText})]}),(0,x.jsx)(_,{finding:e}),(0,x.jsxs)(`p`,{className:`text-sm`,children:[m(e.recommendation??``).measured??e.recommendation,e.docAnchor?(0,x.jsxs)(x.Fragment,{children:[` `,(0,x.jsxs)(n,{anchor:e.docAnchor,children:[`Why `,e.property,` matters`]})]}):null]})]})}var C=(0,b.memo)(function({appModel:e,configFindings:t,defaultCollapsed:n=!0}){let[s,l]=(0,b.useState)(0),m=(0,b.useMemo)(()=>d(t??[],`configAudit`).sort((e,t)=>r[e.impactBand]-r[t.impactBand]),[t]),_=p(),v=_?m.findIndex(e=>e===_.finding):null,{totalPages:C,effectivePage:w,visible:T}=y(m,s,l,v);if(m.length===0){let t=e.evidenceAvailability?.entries.find(e=>e.key===`sparkConfiguration`),n;if(t)n=t.state===`present`?`No misconfigurations detected.`:t.state===`unknown`&&t.reasonCode===`parseIncomplete`?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`span`,{children:[t.summary,` `]}),(0,x.jsx)(o,{children:(0,x.jsx)(u,{evidenceKey:`sparkConfiguration`})})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`span`,{children:`No environment info captured in this log. `}),(0,x.jsx)(o,{children:(0,x.jsx)(u,{evidenceKey:`sparkConfiguration`})})]});else{let t=e.app?.evidenceInputs;n=(t?t.environmentUpdates>0:Object.keys(e.app?.config??{}).length>0||e.app?.resources)?`No misconfigurations detected.`:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`span`,{children:`No environment info captured in this log. `}),(0,x.jsx)(o,{children:(0,x.jsx)(u,{evidenceKey:`sparkConfiguration`})})]})}let r=(0,x.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:n});return(0,x.jsx)(f,{title:`Config Audit`,compact:!0,summary:r,children:r})}let E=c(m);return(0,x.jsxs)(f,{title:`Config Audit`,fixFor:m,impactBand:E,badges:(0,x.jsx)(i,{type:`configAudit`,impactBand:E??`info`,docAnchor:a(m)}),statusBadge:(0,x.jsx)(o,{children:(0,x.jsx)(u,{evidenceKey:`sparkConfiguration`})}),defaultCollapsed:n,summary:(0,x.jsx)(h,{value:`${m.length}`,context:`misconfiguration${m.length===1?``:`s`} flagged`}),children:[(0,x.jsx)(`ul`,{className:`space-y-4`,children:T.map(e=>(0,x.jsx)(S,{finding:e},e.id))}),(0,x.jsx)(g,{page:w,totalPages:C,onPrev:()=>l(e=>e-1),onNext:()=>l(e=>e+1)})]})});export{C as ConfigAudit};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{S as n,U as r,d as i,j as a,p as o,u as s,ut as c}from"./DisclosureContext-ZpE6CkHx.js";import{p as l}from"./plan-graph-vendor-BYl-AzN5.js";import{c as u,l as d}from"./useRecentFiles-XZEnLlal.js";import{P as f,k as p,l as m}from"./index-B-03mG7K.js";import{o as h,r as g,t as _}from"./Dashboard-C1hNeX49.js";import{n as v}from"./finding-anchor-Cl6_5hfV.js";import{t as y}from"./usePagedRows-Dyl6T8Ok.js";var b=e(t(),1),x=l();function S({finding:e}){let t=v([e]);return(0,x.jsxs)(`li`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`space-y-1 transition-colors ${t.flashClassName}`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(s,{impactBand:e.impactBand}),(0,x.jsx)(`code`,{className:`text-xs`,children:e.property}),(0,x.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`=`}),(0,x.jsx)(`code`,{className:`rounded bg-accent/10 px-1.5 py-0.5 font-mono text-xs text-accent`,children:e.valueText})]}),(0,x.jsx)(_,{finding:e}),(0,x.jsxs)(`p`,{className:`text-sm`,children:[m(e.recommendation??``).measured??e.recommendation,e.docAnchor?(0,x.jsxs)(x.Fragment,{children:[` `,(0,x.jsxs)(n,{anchor:e.docAnchor,children:[`Why `,e.property,` matters`]})]}):null]})]})}var C=(0,b.memo)(function({appModel:e,configFindings:t,defaultCollapsed:n=!0}){let[s,l]=(0,b.useState)(0),m=(0,b.useMemo)(()=>u(t??[],`configAudit`).sort((e,t)=>r[e.impactBand]-r[t.impactBand]),[t]),_=f(),v=_?m.findIndex(e=>e===_.finding):null,{totalPages:C,effectivePage:w,visible:T}=y(m,s,l,v);if(m.length===0){let t=e.evidenceAvailability?.entries.find(e=>e.key===`sparkConfiguration`),n;if(t)n=t.state===`present`?`No misconfigurations detected.`:t.state===`unknown`&&t.reasonCode===`parseIncomplete`?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`span`,{children:[t.summary,` `]}),(0,x.jsx)(o,{children:(0,x.jsx)(d,{evidenceKey:`sparkConfiguration`})})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`span`,{children:`No environment info captured in this log. `}),(0,x.jsx)(o,{children:(0,x.jsx)(d,{evidenceKey:`sparkConfiguration`})})]});else{let t=e.app?.evidenceInputs;n=(t?t.environmentUpdates>0:Object.keys(e.app?.config??{}).length>0||e.app?.resources)?`No misconfigurations detected.`:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`span`,{children:`No environment info captured in this log. `}),(0,x.jsx)(o,{children:(0,x.jsx)(d,{evidenceKey:`sparkConfiguration`})})]})}let r=(0,x.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:n});return(0,x.jsx)(p,{title:`Config Audit`,compact:!0,summary:r,children:r})}let E=c(m);return(0,x.jsxs)(p,{title:`Config Audit`,fixFor:m,impactBand:E,badges:(0,x.jsx)(i,{type:`configAudit`,impactBand:E??`info`,docAnchor:a(m)}),statusBadge:(0,x.jsx)(o,{children:(0,x.jsx)(d,{evidenceKey:`sparkConfiguration`})}),defaultCollapsed:n,summary:(0,x.jsx)(h,{value:`${m.length}`,context:`misconfiguration${m.length===1?``:`s`} flagged`}),children:[(0,x.jsx)(`ul`,{className:`space-y-4`,children:T.map(e=>(0,x.jsx)(S,{finding:e},e.id))}),(0,x.jsx)(g,{page:w,totalPages:C,onPrev:()=>l(e=>e-1),onNext:()=>l(e=>e+1)})]})});export{C as ConfigAudit};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t,T as n,f as r,n as i,o as a,s as o,u as s,v as c}from"./charts-vendor-0VMaLVLN.js";import{B as l,S as u,X as d,b as f,d as p,p as m,u as h}from"./DisclosureContext-ZpE6CkHx.js";import{p as g}from"./plan-graph-vendor-BYl-AzN5.js";import{d as _,l as v,m as y,p as b}from"./useRecentFiles-XZEnLlal.js";import{k as x}from"./index-B-03mG7K.js";import{c as S,f as C,o as w,p as T,r as E,t as D}from"./Dashboard-C1hNeX49.js";import{t as O}from"./usePagedRows-Dyl6T8Ok.js";var k=e(t(),1),A=g(),j=240,M={PROCESS_LOCAL:`Process-local`,NODE_LOCAL:`Node-local`,RACK_LOCAL:`Rack-local`,NO_PREF:`No preference`,ANY:`Any`,OTHER:`Other`,idle:`Idle`},N={PROCESS_LOCAL:_.clean,NODE_LOCAL:_.accent,RACK_LOCAL:_.warning,NO_PREF:_.muted,ANY:_.critical,OTHER:_.muted,idle:_.muted},P=`Core Usage by Locality`,F=(0,k.memo)(function({catalog:e,defaultCollapsed:t=!0}){let[g,F]=(0,k.useState)(0),I=f()?.data.coreLocality,L=(0,k.useMemo)(()=>{let e=I?.chart??{hasActivity:!1};return e.hasActivity?{...e,sampled:S(e.points)}:e},[I]),R=I?.ratio.topStages??[],z=e.find(e=>e.type===`coreLocality`),B=e.some(e=>e.type===`memoryUtilization`&&e.variant===`idleCores`),V=R.filter(e=>e.nonLocalTasks>0),{totalPages:H,effectivePage:U,visible:W}=O(V,g,F);if(!L.hasActivity)return(0,A.jsx)(x,{title:P,summary:(0,A.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`No stage activity to plot.`}),children:(0,A.jsx)(C,{tone:`neutral`,icon:T,title:`No stage activity to plot.`})});let{order:G,points:K,sampled:q,peakCores:J}=L;return(0,A.jsx)(x,{title:P,impactBand:z?.impactBand,badges:z?(0,A.jsx)(p,{type:`coreLocality`,impactBand:z.impactBand}):null,defaultCollapsed:t,summary:(0,A.jsx)(w,{value:`${d(J)} cores`,context:`busy at the peak`}),children:(0,A.jsxs)(`div`,{className:`space-y-2`,children:[(0,A.jsx)(m,{children:(0,A.jsxs)(`p`,{className:`text-muted-foreground text-xs`,children:[`approximate: stage-level attribution`,z?null:(0,A.jsxs)(A.Fragment,{children:[`, see `,(0,A.jsx)(u,{anchor:`#bottleneck-utilization`,children:`how utilization is measured`})]})]})}),z?(0,A.jsxs)(`p`,{className:`flex flex-wrap items-start gap-2 text-sm`,children:[(0,A.jsx)(h,{impactBand:z.impactBand,className:`mt-1.5`}),(0,A.jsxs)(`span`,{children:[(0,A.jsxs)(`strong`,{children:[z.value,`% non-local`]}),`. `,l(z)]})]}):null,z?(0,A.jsx)(D,{finding:z}):null,(0,A.jsx)(m,{children:z?(0,A.jsx)(v,{confidence:z.confidence,validationRequired:z.validationRequired}):null}),(0,A.jsx)(y,{ariaLabel:`Approximate concurrent core usage over time, stacked by task locality tier, with idle capacity shown. See the legend for tier colors.`,height:j,table:{caption:`Concurrent core usage over time by locality tier`,columns:[`Time (s)`,...G.map(e=>M[e]??e)],rows:K.map(e=>[e.t,...G.map(t=>Math.round(e[t]))]),align:Array.from({length:G.length+1},()=>`right`)},children:(0,A.jsxs)(i,{data:q,children:[(0,A.jsx)(r,{vertical:!1,stroke:_.muted,strokeOpacity:.2}),(0,A.jsx)(o,{dataKey:`t`,tick:{fontSize:10},label:{value:`seconds from app start`,position:`insideBottom`,offset:-2,fontSize:10}}),(0,A.jsx)(a,{tick:{fontSize:10},width:36,label:{value:`avg concurrent cores`,angle:-90,position:`insideLeft`,fontSize:10}}),(0,A.jsx)(c,{...b}),(0,A.jsx)(n,{wrapperStyle:{fontSize:10}}),G.map(e=>(0,A.jsx)(s,{type:`monotone`,dataKey:e,name:M[e]??e,stackId:`cores`,stroke:N[e]??_.muted,fill:N[e]??_.muted,fillOpacity:e===`idle`?.15:.8,isAnimationActive:!1},e))]})}),(0,A.jsx)(m,{children:W.length>0?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`ul`,{className:`space-y-1 text-xs text-muted-foreground`,children:W.map(e=>(0,A.jsxs)(`li`,{children:[`Stage `,e.stageId,`: `,Math.round(e.ratio*100),`% non-local (`,e.nonLocalTasks,`/`,e.taskCount,` tasks)`]},e.stageId))}),(0,A.jsx)(E,{page:U,totalPages:H,onPrev:()=>F(e=>e-1),onNext:()=>F(e=>e+1)})]}):null}),(0,A.jsx)(m,{children:B?(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Idle cores also flagged → see Memory Utilization widget`}):null})]})})});export{F as CoreUsageArea};