sparkforensics-server 0.5.2 → 0.8.1
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.
- package/index.js +16 -7
- package/package.json +1 -1
- package/public/assets/AutoscalingChurn-DenWKTv-.js +1 -0
- package/public/assets/CacheUtilization-DLz7NdjV.js +1 -0
- package/public/assets/CachingOpportunity-zpQIqhzm.js +1 -0
- package/public/assets/ChartTheme-DAiARbLP.js +8 -0
- package/public/assets/ColdStart-C-9HjxWl.js +1 -0
- package/public/assets/ConfigAudit-D0V9tcrJ.js +1 -0
- package/public/assets/CoreUsageArea-yeerrljd.js +1 -0
- package/public/assets/Dashboard-DkUPrHKV.js +1 -0
- package/public/assets/DisclosureContext-DK1_iz6J.js +1 -0
- package/public/assets/DuplicatePlanSubtree-xDNDbCd3.js +1 -0
- package/public/assets/DurationHistogram-B6jsE0Ov.js +1 -0
- package/public/assets/EmptyState-C1uL40VU.js +1 -0
- package/public/assets/ExecutorUtilization-DXDZKmSc.js +1 -0
- package/public/assets/GcPressure-MRf7I4IG.js +1 -0
- package/public/assets/ImpactEstimate-Dm3xWbzV.js +1 -0
- package/public/assets/IncompleteRun-CaLOhMtf.js +1 -0
- package/public/assets/JobFailures-CzmzlvhO.js +1 -0
- package/public/assets/MemoryUtilization-AWUMUjCH.js +1 -0
- package/public/assets/NestedLoopJoin-C9sNr6Ss.js +1 -0
- package/public/assets/OverBroadcast-BOmRE6ca.js +1 -0
- package/public/assets/PartitionHint-BL2EmJfE.js +1 -0
- package/public/assets/PartitionSizing-BzBySvUq.js +1 -0
- package/public/assets/PlanExplorer-DdiQRcJU.js +1 -0
- package/public/assets/PlanGraphRoute-CIH9gBuR.js +1 -0
- package/public/assets/PlanView-B1hxzFRs.js +2 -0
- package/public/assets/PythonUdf-DvgCCueD.js +1 -0
- package/public/assets/RetryWaste-uXXu_CyM.js +1 -0
- package/public/assets/RowPagination-C-LzWkI5.js +1 -0
- package/public/assets/RowStatusCluster-Dbtmte7l.js +1 -0
- package/public/assets/ShuffleIO-nALwzC1_.js +1 -0
- package/public/assets/Skew-CHMEKgvk.js +1 -0
- package/public/assets/SlowHost-yyvjpHk6.js +1 -0
- package/public/assets/SmallFiles-y6odJ97n.js +1 -0
- package/public/assets/SpeculationWaste-C-SD2LOt.js +1 -0
- package/public/assets/Spill-DHTMmOup.js +1 -0
- package/public/assets/StageFailed-CQ3DxC9R.js +1 -0
- package/public/assets/StageFindingGroup-BgYLyj5q.js +1 -0
- package/public/assets/StageHeader-CIETkjVZ.js +1 -0
- package/public/assets/StagePill--P7PDd3s.js +1 -0
- package/public/assets/StageShape-BIv8vx_o.js +1 -0
- package/public/assets/StageSlowness-MMqzERxN.js +1 -0
- package/public/assets/Straggler-BgrY7AyW.js +1 -0
- package/public/assets/TaskFailures-BHHyKYTs.js +1 -0
- package/public/assets/TinyTask-DDScNhCl.js +1 -0
- package/public/assets/UnderBroadcast-CGIC04TI.js +1 -0
- package/public/assets/WidgetLeadSummary-CXFZP00C.js +1 -0
- package/public/assets/button-DbpTz2yk.js +1 -0
- package/public/assets/charts-vendor-CtTxwTeu.js +59 -0
- package/public/assets/composite-C9Nu2EI9.js +1 -0
- package/public/assets/d3-vendor-DNlD2-cz.js +1 -0
- package/public/assets/detector-registry-Bp8hrLua.js +2 -0
- package/public/assets/downsample-WmNM1qc9.js +1 -0
- package/public/assets/finding-anchor-Dr40LkS9.js +1 -0
- package/public/assets/findings-of-type-BL2u3RGZ.js +1 -0
- package/public/assets/impact-sort-mC5ISgX8.js +1 -0
- package/public/assets/inbox-KPU1Gppm.js +1 -0
- package/public/assets/index-CaRVPvAT.css +2 -0
- package/public/assets/index-fDiwfuoO.js +14 -0
- package/public/assets/inertValue-L9VxV0VE.js +1 -0
- package/public/assets/instrument-sans-latin-ext-wdth-normal-C5E2Gvlv.woff2 +0 -0
- package/public/assets/instrument-sans-latin-wdth-normal-BVScPF0l.woff2 +0 -0
- package/public/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/public/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/public/assets/layout.worker-CLcBHxVp.js +3 -0
- package/public/assets/{parser-worker-CA5RxqKc.js → parser-worker-CRIOPMOW.js} +8 -8
- package/public/assets/plan-graph-vendor-Ce6d4HU6.js +7 -0
- package/public/assets/react-vendor-C6KcUD36.js +9 -0
- package/public/assets/select-BHqOqun5.js +1 -0
- package/public/assets/toggle-DPeN6aNa.js +1 -0
- package/public/assets/toggle-group-Kl3uyHSr.js +1 -0
- package/public/assets/usePagedRows-BafD6bEN.js +1 -0
- package/public/assets/useRecentFiles-DzJZAoOT.js +3 -0
- package/public/assets/useRegisterFieldControl-pQv-ZDoU.js +1 -0
- package/public/assets/useScrollLock-BCxn_dMp.js +1 -0
- package/public/assets/useSortMode-DjrAN-z4.js +1 -0
- package/public/docs/404.html +3 -7
- package/public/docs/assets/{app.eYTPqTeq.js → app.1gvzd5Zb.js} +1 -1
- package/public/docs/assets/chunks/@localSearchIndexroot.DS2TQP5_.js +1 -0
- package/public/docs/assets/chunks/{VPLocalSearchBox.DsZrQKQR.js → VPLocalSearchBox.CNxT3s0I.js} +1 -1
- package/public/docs/assets/chunks/{theme.DsTNE2pE.js → theme.C5lLqUv7.js} +2 -2
- package/public/docs/assets/contributor-guide_architecture_board-widgets.md.CqKM_jEG.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_board-widgets.md.CqKM_jEG.lean.js +1 -0
- package/public/docs/assets/{contributor-guide_architecture_board-widgets_caching-and-memory.md.8bH1HnZp.js → contributor-guide_architecture_board-widgets_caching-and-memory.md.BYDo3ClR.js} +1 -1
- package/public/docs/assets/contributor-guide_architecture_board-widgets_plan-advisor.md.ajUAVdbc.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_board-widgets_visual-system-and-templating.md.WqY74T0T.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_board-widgets_visual-system-and-templating.md.WqY74T0T.lean.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_detector-contract.md.CHHgywoP.js +1 -0
- package/public/docs/assets/{contributor-guide_architecture_detector-contract.md.wj6Et6UD.lean.js → contributor-guide_architecture_detector-contract.md.CHHgywoP.lean.js} +1 -1
- package/public/docs/assets/contributor-guide_architecture_detector-contract_plan-attribution.md.DIz3_oz9.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_detector-contract_plan-attribution.md.DIz3_oz9.lean.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_detector-contract_threshold-tables.md.WH4tRHPL.js +1 -0
- package/public/docs/assets/{contributor-guide_architecture_detector-contract_threshold-tables.md.CKjWG56Y.lean.js → contributor-guide_architecture_detector-contract_threshold-tables.md.WH4tRHPL.lean.js} +1 -1
- package/public/docs/assets/{contributor-guide_architecture_drill-down.md.CqZPrdo9.js → contributor-guide_architecture_drill-down.md.yB-Hz2XT.js} +1 -1
- package/public/docs/assets/{contributor-guide_architecture_drill-down.md.CqZPrdo9.lean.js → contributor-guide_architecture_drill-down.md.yB-Hz2XT.lean.js} +1 -1
- package/public/docs/assets/contributor-guide_architecture_drill-down_plan-graph.md.BQZE04sw.js +1 -0
- package/public/docs/assets/{contributor-guide_architecture_drill-down_plan-graph.md.DwOozIEs.lean.js → contributor-guide_architecture_drill-down_plan-graph.md.BQZE04sw.lean.js} +1 -1
- package/public/docs/assets/contributor-guide_architecture_impact-estimation.md.K71YB-Rr.js +1 -0
- package/public/docs/assets/{contributor-guide_architecture_impact-estimation.md.CZv_ZGOp.lean.js → contributor-guide_architecture_impact-estimation.md.K71YB-Rr.lean.js} +1 -1
- package/public/docs/assets/contributor-guide_architecture_impact-estimation_caveats-tuning-and-coverage.md.DLCAffwn.js +1 -0
- package/public/docs/assets/{contributor-guide_architecture_impact-estimation_caveats-tuning-and-coverage.md.BUucRc0A.lean.js → contributor-guide_architecture_impact-estimation_caveats-tuning-and-coverage.md.DLCAffwn.lean.js} +1 -1
- package/public/docs/assets/contributor-guide_architecture_impact-estimation_stage-union-rollup.md.JFrzDMwo.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_impact-estimation_stage-union-rollup.md.JFrzDMwo.lean.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_overview.md.nxkpOhgf.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_state-and-history_run-comparison-internals.md.U-9KMDFK.js +1 -0
- package/public/docs/assets/{contributor-guide_architecture_state-and-history_run-comparison-internals.md.CZA0JLtV.lean.js → contributor-guide_architecture_state-and-history_run-comparison-internals.md.U-9KMDFK.lean.js} +1 -1
- package/public/docs/assets/contributor-guide_architecture_widget-rendering.md.BrSz8Ezh.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_widget-rendering_findings-tab.md.B7rjSF_h.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_widget-rendering_findings-tab.md.B7rjSF_h.lean.js +1 -0
- package/public/docs/assets/{contributor-guide_architecture_widget-rendering_list-sort-mode.md.BuHKgH0C.js → contributor-guide_architecture_widget-rendering_list-sort-mode.md.37hcZJ7q.js} +1 -1
- package/public/docs/assets/{contributor-guide_architecture_widget-rendering_row-expand-contract.md.ZT89u9f1.js → contributor-guide_architecture_widget-rendering_row-expand-contract.md.mK_VmAWk.js} +1 -1
- package/public/docs/assets/{contributor-guide_architecture_worker-protocol.md.BAnhi2-d.js → contributor-guide_architecture_worker-protocol.md.Br6OE7RW.js} +1 -1
- package/public/docs/assets/contributor-guide_architecture_worker-protocol.md.Br6OE7RW.lean.js +1 -0
- package/public/docs/assets/contributor-guide_architecture_worker-protocol_cli-and-mcp.md.IVyaXrGe.js +1 -0
- package/public/docs/assets/{contributor-guide_architecture_worker-protocol_cli-and-mcp.md.DC1YqXBp.lean.js → contributor-guide_architecture_worker-protocol_cli-and-mcp.md.IVyaXrGe.lean.js} +1 -1
- package/public/docs/assets/{contributor-guide_architecture_worker-protocol_core-and-event-validation.md.DSVFPpWb.js → contributor-guide_architecture_worker-protocol_core-and-event-validation.md.DVSXn-bb.js} +1 -1
- package/public/docs/assets/{contributor-guide_architecture_worker-protocol_evidence-availability.md.CjimIDBY.js → contributor-guide_architecture_worker-protocol_evidence-availability.md.D3S5cyOW.js} +2 -2
- package/public/docs/assets/{contributor-guide_architecture_worker-protocol_evidence-availability.md.CjimIDBY.lean.js → contributor-guide_architecture_worker-protocol_evidence-availability.md.D3S5cyOW.lean.js} +1 -1
- package/public/docs/assets/contributor-guide_architecture_worker-protocol_evidence-report.md.CtmCU57I.js +1 -0
- package/public/docs/assets/{contributor-guide_architecture_worker-protocol_evidence-report.md.DVGZOWvW.lean.js → contributor-guide_architecture_worker-protocol_evidence-report.md.CtmCU57I.lean.js} +1 -1
- package/public/docs/assets/contributor-guide_contributing.md.DBW4drtZ.js +1 -0
- package/public/docs/assets/{contributor-guide_development-setup.md.D9bu4j_c.js → contributor-guide_development-setup.md.B21ZTDhn.js} +3 -3
- package/public/docs/assets/contributor-guide_development-setup.md.B21ZTDhn.lean.js +1 -0
- package/public/docs/assets/contributor-guide_testing.md.DpkozNoG.js +4 -0
- package/public/docs/assets/{contributor-guide_testing.md.By6XGR9a.lean.js → contributor-guide_testing.md.DpkozNoG.lean.js} +1 -1
- package/public/docs/assets/{index.md.CHJVslga.js → index.md.lMm7SUMz.js} +1 -1
- package/public/docs/assets/{index.md.CHJVslga.lean.js → index.md.lMm7SUMz.lean.js} +1 -1
- package/public/docs/assets/instrument-sans-latin-ext-wdth-normal.C5E2Gvlv.woff2 +0 -0
- package/public/docs/assets/instrument-sans-latin-wdth-normal.BVScPF0l.woff2 +0 -0
- package/public/docs/assets/jetbrains-mono-cyrillic-wght-normal.D73BlboJ.woff2 +0 -0
- package/public/docs/assets/jetbrains-mono-greek-wght-normal.Bw9x6K1M.woff2 +0 -0
- package/public/docs/assets/jetbrains-mono-latin-ext-wght-normal.DBQx-q_a.woff2 +0 -0
- package/public/docs/assets/jetbrains-mono-latin-wght-normal.B9CIFXIH.woff2 +0 -0
- package/public/docs/assets/jetbrains-mono-vietnamese-wght-normal.Bt-aOZkq.woff2 +0 -0
- package/public/docs/assets/style.Cfxqlj0y.css +1 -0
- package/public/docs/assets/user-guide_getting-started_ci-and-automation.md.C0pcQoNc.js +29 -0
- package/public/docs/assets/user-guide_getting-started_ci-and-automation.md.C0pcQoNc.lean.js +1 -0
- package/public/docs/assets/user-guide_getting-started_reading-the-dashboard.md.CGaxPX_1.js +1 -0
- package/public/docs/assets/{user-guide_getting-started_tuning-thresholds.md.B_MyjyZm.js → user-guide_getting-started_tuning-thresholds.md.BGVE-wrc.js} +2 -2
- package/public/docs/assets/{user-guide_getting-started_tuning-thresholds.md.B_MyjyZm.lean.js → user-guide_getting-started_tuning-thresholds.md.BGVE-wrc.lean.js} +1 -1
- package/public/docs/assets/{user-guide_mcp-tools.md.C65SjWUL.js → user-guide_mcp-tools.md.49r3L2YE.js} +1 -1
- package/public/docs/assets/{user-guide_mcp-tools_compare-runs.md.Cc_gLoix.js → user-guide_mcp-tools_compare-runs.md.BQ_kIptC.js} +11 -6
- package/public/docs/assets/user-guide_mcp-tools_compare-runs.md.BQ_kIptC.lean.js +1 -0
- package/public/docs/assets/user-guide_mcp-tools_diagnose-run.md.azCZXkH8.js +44 -0
- package/public/docs/assets/{user-guide_mcp-tools_diagnose-run.md.BP1vnHA5.lean.js → user-guide_mcp-tools_diagnose-run.md.azCZXkH8.lean.js} +1 -1
- package/public/docs/assets/{user-guide_mcp-tools_evaluate-budgets.md.BB0nDY3Z.js → user-guide_mcp-tools_evaluate-budgets.md.dpQpRQ7z.js} +2 -2
- package/public/docs/assets/{user-guide_mcp-tools_evaluate-budgets.md.BB0nDY3Z.lean.js → user-guide_mcp-tools_evaluate-budgets.md.dpQpRQ7z.lean.js} +1 -1
- package/public/docs/assets/{user-guide_mcp-tools_get-finding-evidence.md.rKyu4wts.js → user-guide_mcp-tools_get-finding-evidence.md.CH6FkNLX.js} +2 -1
- package/public/docs/assets/{user-guide_mcp-tools_get-finding-evidence.md.rKyu4wts.lean.js → user-guide_mcp-tools_get-finding-evidence.md.CH6FkNLX.lean.js} +1 -1
- package/public/docs/assets/{user-guide_mcp-tools_get-run-summary.md.DpxZ4ZNp.js → user-guide_mcp-tools_get-run-summary.md.EhaIsele.js} +1 -1
- package/public/docs/assets/user-guide_run-comparison.md.B_LOkdBf.js +1 -0
- package/public/docs/assets/user-guide_run-comparison.md.B_LOkdBf.lean.js +1 -0
- package/public/docs/assets/user-guide_understanding-findings.md.C4riKCKl.js +1 -0
- package/public/docs/assets/user-guide_understanding-findings.md.C4riKCKl.lean.js +1 -0
- package/public/docs/contributor-guide/architecture/board-widgets/caching-and-memory.html +6 -10
- package/public/docs/contributor-guide/architecture/board-widgets/plan-advisor.html +6 -10
- package/public/docs/contributor-guide/architecture/board-widgets/visual-system-and-templating.html +6 -10
- package/public/docs/contributor-guide/architecture/board-widgets.html +6 -10
- package/public/docs/contributor-guide/architecture/detector-contract/plan-attribution.html +6 -10
- package/public/docs/contributor-guide/architecture/detector-contract/threshold-tables.html +6 -10
- package/public/docs/contributor-guide/architecture/detector-contract.html +6 -10
- package/public/docs/contributor-guide/architecture/drill-down/plan-graph.html +6 -10
- package/public/docs/contributor-guide/architecture/drill-down.html +6 -10
- package/public/docs/contributor-guide/architecture/impact-estimation/caveats-tuning-and-coverage.html +6 -10
- package/public/docs/contributor-guide/architecture/impact-estimation/stage-union-rollup.html +6 -10
- package/public/docs/contributor-guide/architecture/impact-estimation.html +6 -10
- package/public/docs/contributor-guide/architecture/index.html +5 -9
- package/public/docs/contributor-guide/architecture/overview.html +6 -10
- package/public/docs/contributor-guide/architecture/state-and-history/history-server-intake.html +5 -9
- package/public/docs/contributor-guide/architecture/state-and-history/run-comparison-internals.html +6 -10
- package/public/docs/contributor-guide/architecture/state-and-history.html +5 -9
- package/public/docs/contributor-guide/architecture/widget-rendering/findings-tab.html +6 -10
- package/public/docs/contributor-guide/architecture/widget-rendering/investigation-routing.html +5 -9
- package/public/docs/contributor-guide/architecture/widget-rendering/list-sort-mode.html +6 -10
- package/public/docs/contributor-guide/architecture/widget-rendering/reference-section.html +5 -9
- package/public/docs/contributor-guide/architecture/widget-rendering/row-expand-contract.html +6 -10
- package/public/docs/contributor-guide/architecture/widget-rendering.html +6 -10
- package/public/docs/contributor-guide/architecture/worker-protocol/cli-and-mcp.html +6 -10
- package/public/docs/contributor-guide/architecture/worker-protocol/core-and-event-validation.html +6 -10
- package/public/docs/contributor-guide/architecture/worker-protocol/evidence-availability.html +7 -11
- package/public/docs/contributor-guide/architecture/worker-protocol/evidence-report.html +6 -10
- package/public/docs/contributor-guide/architecture/worker-protocol.html +6 -10
- package/public/docs/contributor-guide/contributing.html +6 -10
- package/public/docs/contributor-guide/development-setup.html +8 -12
- package/public/docs/contributor-guide/testing.html +9 -10
- package/public/docs/favicon.svg +2 -2
- package/public/docs/hashmap.json +1 -1
- package/public/docs/index.html +6 -10
- package/public/docs/logo-dark.svg +1 -0
- package/public/docs/logo-light.svg +1 -0
- package/public/docs/tuning-reference/anti-patterns.html +5 -9
- package/public/docs/tuning-reference/aqe.html +5 -9
- package/public/docs/tuning-reference/bottleneck-broadcast-sizing.html +5 -9
- package/public/docs/tuning-reference/bottleneck-cold-start.html +5 -9
- package/public/docs/tuning-reference/bottleneck-duplicate-plan-subtree.html +5 -9
- package/public/docs/tuning-reference/bottleneck-failures.html +5 -9
- package/public/docs/tuning-reference/bottleneck-gc.html +5 -9
- package/public/docs/tuning-reference/bottleneck-job-failure-rate.html +5 -9
- package/public/docs/tuning-reference/bottleneck-memory-utilization.html +5 -9
- package/public/docs/tuning-reference/bottleneck-retry-waste.html +5 -9
- package/public/docs/tuning-reference/bottleneck-shuffle.html +5 -9
- package/public/docs/tuning-reference/bottleneck-skew.html +5 -9
- package/public/docs/tuning-reference/bottleneck-slow-host.html +5 -9
- package/public/docs/tuning-reference/bottleneck-small-files.html +5 -9
- package/public/docs/tuning-reference/bottleneck-spill.html +5 -9
- package/public/docs/tuning-reference/bottleneck-straggler.html +5 -9
- package/public/docs/tuning-reference/bottleneck-tiny-tasks.html +5 -9
- package/public/docs/tuning-reference/bottleneck-utilization.html +5 -9
- package/public/docs/tuning-reference/caching.html +5 -9
- package/public/docs/tuning-reference/cluster-config.html +5 -9
- package/public/docs/tuning-reference/config.html +5 -9
- package/public/docs/tuning-reference/data-formats.html +5 -9
- package/public/docs/tuning-reference/index.html +5 -9
- package/public/docs/tuning-reference/intro.html +5 -9
- package/public/docs/tuning-reference/joins.html +5 -9
- package/public/docs/tuning-reference/memory-model.html +5 -9
- package/public/docs/tuning-reference/metrics.html +5 -9
- package/public/docs/tuning-reference/partitioning.html +5 -9
- package/public/docs/tuning-reference/pyspark.html +5 -9
- package/public/docs/tuning-reference/shuffle.html +5 -9
- package/public/docs/tuning-reference/spark-architecture.html +5 -9
- package/public/docs/tuning-reference/table-formats.html +5 -9
- package/public/docs/user-guide/alternative-log-retrieval/managed-platforms.html +5 -9
- package/public/docs/user-guide/alternative-log-retrieval/ssh-bastion.html +5 -9
- package/public/docs/user-guide/alternative-log-retrieval.html +5 -9
- package/public/docs/user-guide/getting-started/ci-and-automation.html +17 -15
- package/public/docs/user-guide/getting-started/reading-the-dashboard.html +6 -10
- package/public/docs/user-guide/getting-started/regression-metric-keys.html +5 -9
- package/public/docs/user-guide/getting-started/tuning-thresholds.html +7 -11
- package/public/docs/user-guide/getting-started.html +5 -9
- package/public/docs/user-guide/mcp-tools/compare-runs.html +16 -15
- package/public/docs/user-guide/mcp-tools/diagnose-run.html +28 -11
- package/public/docs/user-guide/mcp-tools/evaluate-budgets.html +6 -10
- package/public/docs/user-guide/mcp-tools/get-finding-documentation.html +5 -9
- package/public/docs/user-guide/mcp-tools/get-finding-evidence.html +7 -10
- package/public/docs/user-guide/mcp-tools/get-reference-doc.html +5 -9
- package/public/docs/user-guide/mcp-tools/get-run-summary.html +6 -10
- package/public/docs/user-guide/mcp-tools/list-runs.html +5 -9
- package/public/docs/user-guide/mcp-tools.html +6 -10
- package/public/docs/user-guide/run-comparison/how-stages-are-matched.html +5 -9
- package/public/docs/user-guide/run-comparison.html +6 -10
- package/public/docs/user-guide/understanding-findings.html +6 -10
- package/public/export-template.html +46 -46
- package/public/favicon.svg +2 -2
- package/public/index.html +8 -10
- package/public/sample-runs/sample-run.ndjson.gz +0 -0
- package/vendor-core/allocation.js +126 -39
- package/vendor-core/analyzer.js +85 -58
- package/vendor-core/api-merge-writes.js +3 -0
- package/vendor-core/aqe-skew.js +347 -0
- package/vendor-core/cli/budgets.js +6 -4
- package/vendor-core/cli/collect-run-pair.js +89 -0
- package/vendor-core/cli/collect-run-worker.js +16 -0
- package/vendor-core/cli/collect-run.js +1 -2
- package/vendor-core/cli/native-zstd.js +12 -16
- package/vendor-core/comparability.js +234 -0
- package/vendor-core/comparison-output.js +15 -7
- package/vendor-core/comparison-verdict.js +105 -25
- package/vendor-core/core-source-hash.txt +1 -1
- package/vendor-core/core-time-series.js +0 -1
- package/vendor-core/core-usage-locality.js +1 -1
- package/vendor-core/delta-log-paths.js +10 -1
- package/vendor-core/detectors.js +1078 -416
- package/vendor-core/docs-config.js +0 -4
- package/vendor-core/docs-content/detection/cache.md +2 -1
- package/vendor-core/docs-content/detection/cfg.md +19 -11
- package/vendor-core/docs-content/detection/cold.md +2 -1
- package/vendor-core/docs-content/detection/gc.md +7 -3
- package/vendor-core/docs-content/detection/host.md +11 -1
- package/vendor-core/docs-content/detection/mem.md +17 -6
- package/vendor-core/docs-content/detection/part.md +3 -1
- package/vendor-core/docs-content/detection/plan.md +55 -13
- package/vendor-core/docs-content/detection/shfl.md +11 -5
- package/vendor-core/docs-content/detection/skew.md +48 -1
- package/vendor-core/docs-content/detection/slow.md +4 -2
- package/vendor-core/docs-content/detection/spec.md +6 -1
- package/vendor-core/docs-content/detection/spill.md +6 -3
- package/vendor-core/docs-content/detection/strag.md +19 -6
- package/vendor-core/docs-content/detection/tiny.md +9 -3
- package/vendor-core/docs-content/detection/util.md +6 -2
- package/vendor-core/effective-conf.js +7 -10
- package/vendor-core/efficiency-model.js +24 -16
- package/vendor-core/etl-phases.js +1 -2
- package/vendor-core/event-handlers.js +175 -57
- package/vendor-core/event-schemas.js +21 -16
- package/vendor-core/evidence-availability.js +9 -2
- package/vendor-core/evidence-report.js +118 -35
- package/vendor-core/executor-peaks.js +41 -0
- package/vendor-core/export-data.js +5 -5
- package/vendor-core/finding-identity.js +78 -0
- package/vendor-core/finding-presentation.js +129 -39
- package/vendor-core/finding-types.js +108 -30
- package/vendor-core/format-utils.js +14 -15
- package/vendor-core/html-export.js +1 -1
- package/vendor-core/impact-band.js +2 -2
- package/vendor-core/impact-format.js +47 -19
- package/vendor-core/impact-model.js +28 -17
- package/vendor-core/job-groups.js +4 -4
- package/vendor-core/mcp-server-factory.js +48 -12
- package/vendor-core/mcp-tools.js +179 -24
- package/vendor-core/median.js +2 -2
- package/vendor-core/nested-loop-join.js +73 -0
- package/vendor-core/occupancy.js +1 -2
- package/vendor-core/parser-worker.js +1 -1
- package/vendor-core/plan-graph-model.js +14 -22
- package/vendor-core/plan-node-detail.js +2 -3
- package/vendor-core/plan-summary.js +24 -19
- package/vendor-core/plan-tree-walk.js +6 -8
- package/vendor-core/python-stage.js +12 -1
- package/vendor-core/recommendation-rollup.js +13 -12
- package/vendor-core/redact.js +52 -46
- package/vendor-core/remediation.js +10 -5
- package/vendor-core/run-aggregates.js +6 -8
- package/vendor-core/run-comparison.js +226 -66
- package/vendor-core/run-identity.js +12 -0
- package/vendor-core/run-interpretation.js +21 -0
- package/vendor-core/run-metrics.js +2 -2
- package/vendor-core/run-output.js +44 -11
- package/vendor-core/run-totals.js +12 -0
- package/vendor-core/run-verdict.js +76 -3
- package/vendor-core/scaling-sim.js +3 -4
- package/vendor-core/snappy-block.js +2 -2
- package/vendor-core/spark-conf.js +168 -0
- package/vendor-core/sql-stages.js +2 -2
- package/vendor-core/stage-alignment.js +2 -12
- package/vendor-core/stage-identity.js +58 -3
- package/vendor-core/stage-label.js +14 -0
- package/vendor-core/stage-plan-nodes.js +17 -3
- package/vendor-core/stage-quantiles.js +141 -9
- package/vendor-core/stage-structure.js +17 -3
- package/vendor-core/threshold-overrides.js +9 -3
- package/vendor-core/types.js +70 -23
- package/vendor-core/wall-clock.js +8 -0
- package/vendor-core/wasted-core-hours.js +12 -12
- package/vendor-core/write-targets.js +146 -14
- package/vendor-core/zstd-worker-client.js +1 -1
- package/vendor-core/zstd-worker.js +1 -1
- package/public/assets/AutoscalingChurn-8t3U3isq.js +0 -1
- package/public/assets/CacheUtilization-CJs9tTum.js +0 -1
- package/public/assets/CachingOpportunity-D1NcHs0V.js +0 -1
- package/public/assets/ColdStart-CdRJ9gD8.js +0 -1
- package/public/assets/ConfigAudit-B5Gbe5js.js +0 -1
- package/public/assets/CoreUsageArea-a--NTRGY.js +0 -1
- package/public/assets/Dashboard-C1hNeX49.js +0 -2
- package/public/assets/DisclosureContext-ZpE6CkHx.js +0 -1
- package/public/assets/DuplicatePlanSubtree-dobXdz7E.js +0 -1
- package/public/assets/ExecutorUtilization-D9grwi7t.js +0 -1
- package/public/assets/GcPressure-8-G2ri10.js +0 -1
- package/public/assets/IncompleteRun-B91lky7a.js +0 -1
- package/public/assets/JobFailures-BsWvBMyJ.js +0 -1
- package/public/assets/MemoryUtilization-BM5schZI.js +0 -1
- package/public/assets/OverBroadcast-DdN8JIJH.js +0 -1
- package/public/assets/PartitionHint-CUvbnnxy.js +0 -1
- package/public/assets/PartitionSizing-CY5HDYtp.js +0 -1
- package/public/assets/PlanExplorer-DgHCDBD_.js +0 -1
- package/public/assets/PlanGraphRoute-DH3KJb8j.js +0 -1
- package/public/assets/RetryWaste-DOnE9vGF.js +0 -1
- package/public/assets/ShuffleIO-MMnDESkF.js +0 -1
- package/public/assets/Skew-BmZZJ5ms.js +0 -1
- package/public/assets/SlowHost-CsJzfEqo.js +0 -1
- package/public/assets/SmallFiles-BoK3R1Ex.js +0 -1
- package/public/assets/SpeculationWaste-CnVxB5AJ.js +0 -1
- package/public/assets/Spill-BhNicyBy.js +0 -1
- package/public/assets/StageFailed-mAhHU4l_.js +0 -1
- package/public/assets/StageFindingGroup-BEtPWcT0.js +0 -1
- package/public/assets/StageHeader-DJkYkrsU.js +0 -1
- package/public/assets/StageShape-BDxRknLp.js +0 -1
- package/public/assets/StageSlowness-BPRw-otN.js +0 -1
- package/public/assets/Straggler-CZCbnOWP.js +0 -1
- package/public/assets/TaskFailures-C57YcLFQ.js +0 -1
- package/public/assets/TinyTask-Bi84qU7n.js +0 -1
- package/public/assets/UnderBroadcast-DdQV7htE.js +0 -1
- package/public/assets/charts-vendor-0VMaLVLN.js +0 -59
- package/public/assets/finding-anchor-Cl6_5hfV.js +0 -1
- package/public/assets/impact-sort-CssZ6MT2.js +0 -1
- package/public/assets/index-2h_TgUAb.css +0 -2
- package/public/assets/index-B-03mG7K.js +0 -14
- package/public/assets/plan-graph-vendor-BYl-AzN5.js +0 -7
- package/public/assets/react-vendor-DEdfrRTJ.js +0 -9
- package/public/assets/select-CQjNhprm.js +0 -1
- package/public/assets/usePagedRows-Dyl6T8Ok.js +0 -1
- package/public/assets/useRecentFiles-XZEnLlal.js +0 -11
- package/public/assets/useSortMode-Dhvit8dt.js +0 -1
- package/public/docs/assets/chunks/@localSearchIndexroot.u_e5bQz4.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_board-widgets.md.YQcj5EI4.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_board-widgets.md.YQcj5EI4.lean.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_board-widgets_plan-advisor.md.RlzvUmNm.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_board-widgets_visual-system-and-templating.md.DYgUpIJB.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_board-widgets_visual-system-and-templating.md.DYgUpIJB.lean.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_detector-contract.md.wj6Et6UD.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_detector-contract_plan-attribution.md.yNex4bys.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_detector-contract_plan-attribution.md.yNex4bys.lean.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_detector-contract_threshold-tables.md.CKjWG56Y.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_drill-down_plan-graph.md.DwOozIEs.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_impact-estimation.md.CZv_ZGOp.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_impact-estimation_caveats-tuning-and-coverage.md.BUucRc0A.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_impact-estimation_stage-union-rollup.md.DdCGtAGu.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_impact-estimation_stage-union-rollup.md.DdCGtAGu.lean.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_overview.md.C1sSvm9i.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_state-and-history_run-comparison-internals.md.CZA0JLtV.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_widget-rendering.md.BOZ1azXG.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_widget-rendering_findings-tab.md.BQXycK6G.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_widget-rendering_findings-tab.md.BQXycK6G.lean.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_worker-protocol.md.BAnhi2-d.lean.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_worker-protocol_cli-and-mcp.md.DC1YqXBp.js +0 -1
- package/public/docs/assets/contributor-guide_architecture_worker-protocol_evidence-report.md.DVGZOWvW.js +0 -1
- package/public/docs/assets/contributor-guide_contributing.md.CQMvGwFt.js +0 -1
- package/public/docs/assets/contributor-guide_development-setup.md.D9bu4j_c.lean.js +0 -1
- package/public/docs/assets/contributor-guide_testing.md.By6XGR9a.js +0 -1
- package/public/docs/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
- package/public/docs/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
- package/public/docs/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
- package/public/docs/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
- package/public/docs/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
- package/public/docs/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
- package/public/docs/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
- package/public/docs/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
- package/public/docs/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
- package/public/docs/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
- package/public/docs/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
- package/public/docs/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
- package/public/docs/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
- package/public/docs/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
- package/public/docs/assets/style.tmDhD3c8.css +0 -1
- package/public/docs/assets/user-guide_getting-started_ci-and-automation.md.OUQqw3mI.js +0 -23
- package/public/docs/assets/user-guide_getting-started_ci-and-automation.md.OUQqw3mI.lean.js +0 -1
- package/public/docs/assets/user-guide_getting-started_reading-the-dashboard.md.Obf3W3__.js +0 -1
- package/public/docs/assets/user-guide_mcp-tools_compare-runs.md.Cc_gLoix.lean.js +0 -1
- package/public/docs/assets/user-guide_mcp-tools_diagnose-run.md.BP1vnHA5.js +0 -23
- package/public/docs/assets/user-guide_run-comparison.md.BUALkohi.js +0 -1
- package/public/docs/assets/user-guide_run-comparison.md.BUALkohi.lean.js +0 -1
- package/public/docs/assets/user-guide_understanding-findings.md.C9YRruMT.js +0 -1
- package/public/docs/assets/user-guide_understanding-findings.md.C9YRruMT.lean.js +0 -1
- /package/public/docs/assets/{contributor-guide_architecture_board-widgets_caching-and-memory.md.8bH1HnZp.lean.js → contributor-guide_architecture_board-widgets_caching-and-memory.md.BYDo3ClR.lean.js} +0 -0
- /package/public/docs/assets/{contributor-guide_architecture_board-widgets_plan-advisor.md.RlzvUmNm.lean.js → contributor-guide_architecture_board-widgets_plan-advisor.md.ajUAVdbc.lean.js} +0 -0
- /package/public/docs/assets/{contributor-guide_architecture_overview.md.C1sSvm9i.lean.js → contributor-guide_architecture_overview.md.nxkpOhgf.lean.js} +0 -0
- /package/public/docs/assets/{contributor-guide_architecture_widget-rendering.md.BOZ1azXG.lean.js → contributor-guide_architecture_widget-rendering.md.BrSz8Ezh.lean.js} +0 -0
- /package/public/docs/assets/{contributor-guide_architecture_widget-rendering_list-sort-mode.md.BuHKgH0C.lean.js → contributor-guide_architecture_widget-rendering_list-sort-mode.md.37hcZJ7q.lean.js} +0 -0
- /package/public/docs/assets/{contributor-guide_architecture_widget-rendering_row-expand-contract.md.ZT89u9f1.lean.js → contributor-guide_architecture_widget-rendering_row-expand-contract.md.mK_VmAWk.lean.js} +0 -0
- /package/public/docs/assets/{contributor-guide_architecture_worker-protocol_core-and-event-validation.md.DSVFPpWb.lean.js → contributor-guide_architecture_worker-protocol_core-and-event-validation.md.DVSXn-bb.lean.js} +0 -0
- /package/public/docs/assets/{contributor-guide_contributing.md.CQMvGwFt.lean.js → contributor-guide_contributing.md.DBW4drtZ.lean.js} +0 -0
- /package/public/docs/assets/{user-guide_getting-started_reading-the-dashboard.md.Obf3W3__.lean.js → user-guide_getting-started_reading-the-dashboard.md.CGaxPX_1.lean.js} +0 -0
- /package/public/docs/assets/{user-guide_mcp-tools.md.C65SjWUL.lean.js → user-guide_mcp-tools.md.49r3L2YE.lean.js} +0 -0
- /package/public/docs/assets/{user-guide_mcp-tools_get-run-summary.md.DpxZ4ZNp.lean.js → user-guide_mcp-tools_get-run-summary.md.EhaIsele.lean.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
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,p as i,ut as a}from"./DisclosureContext-ZpE6CkHx.js";import{p as o}from"./plan-graph-vendor-BYl-AzN5.js";import{c as s,l as c}from"./useRecentFiles-XZEnLlal.js";import{P as l,S as u,k as d,l as f}from"./index-B-03mG7K.js";import{a as p,o as m,r as h,s as g,t as _}from"./Dashboard-C1hNeX49.js";import{i as v,r as y}from"./impact-sort-CssZ6MT2.js";import{n as b,t as x}from"./finding-anchor-Cl6_5hfV.js";import{t as S}from"./usePagedRows-Dyl6T8Ok.js";import{n as C,t as w}from"./useSortMode-Dhvit8dt.js";var T=e(t(),1),E=o();function D({finding:e}){let t=b([e]);return(0,E.jsxs)(`li`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`space-y-2 ${x} transition-colors ${t.flashClassName}`,children:[e.stageIds.length>0?(0,E.jsx)(p,{pills:e.stageIds.map(e=>({id:e}))}):null,(0,E.jsxs)(`p`,{children:[f(e.recommendation??``).measured??e.recommendation,` `,(0,E.jsx)(_,{finding:e})]})]})}var O=(0,T.memo)(function({catalog:e,defaultCollapsed:t=!0}){let{sortMode:o,setSortMode:f,orderBy:p}=w(),[_,b]=(0,T.useState)(!t),[x,O]=(0,T.useState)(0),{findings:k,pills:A}=(0,T.useMemo)(()=>{let t=s(e,`overBroadcast`).sort((e,t)=>n[e.impactBand]-n[t.impactBand]);return{findings:t,pills:[...new Set(t.flatMap(e=>e.stageIds))].map(e=>({id:e}))}},[e]),j=p(k,e=>[e],v),M=l(),N=M?j.findIndex(e=>e===M.finding):null,{totalPages:P,effectivePage:F,visible:I}=S(j,x,O,N);return k.length===0?null:(0,E.jsxs)(d,{title:`Oversized Broadcast Join`,fixFor:k,impactBand:a(k),open:_,onOpenChange:b,badges:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r,{type:`overBroadcast`,impactBand:a(k)??`info`,className:u}),y(k,k.length,_)?(0,E.jsx)(C,{mode:o,onChange:f}):null]}),statusBadge:(0,E.jsx)(i,{children:(0,E.jsx)(c,{confidence:k[0].confidence,validationRequired:k[0].validationRequired,evidenceKey:`sqlPlan`})}),summary:(0,E.jsx)(m,{value:`${A.length} stage${A.length===1?``:`s`}`,context:g(k.length)}),children:[(0,E.jsx)(`ul`,{className:`space-y-3 text-sm`,children:I.map(e=>(0,E.jsx)(D,{finding:e},e.id))}),(0,E.jsx)(h,{page:F,totalPages:P,onPrev:()=>O(e=>e-1),onNext:()=>O(e=>e+1)})]})});export{O as OverBroadcast};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e}from"./plan-graph-vendor-BYl-AzN5.js";var t=e();function n({hint:e}){return(0,t.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Try `,(0,t.jsxs)(`code`,{children:[`spark.sql.shuffle.partitions = `,e.recommended]}),` (now `,e.current,` tasks; target 128 MB per partition)`]})}export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{U as n,Y as r,bt as i,d as a,it as o,ut as s}from"./DisclosureContext-ZpE6CkHx.js";import{p as c}from"./plan-graph-vendor-BYl-AzN5.js";import{c as l,i as u}from"./useRecentFiles-XZEnLlal.js";import{P as d,k as f}from"./index-B-03mG7K.js";import{o as p,r as m,s as h,t as g}from"./Dashboard-C1hNeX49.js";import{r as _}from"./impact-sort-CssZ6MT2.js";import{n as v,t as y}from"./finding-anchor-Cl6_5hfV.js";import{t as b}from"./usePagedRows-Dyl6T8Ok.js";import{n as x,t as S}from"./useSortMode-Dhvit8dt.js";import{t as C}from"./StageHeader-DJkYkrsU.js";import{a as w,i as T,n as E,r as D,t as O}from"./select-CQjNhprm.js";import{t as k}from"./PlanExplorer-DgHCDBD_.js";var A=e(t(),1),j=c();function M(e){if(e.rule===`lowShuffleParallelism`)return`${o(e)} tasks carrying the shuffle`;let t=o(e);return e.rule===`maxPartitionTooBig`?`Largest partition ${r(t)} (too large)`:`Largest partition ${r(t)}`}function N({entry:e,appModel:t}){let n=i(),r=v(e.partitions),a=n===`advanced`&&u(e.stageId,t);return(0,j.jsxs)(`div`,{ref:r.ref,tabIndex:r.tabIndex,"data-flashed":r.dataFlashed,className:`space-y-2 ${y} transition-colors ${r.flashClassName}`,children:[(0,j.jsx)(C,{stageId:e.stageId,appModel:t}),(0,j.jsxs)(`div`,{className:`space-y-2 pt-1`,children:[(0,j.jsx)(`ul`,{className:`list-disc space-y-1 pl-5 text-xs text-muted-foreground`,children:e.partitions.map(e=>(0,j.jsxs)(`li`,{children:[M(e),` `,(0,j.jsx)(g,{finding:e})]},e.id))}),a?(0,j.jsx)(k,{stageId:e.stageId,appModel:t}):null]})]})}var P=(0,A.memo)(function({appModel:e,catalog:t,defaultCollapsed:r=!0}){let[i,o]=(0,A.useState)(0),[c,u]=(0,A.useState)(!r),{sortMode:g,setSortMode:v,orderBy:y}=S(),C=d(),{partitionFindings:k,sorted:M,orderedEntries:P}=(0,A.useMemo)(()=>{let e=l(t,`partitionSizing`),r=new Map;for(let t of e){if(t.stageId==null)continue;let e=r.get(t.stageId);e?(e.partitions.push(t),n[t.impactBand]<n[e.impactBand]&&(e.impactBand=t.impactBand)):r.set(t.stageId,{stageId:t.stageId,partitions:[t],impactBand:t.impactBand})}let i=[...r.values()].sort((e,t)=>n[e.impactBand]-n[t.impactBand]||e.stageId-t.stageId);return{partitionFindings:e,sorted:i,orderedEntries:y(i,e=>e.partitions,e=>e.stageId)}},[t,g]),F=C?P.findIndex(e=>e.partitions.some(e=>e===C.finding)):null,{totalPages:I,effectivePage:L,visible:R}=b(P,i,o,F);if(k.length===0){let t=e.stages.size;return(0,j.jsx)(f,{title:`Partition Sizing`,open:c,onOpenChange:u,summary:(0,j.jsx)(p,{value:`No issues`,context:`no issue detected: partition sizing checked across ${t} stage${t===1?``:`s`}`}),children:(0,j.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No partition-sizing issues detected.`})})}let z=s(k),B=_(k,M.length,c);return(0,j.jsx)(f,{title:`Partition Sizing`,fixFor:k,impactBand:z,open:c,onOpenChange:u,summary:(0,j.jsx)(p,{value:`Stage ${M[0].stageId}`,context:h(k.length)}),badges:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(a,{type:`partitionSizing`,impactBand:z??`info`}),B?(0,j.jsx)(x,{mode:g,onChange:e=>{v(e),o(0)}}):null]}),children:(0,j.jsxs)(`div`,{className:`space-y-4`,children:[R.map(t=>(0,j.jsx)(N,{entry:t,appModel:e},t.stageId)),(0,j.jsx)(m,{page:L,totalPages:I,onPrev:()=>o(e=>e-1),onNext:()=>o(e=>e+1),renderJumpControl:()=>(0,j.jsxs)(O,{value:String(L*6),onValueChange:e=>o(Math.floor(Number(e)/6)),children:[(0,j.jsx)(T,{size:`sm`,"aria-label":`Jump to stage`,children:(0,j.jsx)(w,{placeholder:`Jump to stage`})}),(0,j.jsx)(E,{children:P.map((e,t)=>(0,j.jsxs)(D,{value:String(t),children:[`Stage `,e.stageId]},e.stageId))})]})})]})})});export{P as PartitionSizing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{a as n,gt as r,ht as i,i as a,r as o}from"./DisclosureContext-ZpE6CkHx.js";import{p as s}from"./plan-graph-vendor-BYl-AzN5.js";import{i as c,r as l}from"./useRecentFiles-XZEnLlal.js";var u=e(t(),1),d=s();function f({stageId:e,appModel:t}){let[s,f]=(0,u.useState)(!1);return c(e,t)?(0,d.jsx)(`div`,{className:`space-y-3`,children:(0,d.jsxs)(o,{open:s,onOpenChange:f,children:[(0,d.jsxs)(n,{"aria-expanded":String(s),className:`flex cursor-pointer items-center gap-2 bg-transparent text-left`,children:[(0,d.jsx)(`h3`,{className:`font-heading text-sm font-medium`,children:`Plan context`}),s?(0,d.jsx)(i,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}):(0,d.jsx)(r,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`})]}),(0,d.jsx)(a,{keepMounted:!0,children:(0,d.jsx)(`div`,{className:`pt-3`,children:(0,d.jsx)(l,{stageId:e,appModel:t})})})]})}):null}export{f as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{C as n,S as r,T as i,_ as a,b as o,g as s,h as c,m as l,v as u,w as d,x as f,y as p}from"./react-vendor-DEdfrRTJ.js";import{Q as m,S as h,Tt as g,Y as _,Z as v,_t as y,d as b,l as x,lt as S,o as C,s as w,u as T,ut as E,vt as D}from"./DisclosureContext-ZpE6CkHx.js";import{a as O,c as ee,d as k,f as A,i as j,l as M,n as N,o as P,p as F,r as I,s as L,t as R,u as z}from"./plan-graph-vendor-BYl-AzN5.js";import{d as B,i as te,n as ne,s as V,t as re}from"./useRecentFiles-XZEnLlal.js";import{C as ie,D as ae,E as oe,Mt as se,O as ce,Tt as le,Y as ue,_t as de,bt as fe,ft as pe,gt as H,ht as me,jt as U,mt as W,pt as G,s as he,vt as ge,w as _e,xt as ve,yt as ye}from"./index-B-03mG7K.js";import{t as be}from"./impact-sort-CssZ6MT2.js";var xe={name:`arrow-left-right`,size:24,node:[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]};xe.node;var Se=y(xe),Ce={name:`flag`,size:24,node:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]};Ce.node;var we=y(Ce),Te={name:`map`,size:24,node:[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]};Te.node;var Ee=y(Te),De={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};De.node;var Oe=y(De),ke={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};ke.node;var Ae=y(ke),je={name:`timer`,size:24,node:[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`,key:`14vaq8`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`,key:`17fdiu`}],[`circle`,{cx:`12`,cy:`14`,r:`8`,key:`1e1u0o`}]]};je.node;var Me=y(je),Ne={name:`zoom-in`,size:24,node:[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]};Ne.node;var Pe=y(Ne),Fe={name:`zoom-out`,size:24,node:[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]};Fe.node;var Ie=y(Fe),K=e(t(),1);function Le({id:e,sourceNodeId:t,planNode:n,category:r,segmentIndex:i,splitRole:a,durationShare:o,exclusiveDurationShare:s,findings:c}){return{id:e,sourceNodeId:t,label:n.name,category:r,operatorDetail:H(n.name,n.detail??``),primaryMetric:me(n.metrics),segmentIndex:i,splitRole:a,durationShare:o??null,exclusiveDurationShare:s??null,findings:c,metrics:(n.metrics??[]).map(e=>({name:e.name,value:W(e)})),detailText:n.detail&&n.detail!==n.name?n.detail:``}}function Re(e,t){let{scope:n,stageId:r,appModel:i,findings:a=[],durationMode:o=`exclusive`}=t;if(!e)return{nodes:[],edges:[],segmentIndex:null,segmentCount:0,scope:`full`,segmentStageIds:new Map};let s=i.stages.get(r)?.sqlExecutionId??null,c=s==null?null:i.sql.get(s),{segments:l,segOf:u,segmentTopology:d}=ge(e),f=l.filter(Boolean).length,p=c&&s!=null?pe(e,i,c,s,o):null,m=o===`exclusive`?p:c&&s!=null?pe(e,i,c,s,`exclusive`):null,h=new Map,g=c&&s!=null?de(s,i.stages):[];if(g.length){let e=new Map;for(let t of g){let n=i.stages.get(t);n&&e.set(t,{submittedAt:n.submittedAt,completedAt:n.completedAt})}for(let[t,n]of ye(l,e,g,d))h.set(t,n)}let _=new Map;if(s!=null){for(let e of a)if(`executionId`in e&&e.executionId===s)for(let t of e.planNodeIds??[]){let n=_.get(t);n?n.push(e):_.set(t,[e])}}let v=[],y=[],b=new Map;fe(e,(e,t)=>{let n=e.id,r=G(e.name),a=u.get(e),o=t?t.id:null,s=e.exchangeRole===`write`&&t?t.id:n,c=Le({id:n,sourceNodeId:s,planNode:e,category:r,segmentIndex:a,splitRole:e.exchangeRole??null,durationShare:p?.get(e),exclusiveDurationShare:m?.get(e),findings:_.get(n)??[]});if(v.push(c),e.exchangeRole){let t=b.get(s)??{};t[e.exchangeRole]=c,b.set(s,t)}if(o){let t={id:`${o}->${n}`,source:o,target:n};if(e.exchangeRole===`write`){let e=h.get(a),n=e==null?void 0:i.stages.get(e),r=n?.shuffleWriteBytes||n?.shuffleReadBytes;if(r){t.shuffleBytes=r;let e=b.get(s)??{};e.shuffleBytes=r,b.set(s,e)}}y.push(t)}},{dedupe:!0});for(let{read:e,write:t,shuffleBytes:n}of b.values())e&&t&&(e.pairedNodeId=t.id,t.pairedNodeId=e.id),n!=null&&(e&&(e.exchangeShuffleBytes=n),t&&(t.exchangeShuffleBytes=n));if(n===`full`)return{nodes:v,edges:y,segmentIndex:null,segmentCount:f,scope:`full`,segmentStageIds:h};let x=null;for(let[e,t]of h)if(t===r){x=e;break}if(x===null)return{nodes:v,edges:y,segmentIndex:null,segmentCount:f,scope:`full`,segmentStageIds:h};let S=new Set;return{nodes:v.filter(e=>e.segmentIndex===x&&(S.add(e.id),!0)),edges:y.filter(e=>S.has(e.source)&&S.has(e.target)),segmentIndex:x,segmentCount:f,scope:`segment`,segmentStageIds:h}}var ze=24,Be=32;function Ve(e,t,n={}){let r=new R.graphlib.Graph({compound:!!n.groupOf});r.setGraph({rankdir:`RL`,nodesep:128,ranksep:60,ranker:`tight-tree`}),r.setDefaultEdgeLabel(()=>({}));let i=new Set;if(n.groupOf){for(let t of e){let e=n.groupOf(t);e&&i.add(e)}for(let e of i)r.setNode(e,{})}for(let t of e){r.setNode(t.id,{width:220,height:90});let e=n.groupOf?.(t);e&&r.setParent(t.id,e)}for(let e of t)r.setEdge(e.source,e.target);return R.layout(r),e.map(e=>{let t=r.node(e.id);return{...e,position:{x:t.x-110,y:t.y-45}}})}function He(e,t,n={}){let r=n.paddingX??ze,i=n.paddingY??ze,a=n.headerHeight??Be,o=new Map;for(let n of e){let e=t(n);if(!e)continue;let r=n.position.x,i=n.position.y,a=r+220,s=i+90,c=o.get(e);c?(c.minX=Math.min(c.minX,r),c.minY=Math.min(c.minY,i),c.maxX=Math.max(c.maxX,a),c.maxY=Math.max(c.maxY,s)):o.set(e,{minX:r,minY:i,maxX:a,maxY:s})}return[...o.entries()].map(([e,t])=>({id:e,position:{x:t.minX-r,y:t.minY-i-a},width:t.maxX-t.minX+r*2,height:t.maxY-t.minY+i*2+a}))}function Ue(e,t,n={}){let r=new Set,i=[];for(let a of t){let t=t=>{let n=e(t);return n&&!r.has(n)?n:null};for(let e of He(a,t,n))r.add(e.id),i.push(e)}return i}var q=F();function We({delay:e=0,...t}){return(0,q.jsx)(p,{"data-slot":`tooltip-provider`,delay:e,...t})}function Ge({...e}){return(0,q.jsx)(i,{"data-slot":`tooltip`,...e})}function Ke({...e}){return(0,q.jsx)(d,{"data-slot":`tooltip-trigger`,...e})}function qe({className:e,side:t=`top`,sideOffset:i=4,align:a=`center`,alignOffset:s=0,children:c,...l}){return(0,q.jsx)(n,{children:(0,q.jsx)(r,{align:a,alignOffset:s,side:t,sideOffset:i,className:`isolate z-50`,children:(0,q.jsxs)(f,{"data-slot":`tooltip-content`,className:g(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none`,e),...l,children:[c,(0,q.jsx)(o,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`})]})})})}function Je(e){return e==null?null:e>=40?`critical`:e>=15?`warning`:`info`}var J={scan:`⇩`,exchange:`⇄`,join:`⋈`,aggregate:`Σ`,sort:`↕`,filter:`∇`,aqe:`⚙`,boilerplate:`·`,transform:`→`};function Ye(e){return e.find(e=>e.impactBand===`critical`)??e.find(e=>e.impactBand===`warning`)??e[0]}function Xe({data:e}){let{label:t,operatorDetail:n,primaryMetric:r,category:i,splitRole:a,durationSharePct:o,findings:s}=e,c=J[i]??J.transform,l=Je(o);return(0,q.jsxs)(`div`,{className:`relative flex flex-col overflow-visible rounded-md border border-border bg-card px-3 py-2 text-xs shadow-sm`,style:{width:220,height:90},"data-category":i,children:[(0,q.jsx)(O,{type:`target`,position:k.Right,className:`opacity-0!`}),(0,q.jsx)(O,{type:`source`,position:k.Left,className:`opacity-0!`}),s&&s.length>0?(()=>{let e=Ye(s);return(0,q.jsxs)(Ge,{children:[(0,q.jsxs)(Ke,{"data-testid":`node-finding-badge`,className:g(`absolute -right-1 -top-1 flex items-center gap-1 rounded-full bg-card px-1.5 py-0.5 text-[10px] font-medium leading-none shadow-sm ring-1 ring-border`,x[e.impactBand]),children:[(0,q.jsx)(T,{impactBand:e.impactBand}),S(e.type),s.length>1?(0,q.jsx)(`span`,{children:s.length}):null]}),(0,q.jsx)(qe,{className:`max-w-xs`,children:(0,q.jsx)(`ul`,{className:`flex flex-col gap-1 text-left`,children:s.map((e,t)=>(0,q.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,q.jsx)(T,{impactBand:e.impactBand}),(0,q.jsx)(`span`,{children:he(e)})]},e.id??`${e.type}-${t}`))})})]})})():null,a===`read`?(0,q.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:`paired: see write half`}):null,o!=null&&l?(0,q.jsxs)(`div`,{className:`mb-1 flex shrink-0 items-center gap-1.5`,title:`Share of the plan's total stage wall time`,children:[(0,q.jsxs)(`span`,{className:g(`shrink-0 text-[10px] font-medium tabular-nums`,x[l]),children:[o,`%`]}),(0,q.jsx)(`div`,{className:`h-1.5 flex-1 overflow-hidden rounded-full bg-muted`,children:(0,q.jsx)(`div`,{"data-testid":`duration-heat-bar-fill`,className:g(`h-full rounded-full`,w[l]),style:{width:`${o>0?Math.max(o,4):0}%`}})}),(0,q.jsxs)(`span`,{className:`sr-only`,children:[`Duration share `,o,`%, `,l===`critical`?`high`:l===`warning`?`medium`:`low`]})]}):null,(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0`,children:c}),(0,q.jsx)(`span`,{className:`min-w-0 truncate font-medium`,title:t,children:t})]}),n?(0,q.jsx)(`p`,{className:`truncate text-muted-foreground`,title:n,children:n}):null,r?(0,q.jsx)(`p`,{className:`truncate text-muted-foreground`,title:r,children:r}):null]})}var Ze={read:`Read half. Consumes the shuffle written by its paired write half.`,write:`Write half. Produces the shuffle its paired read half consumes.`};function Qe({node:e,onClose:t,onJumpToPaired:n}){let r=J[e.category]??J.transform,i=e.findings??[],a=e.metrics??[],o=e.category.charAt(0).toUpperCase()+e.category.slice(1);return(0,q.jsxs)(`div`,{"data-testid":`plan-node-detail`,role:`dialog`,"aria-label":`Plan node detail: ${e.label}`,className:`flex h-full w-80 shrink-0 flex-col gap-3 overflow-y-auto border-l border-border bg-card p-3 text-xs`,children:[(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0`,children:r}),(0,q.jsx)(`span`,{className:`break-words font-medium`,children:e.label})]}),(0,q.jsx)(U,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6 shrink-0`,"aria-label":`Close node detail`,onClick:t,children:(0,q.jsx)(ve,{className:`size-4`})})]}),(0,q.jsxs)(`p`,{className:`text-muted-foreground`,children:[o,` · Segment `,e.segmentIndex+1,e.durationSharePct==null?null:(0,q.jsxs)(q.Fragment,{children:[` · `,(0,q.jsxs)(`span`,{className:`text-foreground`,children:[e.durationSharePct,`%`]}),` of plan stage time`]})]}),e.splitRole?(0,q.jsxs)(Y,{title:`Exchange`,children:[(0,q.jsx)(`p`,{className:`text-muted-foreground`,children:Ze[e.splitRole]}),e.exchangeShuffleBytes==null?e.label.startsWith(`Broadcast`)?(0,q.jsx)(`p`,{className:`mt-1 text-muted-foreground`,children:`Broadcast, no shuffle`}):null:(0,q.jsxs)(`p`,{className:`mt-1 text-muted-foreground`,children:[`Shuffle written`,` `,(0,q.jsx)(`span`,{className:`font-medium tabular-nums text-foreground`,children:_(e.exchangeShuffleBytes)})]}),e.pairedNodeId&&n?(0,q.jsxs)(U,{type:`button`,variant:`outline`,size:`sm`,className:`mt-2 h-7 w-full justify-start gap-1.5`,onClick:()=>n(e.pairedNodeId),children:[(0,q.jsx)(Se,{className:`size-3.5`,"aria-hidden":`true`}),`Jump to `,e.splitRole===`read`?`write`:`read`,` half`]}):null]}):null,i.length>0?(0,q.jsx)(Y,{title:`Findings`,children:(0,q.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:i.map((e,t)=>(0,q.jsxs)(`li`,{className:`flex items-start gap-1.5`,children:[(0,q.jsx)(b,{type:e.type,impactBand:e.impactBand,docAnchor:e.docAnchor,className:`shrink-0`}),(0,q.jsx)(`span`,{className:`break-words`,children:he(e)})]},e.id??`${e.type}-${t}`))})}):null,a.length>0?(0,q.jsx)(Y,{title:`Metrics`,children:(0,q.jsx)(`dl`,{className:`grid grid-cols-[1fr_auto] gap-x-3 gap-y-1`,children:a.map((e,t)=>(0,q.jsxs)(`div`,{className:`contents`,children:[(0,q.jsx)(`dt`,{className:`min-w-0 break-words text-muted-foreground`,children:e.name}),(0,q.jsx)(`dd`,{className:`text-right font-medium tabular-nums`,children:e.value})]},`${e.name}-${t}`))})}):null,e.detailText?(0,q.jsx)(Y,{title:`Plan detail`,children:(0,q.jsx)(`pre`,{"data-testid":`plan-node-detail-text`,className:`max-h-48 overflow-auto whitespace-pre-wrap break-words rounded bg-muted p-2 font-mono text-[11px] leading-snug`,children:e.detailText})}):null]})}function Y({title:e,children:t}){return(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`mb-1 font-medium text-muted-foreground`,children:e}),t]})}var $e=[{category:`scan`,label:`Scan`},{category:`filter`,label:`Filter`},{category:`join`,label:`Join`},{category:`aggregate`,label:`Aggregate`},{category:`sort`,label:`Sort`},{category:`exchange`,label:`Exchange`},{category:`transform`,label:`Transform`}];function et(){return(0,q.jsxs)(`div`,{"data-testid":`plan-graph-legend`,role:`region`,"aria-label":`Plan graph legend`,className:`flex max-w-md flex-col gap-2 rounded-md border border-border bg-card p-3 text-xs shadow-md`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`mb-1 font-medium text-muted-foreground`,children:`Operators`}),(0,q.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-1`,children:$e.map(({category:e,label:t})=>(0,q.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,children:J[e]}),t]},e))})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`mb-1 font-medium text-muted-foreground`,children:`Duration share`}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,q.jsx)(`span`,{className:g(`h-1.5 w-6 rounded-full`,w.info)}),` low`]}),(0,q.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,q.jsx)(`span`,{className:g(`h-1.5 w-6 rounded-full`,w.warning)}),` medium`]}),(0,q.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,q.jsx)(`span`,{className:g(`h-1.5 w-6 rounded-full`,w.critical)}),` high`]})]})]}),(0,q.jsxs)(`p`,{className:`text-muted-foreground`,children:[(0,q.jsx)(`span`,{className:`text-foreground`,children:`Edge thickness`}),` = shuffle bytes moved across an exchange.`]}),(0,q.jsxs)(`p`,{className:`text-muted-foreground`,children:[`A `,(0,q.jsx)(`span`,{className:`text-foreground`,children:`segment`}),` box groups one Exchange-bounded stage of the plan; a`,` `,(0,q.jsx)(`span`,{className:`text-foreground`,children:`stage`}),` box (full-plan view) wraps every segment of one Spark stage.`]})]})}function tt({...e}){return(0,q.jsx)(u,{"data-slot":`popover`,...e})}function nt({...e}){return(0,q.jsx)(a,{"data-slot":`popover-trigger`,...e})}function rt({align:e=`center`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=8,className:i,...a}){return(0,q.jsx)(s,{children:(0,q.jsx)(c,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,q.jsx)(l,{"data-slot":`popover-content`,className:g(`z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-3 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none`,i),...a})})})}function it({ariaLabel:e,name:t,options:n,value:r,onChange:i,trailingContent:a}){return(0,q.jsx)(We,{children:(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1.5`,role:`radiogroup`,"aria-label":e,children:[n.map(e=>(0,q.jsxs)(Ge,{children:[(0,q.jsxs)(Ke,{render:(0,q.jsx)(`label`,{className:`tap-target-comfortable flex min-h-8 items-center gap-1.5 px-1 text-sm`}),children:[(0,q.jsx)(`input`,{type:`radio`,name:t,value:e.value,checked:r===e.value,onChange:()=>i(e.value)}),e.label]}),(0,q.jsx)(qe,{children:e.description})]},e.value)),a]})})}var at=[{value:`io`,label:`I/O only`,description:`Show only scan and exchange nodes, where the plan reads or shuffles/broadcasts data.`},{value:`basic`,label:`Basic`,description:`Add join, aggregate, sort, and filter nodes to I/O; hide pass-through and boilerplate operators like Project or WholeStageCodegen.`},{value:`advanced`,label:`Advanced`,description:`Show every operator, including the pass-through and boilerplate nodes the other two modes hide.`}];function ot({mode:e,onChange:t,hiddenCount:n}){return(0,q.jsx)(it,{ariaLabel:`Node filter`,name:`plan-graph-filter`,options:at,value:e,onChange:t,trailingContent:n>0?(0,q.jsx)(C,{label:`${n} nodes hidden`,impactBand:`info`}):null})}var st=[{value:`exclusive`,label:`Node only`,description:`Each node's share reflects time spent in that operator alone, excluding its descendants.`},{value:`inclusive`,label:`Node + descendants`,description:`Each node's share adds in every descendant operator's time, so an ancestor's bar reflects its whole subtree.`}];function ct({mode:e,onChange:t}){return(0,q.jsx)(it,{ariaLabel:`Duration heat bar scope`,name:`plan-graph-duration-mode`,options:st,value:e,onChange:t})}function lt({filterMode:e,onFilterModeChange:t,hiddenCount:n,durationMode:r,onDurationModeChange:i,iconOnly:a=!1}){return(0,q.jsxs)(tt,{children:[(0,q.jsxs)(nt,{"aria-label":a?`Settings`:void 0,title:a?`Settings`:void 0,className:g(se({variant:`ghost`,size:a?`icon`:`sm`}),`tap-target-comfortable`,a?void 0:`gap-1.5`),children:[(0,q.jsx)(Ae,{"aria-hidden":`true`}),a?null:`Settings`]}),(0,q.jsxs)(rt,{align:a?`start`:`end`,side:a?`right`:`bottom`,"aria-label":`Plan graph settings`,className:`space-y-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{className:`mb-1.5 text-xs font-medium text-muted-foreground`,children:`Node filter`}),(0,q.jsx)(ot,{mode:e,onChange:t,hiddenCount:n})]}),(0,q.jsx)(`div`,{"aria-hidden":`true`,className:`h-px bg-border`}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{className:`mb-1.5 text-xs font-medium text-muted-foreground`,children:`Duration attribution`}),(0,q.jsx)(ct,{mode:r,onChange:i})]})]})]})}var X=e=>e.data;function ut({planNodes:e,problemNodes:t,filterMode:n,onFilterModeChange:r,hiddenCount:i,durationMode:a,onDurationModeChange:o,legendOpen:s,onToggleLegend:c,miniMapOpen:l,onToggleMiniMap:u}){let{zoomIn:d,zoomOut:f,fitView:p,setCenter:m}=z(),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(null),y=[...e].filter(e=>X(e).durationSharePct!=null).sort((e,t)=>(X(t).durationSharePct??0)-(X(e).durationSharePct??0)),b=e=>{e&&m(e.position.x,e.position.y,{zoom:1,duration:300})},x=(e,t,n)=>{if(e.length===0)return;let r=e[((t?e.findIndex(e=>e.id===t):-1)+1)%e.length];b(r),n(r.id)};return(0,q.jsxs)(`div`,{className:`flex w-12 shrink-0 flex-col items-center gap-1 border-r border-border bg-card/60 py-2`,children:[(0,q.jsxs)(dt,{children:[(0,q.jsx)(Z,{label:`Zoom in`,onClick:()=>d({duration:200}),children:(0,q.jsx)(Pe,{"aria-hidden":`true`})}),(0,q.jsx)(Z,{label:`Zoom out`,onClick:()=>f({duration:200}),children:(0,q.jsx)(Ie,{"aria-hidden":`true`})}),(0,q.jsx)(Z,{label:`Fit to view`,onClick:()=>p({duration:200}),children:(0,q.jsx)(Oe,{"aria-hidden":`true`})})]}),(0,q.jsx)(ft,{}),(0,q.jsxs)(dt,{children:[(0,q.jsx)(Z,{label:`Next worst duration`,disabled:y.length===0,onClick:()=>x(y,h,g),children:(0,q.jsx)(Me,{"aria-hidden":`true`})}),t.length>0?(0,q.jsx)(Z,{label:`Next problem`,onClick:()=>x(t,_,v),children:(0,q.jsx)(we,{"aria-hidden":`true`})}):null]}),(0,q.jsx)(ft,{}),(0,q.jsxs)(dt,{children:[(0,q.jsx)(lt,{iconOnly:!0,filterMode:n,onFilterModeChange:r,hiddenCount:i,durationMode:a,onDurationModeChange:o}),(0,q.jsx)(Z,{label:s?`Hide legend`:`Legend`,pressed:s,onClick:c,children:(0,q.jsx)(le,{"aria-hidden":`true`})}),(0,q.jsx)(Z,{label:l?`Hide minimap`:`Show minimap`,pressed:l,onClick:u,children:(0,q.jsx)(Ee,{"aria-hidden":`true`})})]})]})}function dt({children:e}){return(0,q.jsx)(`div`,{className:`flex flex-col items-center gap-1`,children:e})}function ft(){return(0,q.jsx)(`div`,{"aria-hidden":`true`,className:`my-0.5 h-px w-6 bg-border`})}function Z({label:e,onClick:t,disabled:n,pressed:r,children:i}){return(0,q.jsx)(U,{type:`button`,variant:`ghost`,size:`icon`,className:g(`tap-target-comfortable`,r&&`bg-primary/15 text-primary hover:bg-primary/20 hover:text-primary`),"aria-label":e,title:e,"aria-pressed":r,disabled:n,onClick:t,children:i})}function pt(e){if(e.type!==`planNode`)return`var(--muted)`;let t=e.data.findings??[],n=E(t);return n?B[n]:`var(--plan-aggregate)`}function mt({finding:e,className:t}){let n=m(e);return(0,q.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,q.jsx)(b,{type:e.type,impactBand:e.impactBand,docAnchor:e.docAnchor,className:t}),n?(0,q.jsx)(`span`,{className:`font-mono text-[10px] leading-none whitespace-nowrap text-muted-foreground`,children:n}):null]})}function ht({data:e}){let{width:t,height:n,stageId:r,durationLabel:i,findings:a}=e;return(0,q.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-dashed border-border/70 bg-muted/10 nopan nodrag`,style:{width:t,height:n,pointerEvents:`all`},children:(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 px-2 py-1 text-xs text-muted-foreground`,children:[(0,q.jsx)(`span`,{title:r==null?`This plan segment couldn't be matched to a specific Spark stage`:void 0,children:r==null?`Stage —`:`Stage ${r}`}),(0,q.jsx)(C,{label:i??`—`,impactBand:`info`,title:`Approximate share of this stage's wall time`}),a.length>0?(0,q.jsx)(`div`,{className:`ml-auto flex min-w-0 flex-wrap items-center justify-end gap-1`,children:a.map((e,t)=>(0,q.jsx)(mt,{finding:e,className:`h-4 gap-1 px-1.5 text-xs`},e.id??`${e.type}-${t}`))}):null]})})}function gt({data:e}){let{width:t,height:n,stageId:r,findings:i,showOwnFindings:a=!0,onSelect:o}=e;return(0,q.jsxs)(`div`,{className:`relative rounded-xl border border-primary/25 bg-primary/5 nopan nodrag`,style:{width:t,height:n,pointerEvents:`all`},children:[(0,q.jsx)(`button`,{type:`button`,"aria-label":`Focus stage ${r}`,onClick:o,style:{pointerEvents:`auto`},className:`absolute inset-0 size-full cursor-pointer rounded-xl transition-colors hover:border-primary/50 hover:bg-primary/10`}),a&&i.length>0?(0,q.jsx)(`div`,{className:`absolute left-2 right-2 top-1 flex flex-wrap gap-1`,children:i.map((e,t)=>(0,q.jsx)(mt,{finding:e,className:`h-4 gap-1 px-1.5 text-xs`},e.id??`${e.type}-${t}`))}):null,(0,q.jsxs)(`span`,{className:`absolute right-2 bottom-1 text-xs font-medium text-primary`,children:[`Stage `,r]})]})}var _t=1.5,vt=.55;function yt(e,t){return!(e>0)||!(t>0)?0:Math.min(1,Math.log(e+1)/Math.log(t+1))}function bt(e,t){return _t+7.5*yt(e,t)}function xt(e,t){return vt+.44999999999999996*yt(e,t)}function St({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i,targetPosition:a,markerEnd:o,data:s}){let[c,l,u]=A({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i,targetPosition:a}),{shuffleBytes:d=0,maxShuffleBytes:f=0}=s??{},p=bt(d,f),m=xt(d,f),h=d>0&&d<1e3?`<1 KB`:_(d);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(I,{path:c,markerEnd:o,style:{stroke:`var(--text-muted)`,strokeWidth:p,strokeOpacity:m}}),(0,q.jsx)(j,{children:(0,q.jsxs)(Ge,{children:[(0,q.jsx)(Ke,{"data-testid":`exchange-edge-label`,className:`nodrag nopan pointer-events-auto absolute cursor-help rounded bg-card/90 px-1 py-0.5 font-mono text-[10px] leading-none text-muted-foreground ring-1 ring-border`,style:{transform:`translate(-50%, -50%) translate(${l}px, ${u}px)`},children:h}),(0,q.jsx)(qe,{className:`max-w-xs`,children:(0,q.jsxs)(`p`,{children:[h,` of shuffle written across this exchange. Edge thickness scales with the volume moved.`]})})]})})]})}var Ct={planNode:Xe,segmentGroup:ht,stageGroup:gt},wt={exchange:St},Tt=1,Et=2,Dt=3,Ot=e=>e.data,Q={padding:.06,maxZoom:1.75};function kt({resizeTick:e,fitSignal:t,centerRequest:n}){let{fitView:r,setCenter:i,getNode:a}=z();return(0,K.useEffect)(()=>{if(!n||n.token===0||!n.nodeId)return;let e=a(n.nodeId);e?i(e.position.x,e.position.y,{zoom:1,duration:300}):r({nodes:[{id:n.nodeId}],duration:300,maxZoom:1})},[n,i,a,r]),(0,K.useEffect)(()=>{let e=()=>r({duration:200,...Q});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[r]),(0,K.useEffect)(()=>{e!==0&&r({duration:200,...Q})},[e,r]),(0,K.useEffect)(()=>{t!==0&&r({duration:300,...Q})},[t,r]),null}function At(){let e=(0,K.useRef)(null),[t,n]=(0,K.useState)(0);return(0,K.useEffect)(()=>{let t=e.current;if(!t)return;let r=!0,i=new ResizeObserver(()=>{if(r){r=!1;return}n(e=>e+1)});return i.observe(t),()=>i.disconnect()},[]),{ref:e,tick:t}}function jt(e,t){return e.filter(e=>e.stageId===t||V(e)?.includes(t))}function Mt({model:e,showMiniMap:t,findings:n=[],stageId:r,segmentStageIds:i,visibleNodeIds:a,visibleEdges:o,onSelectStage:s,selectedNodeId:c=null,onSelectNode:l,onJumpToPaired:u,centerRequest:d,fitSignal:f=0,filterMode:p=`basic`,onFilterModeChange:m=()=>{},hiddenCount:h=0,durationMode:g=`exclusive`,onDurationModeChange:_=()=>{}}){let{flowNodes:y,flowEdges:b}=(0,K.useMemo)(()=>{let t=e.nodes.reduce((e,t)=>e+(t.exclusiveDurationShare??t.durationShare??0),0),c=e=>`segment-${e.segmentIndex}`,l=e.scope===`full`,u=e=>{let t=i?.get(e.segmentIndex);return t==null?null:`stage-${t}`},d=a?Ve(e.nodes.filter(e=>a.has(e.id)),o??e.edges,{groupOf:c}):Ve(e.nodes,e.edges,{groupOf:c}),f=new Set(d.map(c)),p=l?new Set(d.map(u).filter(e=>e!=null)):null,m=e.nodes.some(e=>!f.has(c(e)))||p!=null&&e.nodes.some(e=>{let t=u(e);return t!=null&&!p.has(t)})?Ve(e.nodes,e.edges,{groupOf:c}):d,h=d.map(e=>{let n=e.durationShare!=null&&t>0?Math.round(e.durationShare/t*100):null,r=e.splitRole===`read`?`${e.label}, paired: see write half`:[e.label,e.operatorDetail,e.primaryMetric,n==null?null:`${n}% of the plan's total stage duration`].filter(Boolean).join(`, `);return{id:e.id,type:`planNode`,position:e.position,draggable:!1,zIndex:Dt,measured:{width:220,height:90},ariaLabel:r,ariaRole:`button`,data:{...e,durationSharePct:n}}}),g=Ue(c,[d,m]).map(t=>{let r=Number(t.id.replace(`segment-`,``)),a=e.nodes.filter(e=>c(e)===t.id),o=a.reduce((e,t)=>e+(t.exclusiveDurationShare??t.durationShare??0),0),s=a.some(e=>e.durationShare!=null),l=i?.get(r)??null,u=l==null?[]:jt(n,l);return{id:t.id,type:`segmentGroup`,position:t.position,draggable:!1,selectable:!1,focusable:!1,zIndex:Et,style:{width:t.width,height:t.height},measured:{width:t.width,height:t.height},data:{width:t.width,height:t.height,stageId:l,durationLabel:s?v(o):null,findings:u}}}),_=new Set(g.map(e=>e.data.stageId).filter(e=>e!=null)),y=l?(()=>{let e={paddingX:32,paddingY:64,headerHeight:0},t=Ue(u,[d,m],e),i=`stage-${r}`;if(jt(n,r).length>0&&!t.some(e=>e.id===i)){let[n]=Ue(()=>i,[d,m],e);n&&t.push(n)}return t.map(e=>{let t=Number(e.id.replace(`stage-`,``));return{id:e.id,type:`stageGroup`,position:e.position,draggable:!1,selectable:!1,focusable:!1,zIndex:Tt,style:{width:e.width,height:e.height},measured:{width:e.width,height:e.height},data:{width:e.width,height:e.height,stageId:t,findings:jt(n,t),showOwnFindings:!_.has(t),onSelect:()=>s?.(t)}}})})():[],b=o??e.edges,x=b.reduce((e,t)=>Math.max(e,t.shuffleBytes??0),0),S=b.map(e=>e.shuffleBytes?{id:e.id,source:e.source,target:e.target,type:`exchange`,data:{shuffleBytes:e.shuffleBytes,maxShuffleBytes:x}}:{id:e.id,source:e.source,target:e.target});return{flowNodes:[...y,...g,...h],flowEdges:S}},[e,n,r,i,a,o,s]),{ref:x,tick:S}=At(),[C,w]=(0,K.useState)(!0),[T,E]=(0,K.useState)(!0),D=c?y.find(e=>e.id===c&&e.type===`planNode`):void 0,O=y.filter(e=>e.type===`planNode`),k=y.filter(e=>e.type===`stageGroup`&&(e.data.findings?.length??0)>0).sort(be(e=>e.data.findings??[])),A=a!=null&&a.size===0&&e.nodes.length>0;return(0,q.jsx)(ee,{children:(0,q.jsx)(We,{children:(0,q.jsxs)(`div`,{ref:x,className:`flex min-h-0 flex-1`,children:[(0,q.jsx)(ut,{planNodes:O,problemNodes:k,filterMode:p,onFilterModeChange:m,hiddenCount:h,durationMode:g,onDurationModeChange:_,legendOpen:C,onToggleLegend:()=>w(e=>!e),miniMapOpen:t&&T,onToggleMiniMap:()=>E(e=>!e)}),(0,q.jsx)(`div`,{className:`relative min-w-0 flex-1`,onKeyDown:e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target.closest(`.react-flow__node-planNode`)?.getAttribute(`data-id`);t&&(e.preventDefault(),l?.(t))},children:(0,q.jsxs)(M,{nodes:y,edges:b,nodeTypes:Ct,edgeTypes:wt,"aria-label":`Plan graph. Operators and the data flowing between them. Tab to move between operators, Enter to open an operator's details.`,fitView:!0,fitViewOptions:Q,minZoom:.05,edgesFocusable:!1,onNodeClick:(e,t)=>{t.type===`planNode`&&l?.(t.id)},onPaneClick:()=>l?.(null),children:[(0,q.jsx)(N,{}),(0,q.jsx)(kt,{resizeTick:S,fitSignal:f,centerRequest:d}),A?(0,q.jsx)(L,{position:`top-center`,children:(0,q.jsxs)(`p`,{role:`status`,className:`rounded-md border border-border bg-card px-3 py-2 text-xs text-muted-foreground shadow-sm`,children:[`All `,e.nodes.length,` operators are hidden by the node filter. Change it in Settings to show them.`]})}):null,C?(0,q.jsx)(L,{position:`bottom-left`,children:(0,q.jsx)(et,{})}):null,t&&T?(0,q.jsx)(P,{nodeColor:pt,pannable:!0,zoomable:!0,ariaLabel:`Plan overview. Drag to pan and scroll to zoom the graph.`}):null]})}),D?(0,q.jsx)(Qe,{node:Ot(D),onClose:()=>l?.(null),onJumpToPaired:u}):null]})})})}function Nt({open:e,nodeCount:t,onConfirm:n,onCancel:r}){return(0,q.jsx)(ie,{open:e,onOpenChange:e=>{e||r()},children:(0,q.jsxs)(_e,{children:[(0,q.jsx)(ae,{children:(0,q.jsx)(ce,{children:`Expand to full plan?`})}),(0,q.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`This plan has `,t,` nodes. Rendering the full graph may take several seconds.`]}),(0,q.jsxs)(oe,{children:[(0,q.jsx)(U,{type:`button`,variant:`outline`,size:`sm`,onClick:r,children:`Cancel`}),(0,q.jsx)(U,{type:`button`,size:`sm`,onClick:n,children:`Expand anyway`})]})]})})}var Pt={io:[`scan`,`exchange`],basic:[`scan`,`exchange`,`join`,`aggregate`,`sort`,`filter`],advanced:null},Ft=300;function It(e,t){let n=new Map;for(let t of e){let e=n.get(t.source);e?e.push(t.target):n.set(t.source,[t.target])}let r=new Map;function i(e){let a=r.get(e);if(a)return a;let o=new Set;r.set(e,o);for(let r of n.get(e)??[])if(t.has(r))o.add(r);else for(let e of i(r))o.add(e);return o}let a=new Map;for(let t of e)t.shuffleBytes&&a.set(`${t.source}->${t.target}`,t.shuffleBytes);let o=[];for(let e of t)for(let t of i(e)){let n={id:`${e}=>${t}`,source:e,target:t},r=a.get(`${e}->${t}`);r&&(n.shuffleBytes=r),o.push(n)}return o}function Lt(e,t){try{return Re(e,t)}catch{return null}}var Rt=new Map;function zt(e,t,n,r){return`${e??`none`}::${t}::${n}::${r}`}function Bt(){Rt.clear()}var Vt=D.getState().modelResetCount;D.subscribe(e=>{e.modelResetCount!==Vt&&(Vt=e.modelResetCount,Bt())});function $(e,t,n){let r=zt(n,t.stageId,t.scope,t.durationMode),i=Rt.get(r);if(i)return i;let a=Lt(e,t);return a&&Rt.set(r,a),a}function Ht({stageId:e,appModel:t,findings:n,activeFileId:r,onClose:i,initialScope:a}){let{resetToDropZone:o}=ue(),{recentEntries:s,onPickRecent:c,onRemoveRecent:l}=re(r),[u,d]=(0,K.useState)(`basic`),[f,p]=(0,K.useState)(`exclusive`),[m,g]=(0,K.useState)(a??`segment`),[_,v]=(0,K.useState)(!1),[y,b]=(0,K.useState)(a!==`full`),[x,S]=(0,K.useState)(!1),[C,w]=(0,K.useState)(e),[T,E]=(0,K.useState)(null),[D,O]=(0,K.useState)(0),[ee,k]=(0,K.useState)({nodeId:null,token:0}),[A,j]=(0,K.useState)(null),M=e=>k(t=>({nodeId:e,token:t.token+1}));(0,K.useEffect)(()=>{E(null)},[C,m,u]);let N=te(C,t),P=N?$(N,{scope:`segment`,stageId:C,appModel:t,findings:n,durationMode:f},r):null,F=P!=null&&P.scope===`full`&&m===`segment`&&P.nodes.length>Ft,I=F&&!x;(0,K.useEffect)(()=>{I&&v(!0)},[I]);let L=N&&(m===`full`||_)?$(N,{scope:`full`,stageId:C,appModel:t,findings:n,durationMode:f},r):null,R=!y&&m===`full`&&L!=null&&L.nodes.length>Ft,z=_||R;(0,K.useEffect)(()=>{let e=e=>{e.key!==`Escape`||z||(T?E(null):i())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i,z,T]);let B=F||R?null:m===`full`?L:P;(0,K.useEffect)(()=>{A&&m===`full`&&B?.nodes.some(e=>e.id===A)&&(E(A),M(A),j(null))},[A,m,B]);function V(){let e=N?$(N,{scope:`full`,stageId:C,appModel:t,findings:n,durationMode:f},r):null;e&&e.nodes.length>Ft?v(!0):(g(`full`),O(e=>e+1))}function ie(){g(`segment`),O(e=>e+1)}function ae(e){if(B?.nodes.some(t=>t.id===e)){E(e),M(e);return}j(e),V()}let oe=(0,K.useCallback)(e=>{w(e),g(`segment`),b(!0),S(!1),j(null),O(e=>e+1)},[]);function se(){b(!0),g(`full`),v(!1),O(e=>e+1)}function ce(){v(!1),j(null),R&&(b(!0),g(`segment`),P?.scope===`full`&&S(!0)),I&&S(!0)}function le(e){return i(),c(e)}let{visibleNodeIds:de,filteredEdges:fe,hiddenNodes:pe}=(0,K.useMemo)(()=>{let e=Pt[u],t=new Set;if(B)for(let n of B.nodes)(!e||e.includes(n.category))&&t.add(n.id);return{visibleNodeIds:t,filteredEdges:B?It(B.edges,t):[],hiddenNodes:B?B.nodes.filter(e=>!t.has(e.id)):[]}},[B,u]),H=B?.scope===`full`,me=m===`full`,W=(0,K.useId)(),G=H&&!me;return(0,q.jsxs)(`div`,{"data-testid":`dashboard`,className:`flex h-screen flex-col`,style:{paddingRight:`var(--docs-inset, 0px)`},children:[(0,q.jsx)(ne,{onLoadNew:o,recentEntries:s,activeFileId:r,onPickRecent:le,onRemoveRecent:l,leadingContent:(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsxs)(`h1`,{className:`truncate font-heading text-sm font-semibold`,children:[`Plan graph: Stage `,C]}),B&&B.scope===`segment`?(0,q.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,children:[`Segment `,B.segmentIndex+1,` of `,B.segmentCount]}):null,(0,q.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:(0,q.jsx)(h,{anchor:`#bottleneck-duplicate-plan-subtree`,children:`Plan Advisor docs`})})]}),sectionControls:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`flex flex-col items-end gap-0.5`,children:[(0,q.jsx)(U,{type:`button`,variant:`outline`,size:`sm`,disabled:G,"aria-describedby":G?W:void 0,onClick:H?ie:V,children:H?`Back to segment view`:`Expand to full plan`}),G?(0,q.jsx)(`p`,{id:W,className:`text-xs text-muted-foreground`,children:`This stage's plan couldn't be scoped to a single segment`}):null]}),(0,q.jsx)(U,{variant:`ghost`,size:`sm`,onClick:i,children:`Close`})]})}),(0,q.jsx)(`div`,{className:`flex flex-1 flex-col overflow-hidden`,children:R?null:!N||!B?(0,q.jsx)(`p`,{role:`alert`,className:`p-6 text-sm text-destructive`,children:F?`This plan has more nodes than the graph view can safely render without expanding. Click "Expand to full plan" to confirm.`:`Couldn't build the plan graph for this stage.`}):(0,q.jsx)(Mt,{model:B,visibleNodeIds:de,visibleEdges:fe,showMiniMap:!0,findings:n,stageId:C,segmentStageIds:B.segmentStageIds,onSelectStage:oe,selectedNodeId:T,onSelectNode:E,onJumpToPaired:ae,centerRequest:ee,fitSignal:D,filterMode:u,onFilterModeChange:d,hiddenCount:pe.length,durationMode:f,onDurationModeChange:p})}),(0,q.jsx)(Nt,{open:z,nodeCount:L?.nodes.length??0,onConfirm:se,onCancel:ce})]})}export{Ht as PlanGraphRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{U as n,Z as r,d as i,it 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}from"./useRecentFiles-XZEnLlal.js";import{P as d,k as f}from"./index-B-03mG7K.js";import{i as p,o as m,r as h,s as g,t as _}from"./Dashboard-C1hNeX49.js";import{r as v}from"./impact-sort-CssZ6MT2.js";import{n as y}from"./finding-anchor-Cl6_5hfV.js";import{t as b}from"./usePagedRows-Dyl6T8Ok.js";import{n as x,t as S}from"./useSortMode-Dhvit8dt.js";var C=e(t(),1),w=l();function T(e){return e.stageId!=null}function E(e){return(e.extended??``).replace(/, wasting \d+s of executor time\./,`.`)}function D({finding:e}){let t=y([e]);return(0,w.jsxs)(`li`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`flex flex-col gap-1 transition-colors ${t.flashClassName}`,children:[(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(p,{stageId:e.stageId}),(0,w.jsx)(s,{impactBand:e.impactBand})]}),(0,w.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Wasted `,(0,w.jsx)(`strong`,{children:r(a(e))}),` of executor time.`,e.extended?(0,w.jsxs)(o,{children:[` `,E(e)]}):null]}),(0,w.jsx)(_,{finding:e})]})}function O({appModel:e,catalog:t,defaultCollapsed:o=!0}){let[s,l]=(0,C.useState)(0),{sortMode:p,setSortMode:_,orderBy:y}=S(),[E,O]=(0,C.useState)(!o),k=d(),A=(0,C.useRef)(!1);(0,C.useEffect)(()=>{if(!A.current){A.current=!0;return}l(0)},[e]);let j=u(t,`retryWaste`).filter(T),M=[...j].sort((e,t)=>n[e.impactBand]-n[t.impactBand]||(typeof t.value==`number`?t.value:0)-(typeof e.value==`number`?e.value:0)),N=y(M,e=>[e],e=>e.stageId),P=k?N.findIndex(e=>e===k.finding):null,{totalPages:F,effectivePage:I,visible:L}=b(N,s,l,P);return j.length===0?null:(0,w.jsxs)(f,{title:`Retry Waste`,fixFor:j,impactBand:c(j),badges:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(i,{type:`retryWaste`,impactBand:c(j)}),v(j,j.length,E)?(0,w.jsx)(x,{mode:p,onChange:e=>{_(e),l(0)}}):null]}),open:E,onOpenChange:O,summary:(0,w.jsx)(m,{value:r(a(M[0])),context:g(j.length)}),children:[(0,w.jsx)(`ul`,{className:`space-y-3`,children:L.map(e=>(0,w.jsx)(D,{finding:e},e.id))}),(0,w.jsx)(h,{page:I,totalPages:F,onPrev:()=>l(e=>e-1),onNext:()=>l(e=>e+1)})]})}export{O as RetryWaste};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{U as n,Y as r,bt as i,d as a,it as o,st as s,ut as c}from"./DisclosureContext-ZpE6CkHx.js";import{p as l}from"./plan-graph-vendor-BYl-AzN5.js";import{i as u}from"./useRecentFiles-XZEnLlal.js";import{P as d,k as f}from"./index-B-03mG7K.js";import{a as p,o as m,r as h,s as g,t as _}from"./Dashboard-C1hNeX49.js";import{r as v}from"./impact-sort-CssZ6MT2.js";import{n as y,t as b}from"./finding-anchor-Cl6_5hfV.js";import{t as x}from"./usePagedRows-Dyl6T8Ok.js";import{n as S,t as C}from"./useSortMode-Dhvit8dt.js";import{t as w}from"./StageHeader-DJkYkrsU.js";import{a as T,i as E,n as D,r as O,t as k}from"./select-CQjNhprm.js";import{t as A}from"./PlanExplorer-DgHCDBD_.js";import{t as j}from"./PartitionHint-CUvbnnxy.js";var M=e(t(),1),N=l();function P({entry:e,appModel:t}){let n=i(),a=y([e.shuffle]),c=t.stages.get(e.stageId),l=c?s(c):null,d=n===`advanced`&&u(e.stageId,t);return(0,N.jsxs)(`div`,{ref:a.ref,tabIndex:a.tabIndex,"data-flashed":a.dataFlashed,className:`space-y-2 ${b} transition-colors ${a.flashClassName}`,children:[(0,N.jsx)(w,{stageId:e.stageId,appModel:t}),(0,N.jsxs)(`p`,{className:`text-sm`,children:[`Shuffle read: `,(0,N.jsx)(`strong`,{children:r(o(e.shuffle))}),` · `,`Write: `,r(c?.shuffleWriteBytes??0)]}),(0,N.jsx)(_,{finding:e.shuffle}),l||d?(0,N.jsxs)(`div`,{className:`space-y-2 pt-1`,children:[l?(0,N.jsx)(j,{hint:l}):null,d?(0,N.jsx)(A,{stageId:e.stageId,appModel:t}):null]}):null]})}var F=(0,M.memo)(function({appModel:e,catalog:t,defaultCollapsed:i=!0}){let[s,l]=(0,M.useState)(0),[u,_]=(0,M.useState)(!i),{sortMode:y,setSortMode:b,orderBy:w}=C(),A=d(),{shuffleFindings:j,sorted:F,orderedEntries:I}=(0,M.useMemo)(()=>{let e=t.filter(e=>e.type===`shuffle`),r=[...e.filter(e=>e.stageId!=null).map(e=>({stageId:e.stageId,shuffle:e,impactBand:e.impactBand,peak:o(e)}))].sort((e,t)=>n[e.impactBand]-n[t.impactBand]||t.peak-e.peak);return{shuffleFindings:e,sorted:r,orderedEntries:w(r,e=>[e.shuffle],e=>e.stageId)}},[t,y]),L=A?I.findIndex(e=>e.shuffle===A.finding):null,{totalPages:R,effectivePage:z,visible:B}=x(I,s,l,L);if(j.length===0){let t=0;for(let n of e.stages.values())t=Math.max(t,n.shuffleReadBytes??0);return(0,N.jsx)(f,{title:`Shuffle I/O`,open:u,onOpenChange:_,summary:(0,N.jsx)(m,{value:r(t),context:`no issue detected: peak shuffle read`}),children:(0,N.jsx)(`div`,{className:`flex flex-col gap-1`,children:(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No shuffle read/write issues detected.`})})})}let V=c(j),H=I.map(e=>({id:e.stageId})),U=v(j,F.length,u);return(0,N.jsx)(f,{title:`Shuffle I/O`,impactBand:V,fixFor:j,open:u,onOpenChange:_,summary:(0,N.jsx)(m,{value:r(F[0].peak),context:`Peak shuffle read · ${g(F.length)}`}),badges:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(a,{type:`shuffle`,impactBand:V??`info`}),U?(0,N.jsx)(S,{mode:y,onChange:e=>{b(e),l(0)}}):null]}),children:(0,N.jsxs)(`div`,{className:`space-y-4`,children:[(0,N.jsx)(p,{pills:H}),B.map(t=>(0,N.jsx)(P,{entry:t,appModel:e},t.stageId)),(0,N.jsx)(h,{page:z,totalPages:R,onPrev:()=>l(e=>e-1),onNext:()=>l(e=>e+1),renderJumpControl:()=>(0,N.jsxs)(k,{value:String(z*6),onValueChange:e=>l(Math.floor(Number(e)/6)),children:[(0,N.jsx)(E,{size:`sm`,"aria-label":`Jump to stage`,children:(0,N.jsx)(T,{placeholder:`Jump to stage`})}),(0,N.jsx)(D,{children:I.map((e,t)=>(0,N.jsxs)(O,{value:String(t),children:[`Stage `,e.stageId,` (`,r(e.peak),`)`]},e.stageId))})]})})]})})});export{F as ShuffleIO};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{$ as n,it as r}from"./DisclosureContext-ZpE6CkHx.js";import{p as i}from"./plan-graph-vendor-BYl-AzN5.js";import{t as a}from"./StageFindingGroup-BEtPWcT0.js";var o=e(t(),1),s=i();function c(e){return`${e.metric}: ${n(`ratio`,r(e))}`}var l=(0,o.memo)(function(e){return(0,s.jsx)(a,{...e,type:`skew`,title:`Task Skew`,idPrefix:`skew`,findingLabel:c})});export{l as Skew};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{$ as n,U as r,d as i,it as a,u as o,z as s}from"./DisclosureContext-ZpE6CkHx.js";import{p as c}from"./plan-graph-vendor-BYl-AzN5.js";import{c as l}from"./useRecentFiles-XZEnLlal.js";import{P as u,k as d}from"./index-B-03mG7K.js";import{o as f,r as p,s as m,t as h}from"./Dashboard-C1hNeX49.js";import{r as g}from"./impact-sort-CssZ6MT2.js";import{n as _}from"./finding-anchor-Cl6_5hfV.js";import{t as v}from"./usePagedRows-Dyl6T8Ok.js";import{n as y,t as b}from"./useSortMode-Dhvit8dt.js";import{t as x}from"./StageHeader-DJkYkrsU.js";var S=e(t(),1),C=c();function w(e){let t=a(e);if(e.metric===`execMaxMedianRatio`)return`Executor ${e.executorId}: ${n(`ratio`,t)} the median ${e.dimension?s[e.dimension]:`value`}`;let r=Math.round((e.hostTaskShare??0)*100);return e.metric===`hostDurationShare`?`${e.host}: ${n(`pctFraction`,t)} of this stage's task time (${n(`pct`,r)} of tasks)`:`${e.host}: ${n(`ratio`,t)} median task time (${n(`pct`,r)} of tasks)`}function T({finding:e,appModel:t}){let n=_([e]);return(0,C.jsxs)(`li`,{ref:n.ref,tabIndex:n.tabIndex,"data-flashed":n.dataFlashed,className:`space-y-1 text-sm transition-colors ${n.flashClassName}`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,C.jsx)(o,{impactBand:e.impactBand}),e.stageId==null?null:(0,C.jsx)(x,{stageId:e.stageId,appModel:t})]}),(0,C.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:w(e)}),(0,C.jsx)(h,{finding:e})]})}var E=(0,S.memo)(function({appModel:e,catalog:t,defaultCollapsed:n=!0}){let{sortMode:a,setSortMode:o,orderBy:s}=b(),[c,h]=(0,S.useState)(!n),[_,x]=(0,S.useState)(0),E=l(t,`slowHost`).slice().sort((e,t)=>r[e.impactBand]-r[t.impactBand]),D=s(E,e=>[e],e=>e.stageId??null),O=u(),k=O?D.findIndex(e=>e===O.finding):null,{totalPages:A,effectivePage:j,visible:M}=v(D,_,x,k);return E.length===0?null:(0,C.jsxs)(d,{title:`Slow Executor Host`,impactBand:E[0].impactBand,fixFor:E,badges:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(i,{type:`slowHost`,impactBand:E[0].impactBand}),g(E,E.length,c)?(0,C.jsx)(y,{mode:a,onChange:o}):null]}),open:c,onOpenChange:h,summary:(0,C.jsx)(f,{value:w(E[0]),context:m(E.length)}),children:[(0,C.jsx)(`ul`,{className:`space-y-2`,children:M.map(t=>(0,C.jsx)(T,{finding:t,appModel:e},t.id))}),(0,C.jsx)(p,{page:j,totalPages:A,onPrev:()=>x(e=>e-1),onNext:()=>x(e=>e+1)})]})});export{E as SlowHost};
|
|
@@ -1 +0,0 @@
|
|
|
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,p as i,ut as a}from"./DisclosureContext-ZpE6CkHx.js";import{p as o}from"./plan-graph-vendor-BYl-AzN5.js";import{c as s,l as c}from"./useRecentFiles-XZEnLlal.js";import{P as l,S as u,k as d,l as f}from"./index-B-03mG7K.js";import{a as p,o as m,r as h,s as g,t as _}from"./Dashboard-C1hNeX49.js";import{i as v,r as y}from"./impact-sort-CssZ6MT2.js";import{n as b,t as x}from"./finding-anchor-Cl6_5hfV.js";import{t as S}from"./usePagedRows-Dyl6T8Ok.js";import{n as C,t as w}from"./useSortMode-Dhvit8dt.js";var T=e(t(),1),E=o();function D({finding:e}){let t=b([e]);return(0,E.jsxs)(`li`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`space-y-2 ${x} transition-colors ${t.flashClassName}`,children:[e.stageIds.length>0?(0,E.jsx)(p,{pills:e.stageIds.map(e=>({id:e}))}):null,(0,E.jsxs)(`p`,{children:[f(e.recommendation??``).measured??e.recommendation,` `,(0,E.jsx)(_,{finding:e})]})]})}var O=(0,T.memo)(function({catalog:e,defaultCollapsed:t=!0}){let{sortMode:o,setSortMode:f,orderBy:p}=w(),[_,b]=(0,T.useState)(!t),[x,O]=(0,T.useState)(0),{findings:k,pills:A}=(0,T.useMemo)(()=>{let t=s(e,`smallFiles`).sort((e,t)=>n[e.impactBand]-n[t.impactBand]);return{findings:t,pills:[...new Set(t.flatMap(e=>e.stageIds))].map(e=>({id:e}))}},[e,o]),j=p(k,e=>[e],v),M=l(),N=M?j.findIndex(e=>e===M.finding):null,{totalPages:P,effectivePage:F,visible:I}=S(j,x,O,N);return k.length===0?null:(0,E.jsxs)(d,{title:`Excessive Small Files`,fixFor:k,impactBand:a(k),open:_,onOpenChange:b,badges:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r,{type:`smallFiles`,impactBand:a(k)??`info`,className:u}),y(k,k.length,_)?(0,E.jsx)(C,{mode:o,onChange:f}):null]}),statusBadge:(0,E.jsx)(i,{children:(0,E.jsx)(c,{confidence:k[0].confidence,validationRequired:k[0].validationRequired,evidenceKey:`sqlPlan`})}),summary:(0,E.jsx)(m,{value:`${A.length} stage${A.length===1?``:`s`}`,context:g(k.length)}),children:[(0,E.jsx)(`ul`,{className:`space-y-3 text-sm`,children:I.map(e=>(0,E.jsx)(D,{finding:e},e.id))}),(0,E.jsx)(h,{page:F,totalPages:P,onPrev:()=>O(e=>e-1),onNext:()=>O(e=>e+1)})]})});export{O as SmallFiles};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{U as n,Z as r,d as i,it as a,u as o}from"./DisclosureContext-ZpE6CkHx.js";import{p as s}from"./plan-graph-vendor-BYl-AzN5.js";import{P as c,k as l}from"./index-B-03mG7K.js";import{o as u,r as d,s as f,t as p}from"./Dashboard-C1hNeX49.js";import{r as m}from"./impact-sort-CssZ6MT2.js";import{n as h}from"./finding-anchor-Cl6_5hfV.js";import{t as g}from"./usePagedRows-Dyl6T8Ok.js";import{n as _,t as v}from"./useSortMode-Dhvit8dt.js";import{t as y}from"./StageHeader-DJkYkrsU.js";var b=e(t(),1),x=s();function S(e){return r(a(e))}function C({finding:e,appModel:t}){let n=h([e]);return(0,x.jsxs)(`li`,{ref:n.ref,tabIndex:n.tabIndex,"data-flashed":n.dataFlashed,className:`space-y-1 text-sm transition-colors ${n.flashClassName}`,children:[(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,x.jsx)(o,{impactBand:e.impactBand}),e.stageId==null?null:(0,x.jsx)(y,{stageId:e.stageId,appModel:t}),(0,x.jsx)(`strong`,{children:S(e)})]}),(0,x.jsx)(p,{finding:e})]})}var w=(0,b.memo)(function({appModel:e,catalog:t,defaultCollapsed:r=!0}){let{sortMode:a,setSortMode:o,orderBy:s}=v(),[p,h]=(0,b.useState)(!r),[y,w]=(0,b.useState)(0),T=t.filter(e=>e.type===`speculationWaste`).slice().sort((e,t)=>n[e.impactBand]-n[t.impactBand]),E=s(T,e=>[e],e=>e.stageId??null),D=c(),O=D?E.findIndex(e=>e===D.finding):null,{totalPages:k,effectivePage:A,visible:j}=g(E,y,w,O);return T.length===0?null:(0,x.jsxs)(l,{title:`Speculation Waste`,fixFor:T,impactBand:T[0].impactBand,badges:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(i,{type:`speculationWaste`,impactBand:T[0].impactBand}),m(T,T.length,p)?(0,x.jsx)(_,{mode:a,onChange:o}):null]}),open:p,onOpenChange:h,summary:(0,x.jsx)(u,{value:S(T[0]),context:f(T.length)}),children:[(0,x.jsx)(`ul`,{className:`space-y-2`,children:j.map(t=>(0,x.jsx)(C,{finding:t,appModel:e},t.id))}),(0,x.jsx)(d,{page:A,totalPages:k,onPrev:()=>w(e=>e-1),onNext:()=>w(e=>e+1)})]})});export{w as SpeculationWaste};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t,_ as n,c as r,d as i,f as a,l as o,o as s,r as c,s as l,t as u,v as d}from"./charts-vendor-0VMaLVLN.js";import{G as f,K as p,S as m,U as h,Y as g,bt as _,d as v,it as y,o as b,p as x,st as S,u as C}from"./DisclosureContext-ZpE6CkHx.js";import{p as w}from"./plan-graph-vendor-BYl-AzN5.js";import{D as T,E as ee,O as E,d as D,i as O,k,l as A,m as j}from"./useRecentFiles-XZEnLlal.js";import{Dt as M,P as N,k as P}from"./index-B-03mG7K.js";import{c as F,f as I,i as L,o as R,r as z,t as B}from"./Dashboard-C1hNeX49.js";import{r as V}from"./impact-sort-CssZ6MT2.js";import{n as H,t as U}from"./finding-anchor-Cl6_5hfV.js";import{t as W}from"./usePagedRows-Dyl6T8Ok.js";import{n as G,t as K}from"./useSortMode-Dhvit8dt.js";import{t as q}from"./PlanExplorer-DgHCDBD_.js";import{t as J}from"./PartitionHint-CUvbnnxy.js";var Y=e(t(),1),X=w(),Z=240,Q=524288e3,te=10;function $(e){let t=e.spillBytes>Q,n=e.gcPct>te;return t&&n?`critical`:t||n?`warning`:`info`}function ne(e){return D[$(e)]}function re({active:e,payload:t}){if(!e||!t?.length)return null;let n=t[0]?.payload;if(!n)return null;let r=$(n);return(0,X.jsxs)(`div`,{className:`rounded-md border border-border bg-popover px-2 py-1.5 text-xs text-popover-foreground shadow-md`,children:[(0,X.jsxs)(`p`,{children:[g(n.spillBytes),` spilled`]}),(0,X.jsxs)(`p`,{children:[n.gcPct.toFixed(1),`% GC`]}),(0,X.jsxs)(`p`,{className:`mt-1 flex items-center gap-1.5 font-medium`,children:[(0,X.jsx)(C,{impactBand:r}),r.toUpperCase()]})]})}function ie({appModel:e}){let t=[];for(let n of e.stages.values()){let e=n.memoryBytesSpilled??0;e<=0||t.push({stageId:n.id,spillBytes:e,gcPct:n.gcPct??0,submittedAt:n.submittedAt??0})}if(t.length===0)return(0,X.jsx)(I,{tone:`clean`,icon:M,title:`No stages spilled memory in this run.`});let f=F(t),p=[...f].sort((e,t)=>e.submittedAt-t.submittedAt).map(e=>({stage:`S${e.stageId}`,spillMB:e.spillBytes/1048576,gcPct:e.gcPct}));return(0,X.jsxs)(ee,{defaultValue:`scatter`,children:[(0,X.jsxs)(E,{"aria-label":`Memory pressure view`,children:[(0,X.jsx)(k,{value:`scatter`,children:`Scatter`}),(0,X.jsx)(k,{value:`twin`,children:`Twin bars`})]}),(0,X.jsxs)(`p`,{className:`text-muted-foreground text-xs`,children:[`Spill and GC pressure both stem from tight executor memory, see`,` `,(0,X.jsx)(m,{anchor:`#memory-model`,children:`how Spark’s memory model works`}),`.`]}),(0,X.jsxs)(T,{value:`scatter`,children:[(0,X.jsxs)(`div`,{className:`mb-1 flex items-center gap-3 text-xs text-muted-foreground`,children:[(0,X.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,X.jsx)(C,{impactBand:`critical`}),`CRITICAL`]}),(0,X.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,X.jsx)(C,{impactBand:`warning`}),`WARNING`]}),(0,X.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,X.jsx)(C,{impactBand:`info`}),`INFO`]})]}),(0,X.jsx)(j,{ariaLabel:`Memory pressure scatter: spilled memory versus GC percent, one point per stage that spilled.`,height:Z,table:{caption:`Memory spilled and GC percent by stage`,columns:[`Stage`,`Memory spilled`,`GC %`],rows:f.map(e=>[`S${e.stageId}`,g(e.spillBytes),`${e.gcPct.toFixed(1)}%`]),align:[`left`,`right`,`right`]},children:(0,X.jsxs)(c,{children:[(0,X.jsx)(a,{stroke:D.muted,strokeOpacity:.2}),(0,X.jsx)(l,{type:`number`,dataKey:`spillBytes`,name:`Memory spilled`,tickFormatter:e=>g(e),tick:{fontSize:10}}),(0,X.jsx)(s,{type:`number`,dataKey:`gcPct`,name:`GC %`,tick:{fontSize:10},width:32}),(0,X.jsx)(d,{cursor:{strokeDasharray:`3 3`},content:re}),(0,X.jsx)(r,{data:f,name:`Spill vs. GC`,children:f.map(e=>(0,X.jsx)(n,{fill:ne(e)},e.stageId))})]})})]}),(0,X.jsx)(T,{value:`twin`,children:(0,X.jsx)(j,{ariaLabel:`Memory pressure by stage: spilled memory and GC percent across stages in submission order.`,height:Z,table:{caption:`Spilled memory and GC percent by stage, submission order`,columns:[`Stage`,`Spill (MB)`,`GC %`],rows:p.map(e=>[e.stage,e.spillMB.toFixed(1),`${e.gcPct.toFixed(1)}%`]),align:[`left`,`right`,`right`]},children:(0,X.jsxs)(u,{data:p,children:[(0,X.jsx)(a,{stroke:D.muted,strokeOpacity:.2}),(0,X.jsx)(l,{dataKey:`stage`,tick:{fontSize:10}}),(0,X.jsx)(s,{yAxisId:`left`,tick:{fontSize:10},width:36}),(0,X.jsx)(s,{yAxisId:`right`,orientation:`right`,tick:{fontSize:10},width:36}),(0,X.jsx)(d,{}),(0,X.jsx)(o,{yAxisId:`left`,dataKey:`spillMB`,name:`Spill (MB)`,fill:D.critical}),(0,X.jsx)(i,{yAxisId:`right`,dataKey:`gcPct`,name:`GC %`,stroke:D.info,dot:!1})]})})})]})}function ae(e,t){return e.stages.get(t)?.spillClassification??`unclassified`}function oe({finding:e,appModel:t}){let n=H([e]),r=_(),i=t.stages.get(e.stageId),a=ae(t,e.stageId),o=a===`volume`&&i?S(i):null,s=r===`advanced`&&O(e.stageId,t);return(0,X.jsxs)(`div`,{ref:n.ref,tabIndex:n.tabIndex,"data-flashed":n.dataFlashed,className:`space-y-2 ${U} transition-colors ${n.flashClassName}`,children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,X.jsx)(C,{impactBand:e.impactBand}),(0,X.jsx)(b,{label:f[a],impactBand:e.impactBand,title:p[a]}),(0,X.jsx)(L,{stageId:e.stageId})]}),(0,X.jsx)(x,{children:(0,X.jsx)(A,{confidence:e.confidence,validationRequired:e.validationRequired})})]}),(0,X.jsxs)(`p`,{className:`text-sm`,children:[`Memory spilled: `,(0,X.jsx)(`strong`,{children:g(y(e))}),` · `,`Disk: `,g(i?.diskBytesSpilled??0)]}),(0,X.jsx)(B,{finding:e}),o?(0,X.jsx)(J,{hint:o}):null,s?(0,X.jsx)(`div`,{className:`pt-1`,children:(0,X.jsx)(q,{stageId:e.stageId,appModel:t})}):null]})}var se=(0,Y.memo)(function({appModel:e,catalog:t,defaultCollapsed:n=!0}){let{sortMode:r,setSortMode:i,orderBy:a}=K(),[o,s]=(0,Y.useState)(!n),[c,l]=(0,Y.useState)(0),{findings:u,sorted:d,orderedFindings:f}=(0,Y.useMemo)(()=>{let e=t.filter(e=>e.type===`spill`&&e.stageId!=null),n=[...e].sort((e,t)=>(h[e.impactBand]??9)-(h[t.impactBand]??9)||(typeof t.value==`number`?t.value:0)-(typeof e.value==`number`?e.value:0));return{findings:e,sorted:n,orderedFindings:a(n,e=>[e],e=>e.stageId)}},[t,r]),p=N(),m=p?f.findIndex(e=>e===p.finding):null,{totalPages:_,effectivePage:y,visible:b}=W(f,c,l,m);if(u.length===0){let t=0;for(let n of e.stages.values())t=Math.max(t,n.memoryBytesSpilled??0);return(0,X.jsx)(P,{title:`Spill: no issue detected (max ${g(t)} spilled)`,children:(0,X.jsx)(I,{tone:`clean`,icon:M,title:`No stages spilled memory in this run.`})})}let x=d[0].impactBand;return(0,X.jsx)(P,{title:`Spill`,fixFor:d,impactBand:x,badges:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(v,{type:`spill`,impactBand:x}),V(u,d.length,o)?(0,X.jsx)(G,{mode:r,onChange:i}):null]}),open:o,onOpenChange:s,summary:(0,X.jsx)(R,{value:g(typeof d[0].value==`number`?d[0].value:0),context:`peak · ${d.length} stage${d.length===1?``:`s`}`}),children:(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(ie,{appModel:e}),b.map(t=>(0,X.jsx)(oe,{finding:t,appModel:e},t.stageId)),(0,X.jsx)(z,{page:y,totalPages:_,onPrev:()=>l(e=>e-1),onNext:()=>l(e=>e+1)})]})})});export{se as Spill};
|
|
@@ -1 +0,0 @@
|
|
|
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,ut as a}from"./DisclosureContext-ZpE6CkHx.js";import{p as o}from"./plan-graph-vendor-BYl-AzN5.js";import{c as s}from"./useRecentFiles-XZEnLlal.js";import{P as c,k as l}from"./index-B-03mG7K.js";import{i as u,o as d,r as f,t as p}from"./Dashboard-C1hNeX49.js";import{r as m}from"./impact-sort-CssZ6MT2.js";import{n as h}from"./finding-anchor-Cl6_5hfV.js";import{t as g}from"./usePagedRows-Dyl6T8Ok.js";import{n as _,t as v}from"./useSortMode-Dhvit8dt.js";var y=e(t(),1),b=o();function x(e){return e.stageId!=null}function S({finding:e}){let t=h([e]);return(0,b.jsxs)(`li`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`flex flex-col gap-1 transition-colors ${t.flashClassName}`,children:[(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(u,{stageId:e.stageId}),(0,b.jsx)(i,{impactBand:e.impactBand})]}),(0,b.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Stage attempt failed outright. Reason: `,(0,b.jsx)(`strong`,{children:e.valueText})]}),(0,b.jsx)(p,{finding:e})]})}function C({appModel:e,catalog:t,defaultCollapsed:i=!0}){let[o,u]=(0,y.useState)(0),{sortMode:p,setSortMode:h,orderBy:C}=v(),[w,T]=(0,y.useState)(!i),E=c(),D=(0,y.useRef)(!1);(0,y.useEffect)(()=>{if(!D.current){D.current=!0;return}u(0)},[e]);let O=s(t,`stageFailed`).filter(x),k=C([...O].sort((e,t)=>n[e.impactBand]-n[t.impactBand]||e.stageId-t.stageId),e=>[e],e=>e.stageId),A=E?k.findIndex(e=>e===E.finding):null,{totalPages:j,effectivePage:M,visible:N}=g(k,o,u,A);return O.length===0?null:(0,b.jsxs)(l,{title:`Failed Stages`,fixFor:O,impactBand:a(O),badges:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r,{type:`stageFailed`,impactBand:a(O)}),m(O,O.length,w)?(0,b.jsx)(_,{mode:p,onChange:e=>{h(e),u(0)}}):null]}),open:w,onOpenChange:T,summary:(0,b.jsx)(d,{value:O.length,context:`stage${O.length===1?``:`s`} failed outright`}),children:[(0,b.jsx)(`ul`,{className:`space-y-3`,children:N.map(e=>(0,b.jsx)(S,{finding:e},e.id))}),(0,b.jsx)(f,{page:M,totalPages:j,onPrev:()=>u(e=>e-1),onNext:()=>u(e=>e+1)})]})}export{C as StageFailed};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{U as n,Z as r,bt as i,d as a,gt as o,ht as s,p 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,i as p,l as m}from"./useRecentFiles-XZEnLlal.js";import{P as h,k as g}from"./index-B-03mG7K.js";import{l as _,n as v,o as y,r as b,s as x,t as S}from"./Dashboard-C1hNeX49.js";import{r as C}from"./impact-sort-CssZ6MT2.js";import{n as w,t as T}from"./finding-anchor-Cl6_5hfV.js";import{t as E}from"./usePagedRows-Dyl6T8Ok.js";import{n as D,t as O}from"./useSortMode-Dhvit8dt.js";import{t as k}from"./StageHeader-DJkYkrsU.js";import{t as A}from"./PlanExplorer-DgHCDBD_.js";var j=e(t(),1),M=d();function N({expanded:e,onClick:t,label:n,location:r,controlsId:i}){let a=r?` for ${r}`:``;return(0,M.jsxs)(`button`,{type:`button`,"aria-expanded":e,"aria-controls":i,"aria-label":`${e?`Hide`:`Show`} ${n.toLowerCase()}${a}`,onClick:t,className:`tap-target-comfortable tap-target-comfortable--sm flex w-fit cursor-pointer items-center gap-1 text-xs font-medium text-primary underline underline-offset-2`,children:[n,e?(0,M.jsx)(s,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}):(0,M.jsx)(o,{"aria-hidden":`true`,className:`size-3.5 shrink-0`})]})}function P(e){let[t,n]=(0,j.useState)(!1),[r,i]=(0,j.useState)(null),[a,o]=(0,j.useState)(!1),[s,c]=(0,j.useState)(!1),[l,u]=(0,j.useState)(!1);return{expanded:t,data:r,loading:a,error:s,toggle:()=>{let r=!t;n(r),r&&e&&!l&&!a&&(o(!0),e().then(e=>i(e)).catch(()=>c(!0)).finally(()=>{u(!0),o(!1)}))}}}function F({group:e,appModel:t,getTaskData:n,idPrefix:a,findingLabel:o}){let{exportMode:s,getTaskData:u}=_(n),{expanded:d,data:f,error:h,toggle:g}=P(u?()=>u(e.stageId):void 0),y=w(e.findings),b=t.stages.get(e.stageId),x=i()===`advanced`&&p(e.stageId,t),C=`${a}-stage-${e.stageId}-detail`;return(0,M.jsxs)(`div`,{ref:y.ref,tabIndex:y.tabIndex,"data-flashed":y.dataFlashed,className:`space-y-2 ${T} transition-colors ${y.flashClassName}`,children:[(0,M.jsx)(k,{stageId:e.stageId,appModel:t}),(0,M.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.findings.map((e,t)=>(0,M.jsxs)(`li`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,M.jsx)(l,{impactBand:e.impactBand}),(0,M.jsx)(`span`,{children:o(e)}),(0,M.jsx)(S,{finding:e}),(0,M.jsx)(c,{children:(0,M.jsx)(m,{confidence:e.confidence,validationRequired:e.validationRequired})})]},t))}),b?.taskDurationP50==null?null:(0,M.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`P50 `,r(b.taskDurationP50),` · P95 `,r(b.taskDurationP95),` · Max`,` `,r(b.taskDurationMax)]}),e.slowHost?(0,M.jsxs)(`p`,{className:`flex items-start gap-2 text-xs`,children:[(0,M.jsx)(l,{impactBand:e.slowHost.impactBand,className:`mt-1`}),(0,M.jsxs)(`span`,{children:[(0,M.jsx)(`strong`,{children:`Slow host:`}),` `,e.slowHost.host,` (`,e.slowHost.value,`× median,`,` `,Math.round((e.slowHost.hostTaskShare??0)*100),`% of tasks)`]})]}):null,e.straggler?(0,M.jsxs)(`p`,{className:`flex items-start gap-2 text-xs`,children:[(0,M.jsx)(l,{impactBand:e.straggler.impactBand,className:`mt-1`}),(0,M.jsxs)(`span`,{children:[(0,M.jsx)(`strong`,{children:`Stragglers:`}),` `,(e.straggler.speculativeTasks??0)>0?`${e.straggler.speculativeTasks} speculative task${e.straggler.speculativeTasks===1?``:`s`}`:`${e.straggler.value}% of tasks > 4× P50`]})]}):null,(0,M.jsx)(N,{expanded:d,onClick:g,label:`Task detail`,location:`Stage ${e.stageId}`,controlsId:C}),d?(0,M.jsxs)(`div`,{id:C,className:`space-y-3 pt-1`,children:[f?(0,M.jsx)(v,{metrics:f.metrics,fieldNames:f.fieldNames,markers:{p50:b?.taskDurationP50,p95:b?.taskDurationP95}}):s?(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Task data isn’t included in exported reports.`}):h?(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Task data unavailable for this stage.`}):(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Loading task data…`}),x?(0,M.jsx)(A,{stageId:e.stageId,appModel:t}):null]}):null]})}var I=(0,j.memo)(function({appModel:e,catalog:t,getTaskData:r,defaultCollapsed:i=!0,type:o,title:s,idPrefix:c,findingLabel:l}){let[d,p]=(0,j.useState)(0),{sortMode:m,setSortMode:_,orderBy:v}=O(),[S,w]=(0,j.useState)(!i),{relevant:T,stageGroups:k,orderedGroups:A}=(0,j.useMemo)(()=>{let e=t.filter(e=>e.type===o),r=new Map;for(let t of e)t.stageId!=null&&(r.has(t.stageId)||r.set(t.stageId,[]),r.get(t.stageId).push(t));let i=[...r.entries()].map(([e,n])=>({stageId:e,findings:n,impactBand:u(n)??`info`,slowHost:f(t,`slowHost`).find(t=>t.stageId===e),straggler:f(t,`straggler`).find(t=>t.stageId===e)})).sort((e,t)=>n[e.impactBand]-n[t.impactBand]||e.stageId-t.stageId);return{relevant:e,stageGroups:i,orderedGroups:v(i,e=>e.findings,e=>e.stageId)}},[t,m,o]),N=h(),P=N?A.findIndex(e=>e.findings.some(e=>e===N.finding)):null,{totalPages:I,effectivePage:L,visible:R}=E(A,d,p,P);if(T.length===0)return null;let z=u(T);return(0,M.jsxs)(g,{title:s,impactBand:z,fixFor:T,badges:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(a,{type:o,impactBand:z??`info`}),C(T,k.length,S)?(0,M.jsx)(D,{mode:m,onChange:_}):null]}),open:S,onOpenChange:w,summary:(0,M.jsx)(y,{value:`${k.length} stage${k.length===1?``:`s`}`,context:x(T.length)}),children:[(0,M.jsx)(`div`,{className:`space-y-3`,children:R.map(t=>(0,M.jsx)(F,{group:t,appModel:e,getTaskData:r,idPrefix:c,findingLabel:l},t.stageId))}),(0,M.jsx)(b,{page:L,totalPages:I,onPrev:()=>p(e=>e-1),onNext:()=>p(e=>e+1)})]})});export{I as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e}from"./plan-graph-vendor-BYl-AzN5.js";import{i as t}from"./Dashboard-C1hNeX49.js";var n=e();function r({stageId:e,appModel:r}){let i=r.stages.get(e);return(0,n.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,n.jsx)(t,{stageId:e}),(0,n.jsx)(`span`,{className:`text-sm font-medium`,children:i?.name??`Stage ${e}`})]})}export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{$ as n,it as r}from"./DisclosureContext-ZpE6CkHx.js";import{p as i}from"./plan-graph-vendor-BYl-AzN5.js";import{t as a}from"./StageFindingGroup-BEtPWcT0.js";var o=e(t(),1),s=i(),c={lowParallelism:`Low parallelism`,dataExplosion:`Data explosion`,taskStageSkew:`Task/stage skew`};function l(e){let t=e.type===`stageShape`?c[e.rule]:`stage shape`;return e.type===`stageShape`?e.rule===`lowParallelism`?`${t}: ${e.value} tasks per core`:e.rule===`taskStageSkew`?`${t}: ${n(`pctFraction`,r(e))}`:`${t}: ${e.value}`:`${t}: ${e.value}`}var u=(0,o.memo)(function(e){return(0,s.jsx)(a,{...e,type:`stageShape`,title:`Stage Shape`,idPrefix:`stage-shape`,findingLabel:l})});export{u as StageShape};
|
|
@@ -1 +0,0 @@
|
|
|
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";import{t as _}from"./StageHeader-DJkYkrsU.js";var v=e(t(),1),y=a();function b(e){return`${e.value}m stage duration`}function x({finding:e,appModel:t}){let n=p([e]);return(0,y.jsxs)(`li`,{ref:n.ref,tabIndex:n.tabIndex,"data-flashed":n.dataFlashed,className:`space-y-1 text-sm transition-colors ${n.flashClassName}`,children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,y.jsx)(i,{impactBand:e.impactBand}),e.stageId==null?null:(0,y.jsx)(_,{stageId:e.stageId,appModel:t}),(0,y.jsx)(`strong`,{children:b(e)})]}),(0,y.jsx)(d,{finding:e})]})}var S=(0,v.memo)(function({appModel:e,catalog:t,defaultCollapsed:i=!0}){let{sortMode:a,setSortMode:d,orderBy:p}=g(),[_,S]=(0,v.useState)(!i),[C,w]=(0,v.useState)(0),T=t.filter(e=>e.type===`stageSlowness`).slice().sort((e,t)=>n[e.impactBand]-n[t.impactBand]),E=p(T,e=>[e],e=>e.stageId??null),D=o(),O=D?E.findIndex(e=>e===D.finding):null,{totalPages:k,effectivePage:A,visible:j}=m(E,C,w,O);return T.length===0?null:(0,y.jsxs)(s,{title:`Slow Stage`,fixFor:T,impactBand:T[0].impactBand,badges:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(r,{type:`stageSlowness`,impactBand:T[0].impactBand}),f(T,T.length,_)?(0,y.jsx)(h,{mode:a,onChange:d}):null]}),open:_,onOpenChange:S,summary:(0,y.jsx)(c,{value:b(T[0]),context:u(T.length)}),children:[(0,y.jsx)(`ul`,{className:`space-y-2`,children:j.map(t=>(0,y.jsx)(x,{finding:t,appModel:e},t.id))}),(0,y.jsx)(l,{page:A,totalPages:k,onPrev:()=>w(e=>e-1),onNext:()=>w(e=>e+1)})]})});export{S as StageSlowness};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{$ as n,U as r,d as i,it as a,p as o,u as s}from"./DisclosureContext-ZpE6CkHx.js";import{p as c}from"./plan-graph-vendor-BYl-AzN5.js";import{c as l,l as u}from"./useRecentFiles-XZEnLlal.js";import{P as d,k as f}from"./index-B-03mG7K.js";import{o as p,r as m,s as h,t as g}from"./Dashboard-C1hNeX49.js";import{r as _}from"./impact-sort-CssZ6MT2.js";import{n as v}from"./finding-anchor-Cl6_5hfV.js";import{t as y}from"./usePagedRows-Dyl6T8Ok.js";import{n as b,t as x}from"./useSortMode-Dhvit8dt.js";import{t as S}from"./StageHeader-DJkYkrsU.js";var C=e(t(),1),w=c();function T(e){let t=a(e);return e.unit===`count`?`${t} speculative attempt${t===1?``:`s`} discarded`:`${n(`pct`,t)} of tasks straggled`}function E({finding:e,appModel:t}){let n=v([e]);return(0,w.jsxs)(`li`,{ref:n.ref,tabIndex:n.tabIndex,"data-flashed":n.dataFlashed,className:`space-y-1 text-sm transition-colors ${n.flashClassName}`,children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,w.jsx)(s,{impactBand:e.impactBand}),e.stageId==null?null:(0,w.jsx)(S,{stageId:e.stageId,appModel:t})]}),(0,w.jsx)(o,{children:(0,w.jsx)(u,{confidence:e.confidence,validationRequired:e.validationRequired})})]}),(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:T(e)}),(0,w.jsx)(g,{finding:e})]})}var D=(0,C.memo)(function({appModel:e,catalog:t,defaultCollapsed:n=!0}){let{sortMode:a,setSortMode:o,orderBy:s}=x(),[c,u]=(0,C.useState)(!n),[g,v]=(0,C.useState)(0),S=l(t,`straggler`).slice().sort((e,t)=>r[e.impactBand]-r[t.impactBand]),D=s(S,e=>[e],e=>e.stageId??null),O=d(),k=O?D.findIndex(e=>e===O.finding):null,{totalPages:A,effectivePage:j,visible:M}=y(D,g,v,k);return S.length===0?null:(0,w.jsxs)(f,{title:`Stragglers`,impactBand:S[0].impactBand,fixFor:S,badges:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(i,{type:`straggler`,impactBand:S[0].impactBand}),_(S,S.length,c)?(0,w.jsx)(b,{mode:a,onChange:o}):null]}),open:c,onOpenChange:u,summary:(0,w.jsx)(p,{value:T(S[0]),context:h(S.length)}),children:[(0,w.jsx)(`ul`,{className:`space-y-2`,children:M.map(t=>(0,w.jsx)(E,{finding:t,appModel:e},t.id))}),(0,w.jsx)(m,{page:j,totalPages:A,onPrev:()=>v(e=>e-1),onNext:()=>v(e=>e+1)})]})});export{D as Straggler};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{$ as n,U as r,d as i,it as a,u as o,ut as s}from"./DisclosureContext-ZpE6CkHx.js";import{p as c}from"./plan-graph-vendor-BYl-AzN5.js";import{c as l}from"./useRecentFiles-XZEnLlal.js";import{P as u,k as d,st as f}from"./index-B-03mG7K.js";import{i as p,o as m,r as h,s as g,t as _}from"./Dashboard-C1hNeX49.js";import{r as v}from"./impact-sort-CssZ6MT2.js";import{n as y}from"./finding-anchor-Cl6_5hfV.js";import{t as b}from"./usePagedRows-Dyl6T8Ok.js";import{n as x,t as S}from"./useSortMode-Dhvit8dt.js";var C=e(t(),1),w=c();function T(e){return e.stageId!=null}function E({groups:e,otherFailedTasks:t}){return e.length===0?null:(0,w.jsxs)(`ul`,{className:`space-y-2`,"aria-label":`Distinct failures`,children:[e.map((e,t)=>(0,w.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,w.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.count,` task`,e.count===1?``:`s`,`: `,(0,w.jsx)(`strong`,{className:`break-words`,children:f(e)})]}),e.stackExcerpt?(0,w.jsx)(`pre`,{className:`max-h-40 overflow-auto rounded-md bg-muted p-2 text-xs whitespace-pre`,children:e.stackExcerpt}):null]},t)),t>0?(0,w.jsxs)(`li`,{className:`text-xs text-muted-foreground`,children:[t,` more failed task`,t===1?``:`s`,` not shown`]}):null]})}function D({finding:e}){let t=y([e]),n=e.dominantError??e.dominantReason;return(0,w.jsxs)(`li`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`flex flex-col gap-1 transition-colors ${t.flashClassName}`,children:[(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(p,{stageId:e.stageId}),(0,w.jsx)(o,{impactBand:e.impactBand})]}),(0,w.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Failure rate: `,(0,w.jsxs)(`strong`,{children:[e.value,`%`]}),` (`,e.failedTasks,` tasks) · Dominant error: `,(0,w.jsx)(`strong`,{className:`break-words`,children:n??`—`})]}),(0,w.jsx)(E,{groups:e.failureGroups,otherFailedTasks:e.otherFailedTasks}),(0,w.jsx)(_,{finding:e})]})}function O({appModel:e,catalog:t,defaultCollapsed:o=!0}){let[c,f]=(0,C.useState)(0),{sortMode:p,setSortMode:_,orderBy:y}=S(),[E,O]=(0,C.useState)(!o),k=u(),A=(0,C.useRef)(!1);(0,C.useEffect)(()=>{if(!A.current){A.current=!0;return}f(0)},[e]);let j=l(t,`failures`).filter(T),M=[...j].sort((e,t)=>r[e.impactBand]-r[t.impactBand]||e.stageId-t.stageId),N=y(M,e=>[e],e=>e.stageId),P=k?N.findIndex(e=>e===k.finding):null,{totalPages:F,effectivePage:I,visible:L}=b(N,c,f,P);return j.length===0?null:(0,w.jsxs)(d,{title:`Failed Tasks`,fixFor:j,impactBand:s(j),badges:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(i,{type:`failures`,impactBand:s(j)}),v(j,j.length,E)?(0,w.jsx)(x,{mode:p,onChange:e=>{_(e),f(0)}}):null]}),open:E,onOpenChange:O,summary:(0,w.jsx)(m,{value:n(`pct`,a(M[0])),context:g(j.length)}),children:[(0,w.jsx)(`ul`,{className:`space-y-3`,children:L.map(e=>(0,w.jsx)(D,{finding:e},e.id))}),(0,w.jsx)(h,{page:I,totalPages:F,onPrev:()=>f(e=>e-1),onNext:()=>f(e=>e+1)})]})}export{O as TaskFailures};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{M as t}from"./charts-vendor-0VMaLVLN.js";import{p as n}from"./plan-graph-vendor-BYl-AzN5.js";import{t as r}from"./StageFindingGroup-BEtPWcT0.js";var i=e(t(),1),a=n();function o(e){return`P50 ${e.value}ms across many small tasks`}var s=(0,i.memo)(function(e){return(0,a.jsx)(r,{...e,type:`tinyTask`,title:`Tiny Tasks`,idPrefix:`tiny-task`,findingLabel:o})});export{s as TinyTask};
|
|
@@ -1 +0,0 @@
|
|
|
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,p as i,ut as a}from"./DisclosureContext-ZpE6CkHx.js";import{p as o}from"./plan-graph-vendor-BYl-AzN5.js";import{c as s,l as c}from"./useRecentFiles-XZEnLlal.js";import{P as l,S as u,k as d,l as f}from"./index-B-03mG7K.js";import{a as p,o as m,r as h,s as g,t as _}from"./Dashboard-C1hNeX49.js";import{i as v,r as y}from"./impact-sort-CssZ6MT2.js";import{n as b,t as x}from"./finding-anchor-Cl6_5hfV.js";import{t as S}from"./usePagedRows-Dyl6T8Ok.js";import{n as C,t as w}from"./useSortMode-Dhvit8dt.js";var T=e(t(),1),E=o();function D({finding:e}){let t=b([e]);return(0,E.jsxs)(`li`,{ref:t.ref,tabIndex:t.tabIndex,"data-flashed":t.dataFlashed,className:`space-y-2 ${x} transition-colors ${t.flashClassName}`,children:[e.stageIds.length>0?(0,E.jsx)(p,{pills:e.stageIds.map(e=>({id:e}))}):null,(0,E.jsxs)(`p`,{children:[f(e.recommendation??``).measured??e.recommendation,` `,(0,E.jsx)(_,{finding:e})]})]})}var O=(0,T.memo)(function({catalog:e,defaultCollapsed:t=!0}){let{sortMode:o,setSortMode:f,orderBy:p}=w(),[_,b]=(0,T.useState)(!t),[x,O]=(0,T.useState)(0),{findings:k,pills:A}=(0,T.useMemo)(()=>{let t=s(e,`underBroadcast`).sort((e,t)=>n[e.impactBand]-n[t.impactBand]);return{findings:t,pills:[...new Set(t.flatMap(e=>e.stageIds))].map(e=>({id:e}))}},[e]),j=p(k,e=>[e],v),M=l(),N=M?j.findIndex(e=>e===M.finding):null,{totalPages:P,effectivePage:F,visible:I}=S(j,x,O,N);return k.length===0?null:(0,E.jsxs)(d,{title:`Missed Broadcast Join`,fixFor:k,impactBand:a(k),open:_,onOpenChange:b,badges:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r,{type:`underBroadcast`,impactBand:a(k)??`info`,className:u}),y(k,k.length,_)?(0,E.jsx)(C,{mode:o,onChange:f}):null]}),statusBadge:(0,E.jsx)(i,{children:(0,E.jsx)(c,{confidence:k[0].confidence,validationRequired:k[0].validationRequired,evidenceKey:`sqlPlan`})}),summary:(0,E.jsx)(m,{value:`${A.length} stage${A.length===1?``:`s`}`,context:g(k.length)}),children:[(0,E.jsx)(`ul`,{className:`space-y-3 text-sm`,children:I.map(e=>(0,E.jsx)(D,{finding:e},e.id))}),(0,E.jsx)(h,{page:F,totalPages:P,onPrev:()=>O(e=>e-1),onNext:()=>O(e=>e+1)})]})});export{O as UnderBroadcast};
|