@akohn/dashql-react 0.0.0-stage → 0.0.20-dev.1001.g5e5121808
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/LICENSE +373 -0
- package/NOTICE +118 -0
- package/README.md +133 -2
- package/dist/_virtual/_vite/preload-helper.js +100 -0
- package/dist/brand/brand.d.ts +13 -0
- package/dist/brand/brand.js +14 -0
- package/dist/brand/landing_backdrop.d.ts +56 -0
- package/dist/brand/landing_backdrop.js +1019 -0
- package/dist/brand/wobble_morph.d.ts +54 -0
- package/dist/brand/wobble_morph.js +439 -0
- package/dist/components/action_list.d.ts +31 -0
- package/dist/components/action_list.js +63 -0
- package/dist/components/action_list.module.js +11 -0
- package/dist/components/anchored_overlay.d.ts +28 -0
- package/dist/components/anchored_overlay.js +93 -0
- package/dist/components/button.d.ts +42 -0
- package/dist/components/button.js +97 -0
- package/dist/components/button.module.js +20 -0
- package/dist/components/button_group.d.ts +7 -0
- package/dist/components/button_group.js +18 -0
- package/dist/components/button_group.module.js +3 -0
- package/dist/components/card_placeholder.d.ts +9 -0
- package/dist/components/card_placeholder.js +39 -0
- package/dist/components/card_placeholder.module.js +6 -0
- package/dist/components/clipboard.d.ts +19 -0
- package/dist/components/clipboard.js +54 -0
- package/dist/components/data_table/computation_tables.d.ts +12 -0
- package/dist/components/data_table/computation_tables.js +42 -0
- package/dist/components/data_table/data_table.d.ts +39 -0
- package/dist/components/data_table/data_table.js +415 -0
- package/dist/components/data_table/data_table.module.js +41 -0
- package/dist/components/data_table/data_table_cell.d.ts +7 -0
- package/dist/components/data_table/data_table_cell.js +9 -0
- package/dist/components/data_table/data_table_cell_data.d.ts +22 -0
- package/dist/components/data_table/data_table_cell_data.js +103 -0
- package/dist/components/data_table/data_table_cell_header_name.d.ts +17 -0
- package/dist/components/data_table/data_table_cell_header_name.js +73 -0
- package/dist/components/data_table/data_table_cell_header_plots.d.ts +29 -0
- package/dist/components/data_table/data_table_cell_header_plots.js +120 -0
- package/dist/components/data_table/data_table_colors.d.ts +19 -0
- package/dist/components/data_table/data_table_colors.js +27 -0
- package/dist/components/data_table/data_table_column_resize.d.ts +21 -0
- package/dist/components/data_table/data_table_column_resize.js +121 -0
- package/dist/components/data_table/data_table_focus.d.ts +15 -0
- package/dist/components/data_table/data_table_focus.js +53 -0
- package/dist/components/data_table/data_table_layout.d.ts +18 -0
- package/dist/components/data_table/data_table_layout.js +103 -0
- package/dist/components/data_table/data_table_ordering.d.ts +9 -0
- package/dist/components/data_table/data_table_ordering.js +39 -0
- package/dist/components/data_table/data_table_portals.d.ts +9 -0
- package/dist/components/data_table/data_table_portals.js +29 -0
- package/dist/components/data_table/data_table_row_detail.d.ts +22 -0
- package/dist/components/data_table/data_table_row_detail.js +68 -0
- package/dist/components/data_table/data_table_row_detail.module.js +7 -0
- package/dist/components/data_table/data_table_sticky_views.d.ts +35 -0
- package/dist/components/data_table/data_table_sticky_views.js +161 -0
- package/dist/components/data_table/data_table_window.d.ts +18 -0
- package/dist/components/data_table/data_table_window.js +118 -0
- package/dist/components/data_table/format_peek.d.ts +2 -0
- package/dist/components/data_table/format_peek.js +17 -0
- package/dist/components/data_table/histogram_bars.d.ts +36 -0
- package/dist/components/data_table/histogram_bars.js +100 -0
- package/dist/components/data_table/histogram_brush.d.ts +22 -0
- package/dist/components/data_table/histogram_brush.js +105 -0
- package/dist/components/data_table/histogram_cell.d.ts +17 -0
- package/dist/components/data_table/histogram_cell.js +324 -0
- package/dist/components/data_table/histogram_cell.module.js +9 -0
- package/dist/components/data_table/histogram_label.d.ts +1 -0
- package/dist/components/data_table/histogram_label.js +7 -0
- package/dist/components/data_table/memo_props.d.ts +1 -0
- package/dist/components/data_table/memo_props.js +17 -0
- package/dist/components/data_table/mostfrequent_cell.d.ts +17 -0
- package/dist/components/data_table/mostfrequent_cell.js +316 -0
- package/dist/components/data_table/mostfrequent_cell.module.js +10 -0
- package/dist/components/data_table/use_cross_filters.d.ts +14 -0
- package/dist/components/data_table/use_cross_filters.js +47 -0
- package/dist/components/deferred.d.ts +11 -0
- package/dist/components/deferred.js +41 -0
- package/dist/components/deferred.module.js +5 -0
- package/dist/components/error_boundary.d.ts +18 -0
- package/dist/components/error_boundary.js +15 -0
- package/dist/components/graph.module.js +15 -0
- package/dist/components/graph_port.d.ts +10 -0
- package/dist/components/graph_port.js +34 -0
- package/dist/components/inspector_overlay.d.ts +32 -0
- package/dist/components/inspector_overlay.js +72 -0
- package/dist/components/inspector_overlay.module.js +18 -0
- package/dist/components/json/json_arrow_symbol.d.ts +4 -0
- package/dist/components/json/json_arrow_symbol.js +25 -0
- package/dist/components/json/json_copy_button.d.ts +11 -0
- package/dist/components/json/json_copy_button.js +61 -0
- package/dist/components/json/json_ellipsis_symbol.d.ts +7 -0
- package/dist/components/json/json_ellipsis_symbol.js +11 -0
- package/dist/components/json/json_item_count.d.ts +5 -0
- package/dist/components/json/json_item_count.js +12 -0
- package/dist/components/json/json_key_name.d.ts +6 -0
- package/dist/components/json/json_key_name.js +40 -0
- package/dist/components/json/json_key_values.d.ts +12 -0
- package/dist/components/json/json_key_values.js +99 -0
- package/dist/components/json/json_literal.d.ts +8 -0
- package/dist/components/json/json_literal.js +140 -0
- package/dist/components/json/json_nested_close.d.ts +11 -0
- package/dist/components/json/json_nested_close.js +31 -0
- package/dist/components/json/json_nested_open.d.ts +18 -0
- package/dist/components/json/json_nested_open.js +150 -0
- package/dist/components/json/json_nested_state.d.ts +14 -0
- package/dist/components/json/json_nested_state.js +28 -0
- package/dist/components/json/json_tool_state.d.ts +18 -0
- package/dist/components/json/json_tool_state.js +46 -0
- package/dist/components/json/json_value.d.ts +10 -0
- package/dist/components/json/json_value.js +46 -0
- package/dist/components/json/json_view.d.ts +14 -0
- package/dist/components/json/json_view.js +37 -0
- package/dist/components/json/json_view.module.js +41 -0
- package/dist/components/json/json_view_state.d.ts +14 -0
- package/dist/components/json/json_view_state.js +32 -0
- package/dist/components/json/unique_key.d.ts +1 -0
- package/dist/components/json/unique_key.js +8 -0
- package/dist/components/keyvalue_list.d.ts +25 -0
- package/dist/components/keyvalue_list.js +106 -0
- package/dist/components/keyvalue_list.module.js +15 -0
- package/dist/components/name_input.d.ts +12 -0
- package/dist/components/name_input.js +63 -0
- package/dist/components/overlay.d.ts +53 -0
- package/dist/components/overlay.js +183 -0
- package/dist/components/overlay.module.js +32 -0
- package/dist/components/panel_resize_handle.d.ts +12 -0
- package/dist/components/panel_resize_handle.js +39 -0
- package/dist/components/portal.d.ts +8 -0
- package/dist/components/portal.js +53 -0
- package/dist/components/progress_bar.d.ts +7 -0
- package/dist/components/progress_bar.js +21 -0
- package/dist/components/progress_bar.module.js +3 -0
- package/dist/components/query_history_viewer.d.ts +31 -0
- package/dist/components/query_history_viewer.js +271 -0
- package/dist/components/query_history_viewer.module.js +7 -0
- package/dist/components/query_profile/engine_profile_view.d.ts +19 -0
- package/dist/components/query_profile/engine_profile_view.js +94 -0
- package/dist/components/query_profile/numeric_limits.d.ts +1 -0
- package/dist/components/query_profile/numeric_limits.js +2 -0
- package/dist/components/query_profile/profile_execution_controller.d.ts +12 -0
- package/dist/components/query_profile/profile_execution_controller.js +44 -0
- package/dist/components/query_profile/profile_fit.d.ts +24 -0
- package/dist/components/query_profile/profile_fit.js +22 -0
- package/dist/components/query_profile/profile_navigation.d.ts +3 -0
- package/dist/components/query_profile/profile_navigation.js +34 -0
- package/dist/components/query_profile/profile_scene.d.ts +64 -0
- package/dist/components/query_profile/profile_scene.js +422 -0
- package/dist/components/query_profile/query_profile_view.d.ts +36 -0
- package/dist/components/query_profile/query_profile_view.js +953 -0
- package/dist/components/query_profile/query_profile_view.module.js +23 -0
- package/dist/components/query_progress/query_profile_overlay.d.ts +7 -0
- package/dist/components/query_progress/query_profile_overlay.js +67 -0
- package/dist/components/query_progress/query_profile_overlay.module.js +6 -0
- package/dist/components/query_progress/query_progress_panel.d.ts +14 -0
- package/dist/components/query_progress/query_progress_panel.js +255 -0
- package/dist/components/query_progress/query_progress_panel.module.js +10 -0
- package/dist/components/query_result/cell_detail_overlay.d.ts +34 -0
- package/dist/components/query_result/cell_detail_overlay.js +277 -0
- package/dist/components/query_result/cell_detail_overlay.module.js +21 -0
- package/dist/components/query_result/query_result_action_menu.d.ts +12 -0
- package/dist/components/query_result/query_result_action_menu.js +62 -0
- package/dist/components/query_result/query_result_action_menu.module.js +2 -0
- package/dist/components/query_result/query_result_details.d.ts +17 -0
- package/dist/components/query_result/query_result_details.js +46 -0
- package/dist/components/query_result/query_result_details.module.js +5 -0
- package/dist/components/query_result/query_result_download_button.d.ts +8 -0
- package/dist/components/query_result/query_result_download_button.js +38 -0
- package/dist/components/query_result/query_result_header.d.ts +21 -0
- package/dist/components/query_result/query_result_header.js +72 -0
- package/dist/components/query_result/query_result_header.module.js +3 -0
- package/dist/components/query_result/query_result_search_controls.d.ts +12 -0
- package/dist/components/query_result/query_result_search_controls.js +141 -0
- package/dist/components/query_result/query_result_search_controls.module.js +7 -0
- package/dist/components/query_result/query_result_toolbar.d.ts +21 -0
- package/dist/components/query_result/query_result_toolbar.js +74 -0
- package/dist/components/query_result/result_table_overlay.d.ts +9 -0
- package/dist/components/query_result/result_table_overlay.js +73 -0
- package/dist/components/query_result/result_table_overlay.module.js +6 -0
- package/dist/components/query_result/use_query_result_search.d.ts +8 -0
- package/dist/components/query_result/use_query_result_search.js +28 -0
- package/dist/components/segmented_control.d.ts +58 -0
- package/dist/components/segmented_control.js +116 -0
- package/dist/components/segmented_control.module.js +17 -0
- package/dist/components/separator.d.ts +21 -0
- package/dist/components/separator.js +79 -0
- package/dist/components/separator.module.js +7 -0
- package/dist/components/sheet.d.ts +11 -0
- package/dist/components/sheet.js +65 -0
- package/dist/components/sheet.module.js +7 -0
- package/dist/components/size_observer.d.ts +7 -0
- package/dist/components/size_observer.js +57 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +14 -0
- package/dist/components/skeleton.module.js +2 -0
- package/dist/components/spinners.d.ts +8 -0
- package/dist/components/spinners.js +33 -0
- package/dist/components/spinners.module.js +8 -0
- package/dist/components/status_indicator.d.ts +36 -0
- package/dist/components/status_indicator.js +182 -0
- package/dist/components/status_indicator.module.js +3 -0
- package/dist/components/symbol_icon.d.ts +65 -0
- package/dist/components/symbol_icon.js +213 -0
- package/dist/components/tab_header.d.ts +11 -0
- package/dist/components/tab_header.js +55 -0
- package/dist/components/tab_header.module.js +7 -0
- package/dist/components/tag.d.ts +10 -0
- package/dist/components/tag.js +17 -0
- package/dist/components/tag.module.js +4 -0
- package/dist/components/text_field.d.ts +44 -0
- package/dist/components/text_field.js +159 -0
- package/dist/components/text_field.module.js +15 -0
- package/dist/components/text_input.d.ts +25 -0
- package/dist/components/text_input.js +90 -0
- package/dist/components/text_input.module.js +13 -0
- package/dist/components/text_input_action.d.ts +19 -0
- package/dist/components/text_input_action.js +33 -0
- package/dist/components/text_input_action.module.js +2 -0
- package/dist/components/toggle_switch.d.ts +7 -0
- package/dist/components/toggle_switch.js +22 -0
- package/dist/components/toggle_switch.module.js +6 -0
- package/dist/components/tooltip.d.ts +22 -0
- package/dist/components/tooltip.js +139 -0
- package/dist/components/tooltip.module.js +2 -0
- package/dist/components/tree_entry.d.ts +17 -0
- package/dist/components/tree_entry.js +48 -0
- package/dist/components/tree_entry.module.js +9 -0
- package/dist/components/value_list.d.ts +17 -0
- package/dist/components/value_list.js +70 -0
- package/dist/components/value_list.module.js +8 -0
- package/dist/components/vegalite_chart.d.ts +16 -0
- package/dist/components/vegalite_chart.js +149 -0
- package/dist/components/vegalite_chart.module.js +3 -0
- package/dist/components/vegalite_view.d.ts +26 -0
- package/dist/components/vegalite_view.js +239 -0
- package/dist/components/vegalite_view.module.js +5 -0
- package/dist/components/vertical_scroll_shadows.d.ts +14 -0
- package/dist/components/vertical_scroll_shadows.js +55 -0
- package/dist/components/vertical_scroll_shadows.module.js +5 -0
- package/dist/components/vertical_split.d.ts +15 -0
- package/dist/components/vertical_split.js +112 -0
- package/dist/components/vertical_split.module.js +5 -0
- package/dist/components/vertical_tabs.d.ts +36 -0
- package/dist/components/vertical_tabs.js +169 -0
- package/dist/components/vertical_tabs.module.js +23 -0
- package/dist/components/visualization/capped_rows.d.ts +9 -0
- package/dist/components/visualization/capped_rows.js +23 -0
- package/dist/components/visualization/capped_rows.module.js +3 -0
- package/dist/components/visualization/chart_download_button.d.ts +12 -0
- package/dist/components/visualization/chart_download_button.js +41 -0
- package/dist/components/visualization/kpi_view.d.ts +10 -0
- package/dist/components/visualization/kpi_view.js +215 -0
- package/dist/components/visualization/kpi_view.module.js +17 -0
- package/dist/components/visualization/markdown_view.d.ts +17 -0
- package/dist/components/visualization/markdown_view.js +154 -0
- package/dist/components/visualization/markdown_view.module.js +4 -0
- package/dist/components/visualization/result_rows.d.ts +17 -0
- package/dist/components/visualization/result_rows.js +82 -0
- package/dist/components/visualization/vegalite_preview.d.ts +8 -0
- package/dist/components/visualization/vegalite_preview.js +17 -0
- package/dist/components/visualization/vegalite_preview.module.js +2 -0
- package/dist/components/visualization/visualization_dispatch.d.ts +13 -0
- package/dist/components/visualization/visualization_dispatch.js +40 -0
- package/dist/components/visualization/visualization_panel.d.ts +10 -0
- package/dist/components/visualization/visualization_panel.js +36 -0
- package/dist/components/visualization/visualization_panel.module.js +3 -0
- package/dist/dom/anchored_position.d.ts +42 -0
- package/dist/dom/anchored_position.js +255 -0
- package/dist/dom/app_host.d.ts +2 -0
- package/dist/dom/app_host.js +7 -0
- package/dist/dom/calm_frames.d.ts +29 -0
- package/dist/dom/calm_frames.js +120 -0
- package/dist/dom/classnames.d.ts +8 -0
- package/dist/dom/classnames.js +20 -0
- package/dist/dom/download_file.d.ts +1 -0
- package/dist/dom/download_file.js +12 -0
- package/dist/dom/focus.d.ts +29 -0
- package/dist/dom/focus.js +84 -0
- package/dist/dom/graph_edges.d.ts +53 -0
- package/dist/dom/graph_edges.js +450 -0
- package/dist/dom/key_events.d.ts +9 -0
- package/dist/dom/key_events.js +33 -0
- package/dist/dom/media_query.d.ts +5 -0
- package/dist/dom/media_query.js +18 -0
- package/dist/dom/outside_click.d.ts +8 -0
- package/dist/dom/outside_click.js +32 -0
- package/dist/dom/rerender_ref.d.ts +2 -0
- package/dist/dom/rerender_ref.js +11 -0
- package/dist/dom/row_context_menu.d.ts +7 -0
- package/dist/dom/row_context_menu.js +32 -0
- package/dist/dom/scrollbar.d.ts +3 -0
- package/dist/dom/scrollbar.js +23 -0
- package/dist/format/format.d.ts +11 -0
- package/dist/format/format.js +72 -0
- package/dist/format/query_progress_format.d.ts +17 -0
- package/dist/format/query_progress_format.js +69 -0
- package/dist/format/time_format.d.ts +5 -0
- package/dist/format/time_format.js +45 -0
- package/dist/hooks.d.ts +72 -0
- package/dist/hooks.js +305 -0
- package/dist/host.d.ts +10 -0
- package/dist/host.js +12 -0
- package/dist/logger.d.ts +4 -0
- package/dist/logger.js +13 -0
- package/dist/models/computation_model.d.ts +14 -0
- package/dist/models/computation_model.js +27 -0
- package/dist/models/query_model.d.ts +12 -0
- package/dist/models/query_model.js +27 -0
- package/dist/models/script_model.d.ts +17 -0
- package/dist/models/script_model.js +59 -0
- package/dist/platform/content_length.d.ts +1 -0
- package/dist/platform/content_length.js +7 -0
- package/dist/platform/core_provider.d.ts +18 -0
- package/dist/platform/core_provider.js +106 -0
- package/dist/platform/embedded_database_provider.d.ts +19 -0
- package/dist/platform/embedded_database_provider.js +53 -0
- package/dist/platform/page_runtime.d.ts +3 -0
- package/dist/platform/page_runtime.js +29 -0
- package/dist/style.css +4386 -0
- package/dist/svg_symbols.d.ts +2 -0
- package/dist/svg_symbols.js +2 -0
- package/dist/symbols.svg +1197 -0
- package/dist/theme/color_scheme.d.ts +4 -0
- package/dist/theme/color_scheme.js +28 -0
- package/dist/theme/xcode_palette.d.ts +22 -0
- package/dist/theme/xcode_palette.js +4 -0
- package/dist/theme/xcode_palettes.js +41 -0
- package/dist/utils/plan_engine.d.ts +2 -0
- package/dist/utils/plan_engine.js +13 -0
- package/dist/vegalite/vegalite_check.d.ts +1 -0
- package/dist/vegalite/vegalite_check.js +7 -0
- package/dist/vegalite/vegalite_crossfilter.d.ts +54 -0
- package/dist/vegalite/vegalite_crossfilter.js +187 -0
- package/dist/vegalite/vegalite_image.d.ts +14 -0
- package/dist/vegalite/vegalite_image.js +28 -0
- package/dist/vegalite/vegalite_loader.d.ts +7 -0
- package/dist/vegalite/vegalite_loader.js +15 -0
- package/dist/vegalite/vegalite_rows.d.ts +3 -0
- package/dist/vegalite/vegalite_rows.js +23 -0
- package/dist/vegalite/vegalite_theme.d.ts +13 -0
- package/dist/vegalite/vegalite_theme.js +141 -0
- package/fonts/InstrumentSans-Bold.ttf +0 -0
- package/fonts/InstrumentSans-Medium.ttf +0 -0
- package/fonts/InstrumentSans-OFL.txt +93 -0
- package/fonts/InstrumentSans-Regular.ttf +0 -0
- package/fonts/InstrumentSans-SemiBold.ttf +0 -0
- package/fonts/JetBrainsMono-Bold.ttf +0 -0
- package/fonts/JetBrainsMono-Medium.ttf +0 -0
- package/fonts/JetBrainsMono-OFL.txt +93 -0
- package/fonts/JetBrainsMono-Regular.ttf +0 -0
- package/fonts/JetBrainsMono-SemiBold.ttf +0 -0
- package/fonts/fonts.css +61 -0
- package/package.json +403 -4
- package/styles/colors.css +110 -0
- package/styles/flavors/dbcom.css +48 -0
- package/styles/tokens.css +192 -0
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import "./numeric_limits.js";
|
|
2
|
+
import { PathBuilder, buildEdgePathBetweenRectangles, selectHorizontalEdgeType, selectVerticalEdgeType } from "../../dom/graph_edges.js";
|
|
3
|
+
import * as dashql from "@akohn/dashql";
|
|
4
|
+
var PROFILE_OPERATOR_PORT_OUTPUT = 1;
|
|
5
|
+
var PROFILE_OPERATOR_PORT_INPUT = 2;
|
|
6
|
+
function readString(vm, id) {
|
|
7
|
+
return id !== 4294967295 ? vm.stringDictionary(id) : null;
|
|
8
|
+
}
|
|
9
|
+
function readAttributeRange(vm, begin, count) {
|
|
10
|
+
const properties = {};
|
|
11
|
+
const attribute = new dashql.buffers.profile.ProfileAttribute();
|
|
12
|
+
for (let i = 0; i < count; ++i) {
|
|
13
|
+
const value = vm.attributes(begin + i, attribute);
|
|
14
|
+
if (value == null) continue;
|
|
15
|
+
const name = readString(vm, value.name());
|
|
16
|
+
const json = readString(vm, value.valueJson());
|
|
17
|
+
if (name == null || json == null) continue;
|
|
18
|
+
try {
|
|
19
|
+
properties[name] = JSON.parse(json);
|
|
20
|
+
} catch {
|
|
21
|
+
properties[name] = json;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return properties;
|
|
25
|
+
}
|
|
26
|
+
function estimateRelativeDifference(estimated, actual) {
|
|
27
|
+
if (estimated === 0) return actual === 0 ? 0 : Number.POSITIVE_INFINITY;
|
|
28
|
+
return (actual - estimated) / Math.abs(estimated);
|
|
29
|
+
}
|
|
30
|
+
function buildCrossEdgePath(source, target, minHandleLength = 24, minInputHandleLength = 48, leftToRight = false) {
|
|
31
|
+
if (leftToRight) {
|
|
32
|
+
const sourceX = source.x - source.width / 2;
|
|
33
|
+
const sourceY = source.y;
|
|
34
|
+
const targetX = target.x + target.width / 2;
|
|
35
|
+
const targetY = target.y;
|
|
36
|
+
const sourceHandleLength = Math.max(minHandleLength, Math.abs(sourceX - targetX) / 2);
|
|
37
|
+
const targetHandleLength = Math.max(minInputHandleLength, sourceHandleLength);
|
|
38
|
+
return `M ${sourceX} ${sourceY} C ${sourceX - sourceHandleLength} ${sourceY}, ${targetX + targetHandleLength} ${targetY}, ${targetX} ${targetY}`;
|
|
39
|
+
}
|
|
40
|
+
const sourceX = source.x;
|
|
41
|
+
const sourceY = source.y - source.height / 2;
|
|
42
|
+
const targetX = target.x;
|
|
43
|
+
const targetY = target.y + target.height / 2;
|
|
44
|
+
const sourceHandleLength = Math.max(minHandleLength, Math.abs(sourceY - targetY) / 2);
|
|
45
|
+
const targetHandleLength = Math.max(minInputHandleLength, sourceHandleLength);
|
|
46
|
+
return `M ${sourceX} ${sourceY} C ${sourceX} ${sourceY - sourceHandleLength}, ${targetX} ${targetY + targetHandleLength}, ${targetX} ${targetY}`;
|
|
47
|
+
}
|
|
48
|
+
function truncateProfileLabel(label, maxChars) {
|
|
49
|
+
const chars = Array.from(label);
|
|
50
|
+
if (chars.length <= maxChars) return label;
|
|
51
|
+
if (maxChars === 0) return "";
|
|
52
|
+
return `${chars.slice(0, maxChars - 1).join("")}…`;
|
|
53
|
+
}
|
|
54
|
+
function buildPipelinePath(operatorIds, operators) {
|
|
55
|
+
if (operatorIds.length === 0) return "";
|
|
56
|
+
const padding = 4;
|
|
57
|
+
const radius = 8;
|
|
58
|
+
const parts = [];
|
|
59
|
+
for (const operatorId of operatorIds) {
|
|
60
|
+
const op = operators[operatorId];
|
|
61
|
+
if (op == null) continue;
|
|
62
|
+
const x = op.rect.x - op.rect.width / 2 - padding;
|
|
63
|
+
const y = op.rect.y - op.rect.height / 2 - padding;
|
|
64
|
+
const width = op.rect.width + 8;
|
|
65
|
+
const height = op.rect.height + 8;
|
|
66
|
+
parts.push(`M ${x + radius} ${y} H ${x + width - radius} Q ${x + width} ${y} ${x + width} ${y + radius} V ${y + height - radius} Q ${x + width} ${y + height} ${x + width - radius} ${y + height} H ${x + radius} Q ${x} ${y + height} ${x} ${y + height - radius} V ${y + radius} Q ${x} ${y} ${x + radius} ${y} Z`);
|
|
67
|
+
}
|
|
68
|
+
return parts.join(" ");
|
|
69
|
+
}
|
|
70
|
+
function pointKey(point) {
|
|
71
|
+
return `${point.x},${point.y}`;
|
|
72
|
+
}
|
|
73
|
+
function segmentDirection(segment) {
|
|
74
|
+
if (segment.to.x > segment.from.x) return 0;
|
|
75
|
+
if (segment.to.y > segment.from.y) return 1;
|
|
76
|
+
if (segment.to.x < segment.from.x) return 2;
|
|
77
|
+
return 3;
|
|
78
|
+
}
|
|
79
|
+
function selectNextFragmentSegment(candidates, previous, unused) {
|
|
80
|
+
const previousDirection = segmentDirection(previous);
|
|
81
|
+
for (const turn of [
|
|
82
|
+
1,
|
|
83
|
+
0,
|
|
84
|
+
3,
|
|
85
|
+
2
|
|
86
|
+
]) {
|
|
87
|
+
const direction = (previousDirection + turn) % 4;
|
|
88
|
+
const candidate = candidates?.find((segment) => unused.has(segment) && segmentDirection(segment) === direction);
|
|
89
|
+
if (candidate != null) return candidate;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function renderRoundedFragmentContour(points, radius) {
|
|
93
|
+
const contour = points.length > 1 && pointKey(points[0]) === pointKey(points[points.length - 1]) ? points.slice(0, -1) : points;
|
|
94
|
+
if (contour.length < 3) return "";
|
|
95
|
+
const corners = contour.map((point, index) => {
|
|
96
|
+
const previous = contour[(index + contour.length - 1) % contour.length];
|
|
97
|
+
const next = contour[(index + 1) % contour.length];
|
|
98
|
+
const previousDistance = Math.abs(previous.x - point.x) + Math.abs(previous.y - point.y);
|
|
99
|
+
const nextDistance = Math.abs(next.x - point.x) + Math.abs(next.y - point.y);
|
|
100
|
+
const offset = Math.min(radius, previousDistance / 2, nextDistance / 2);
|
|
101
|
+
return {
|
|
102
|
+
point,
|
|
103
|
+
entry: {
|
|
104
|
+
x: point.x + Math.sign(previous.x - point.x) * offset,
|
|
105
|
+
y: point.y + Math.sign(previous.y - point.y) * offset
|
|
106
|
+
},
|
|
107
|
+
exit: {
|
|
108
|
+
x: point.x + Math.sign(next.x - point.x) * offset,
|
|
109
|
+
y: point.y + Math.sign(next.y - point.y) * offset
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
const first = corners[0];
|
|
114
|
+
const parts = [`M ${first.entry.x} ${first.entry.y}`, `Q ${first.point.x} ${first.point.y} ${first.exit.x} ${first.exit.y}`];
|
|
115
|
+
for (let i = 1; i < corners.length; ++i) {
|
|
116
|
+
const corner = corners[i];
|
|
117
|
+
parts.push(`L ${corner.entry.x} ${corner.entry.y}`);
|
|
118
|
+
parts.push(`Q ${corner.point.x} ${corner.point.y} ${corner.exit.x} ${corner.exit.y}`);
|
|
119
|
+
}
|
|
120
|
+
parts.push("Z");
|
|
121
|
+
return parts.join(" ");
|
|
122
|
+
}
|
|
123
|
+
function appendFragmentRect(rectangles, rect, padding) {
|
|
124
|
+
rectangles.push({
|
|
125
|
+
x: rect.x - rect.width / 2 - padding,
|
|
126
|
+
y: rect.y - rect.height / 2 - padding,
|
|
127
|
+
width: rect.width + padding * 2,
|
|
128
|
+
height: rect.height + padding * 2
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function appendFragmentCorridor(rectangles, from, to, width, padding, leftToRight) {
|
|
132
|
+
if (leftToRight ? Math.abs(from.y - to.y) < .5 : Math.abs(from.x - to.x) < .5) {
|
|
133
|
+
const left = Math.max(from.x - from.width / 2, to.x - to.width / 2) - padding;
|
|
134
|
+
const right = Math.min(from.x + from.width / 2, to.x + to.width / 2) + padding;
|
|
135
|
+
const top = Math.max(from.y - from.height / 2, to.y - to.height / 2) - padding;
|
|
136
|
+
const bottom = Math.min(from.y + from.height / 2, to.y + to.height / 2) + padding;
|
|
137
|
+
rectangles.push(leftToRight ? {
|
|
138
|
+
x: Math.min(from.x, to.x),
|
|
139
|
+
y: top,
|
|
140
|
+
width: Math.abs(to.x - from.x),
|
|
141
|
+
height: bottom - top
|
|
142
|
+
} : {
|
|
143
|
+
x: left,
|
|
144
|
+
y: Math.min(from.y, to.y),
|
|
145
|
+
width: right - left,
|
|
146
|
+
height: Math.abs(to.y - from.y)
|
|
147
|
+
});
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const halfWidth = width / 2;
|
|
151
|
+
if (leftToRight) {
|
|
152
|
+
const direction = Math.sign(to.x - from.x) || -1;
|
|
153
|
+
const fromX = from.x + direction * from.width / 2;
|
|
154
|
+
const toX = to.x - direction * to.width / 2;
|
|
155
|
+
const midX = (fromX + toX) / 2;
|
|
156
|
+
rectangles.push({
|
|
157
|
+
x: Math.min(fromX, midX) - halfWidth,
|
|
158
|
+
y: from.y - halfWidth,
|
|
159
|
+
width: Math.abs(midX - fromX) + width,
|
|
160
|
+
height: width
|
|
161
|
+
});
|
|
162
|
+
rectangles.push({
|
|
163
|
+
x: midX - halfWidth,
|
|
164
|
+
y: Math.min(from.y, to.y) - halfWidth,
|
|
165
|
+
width,
|
|
166
|
+
height: Math.abs(to.y - from.y) + width
|
|
167
|
+
});
|
|
168
|
+
rectangles.push({
|
|
169
|
+
x: Math.min(midX, toX) - halfWidth,
|
|
170
|
+
y: to.y - halfWidth,
|
|
171
|
+
width: Math.abs(toX - midX) + width,
|
|
172
|
+
height: width
|
|
173
|
+
});
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const direction = Math.sign(to.y - from.y) || 1;
|
|
177
|
+
const fromY = from.y + direction * from.height / 2;
|
|
178
|
+
const toY = to.y - direction * to.height / 2;
|
|
179
|
+
const midY = (fromY + toY) / 2;
|
|
180
|
+
rectangles.push({
|
|
181
|
+
x: from.x - halfWidth,
|
|
182
|
+
y: Math.min(fromY, midY) - halfWidth,
|
|
183
|
+
width,
|
|
184
|
+
height: Math.abs(midY - fromY) + width
|
|
185
|
+
});
|
|
186
|
+
rectangles.push({
|
|
187
|
+
x: Math.min(from.x, to.x) - halfWidth,
|
|
188
|
+
y: midY - halfWidth,
|
|
189
|
+
width: Math.abs(to.x - from.x) + width,
|
|
190
|
+
height: width
|
|
191
|
+
});
|
|
192
|
+
rectangles.push({
|
|
193
|
+
x: to.x - halfWidth,
|
|
194
|
+
y: Math.min(midY, toY) - halfWidth,
|
|
195
|
+
width,
|
|
196
|
+
height: Math.abs(toY - midY) + width
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
function traceFragmentRectangles(rectangles) {
|
|
200
|
+
if (rectangles.length === 0) return "";
|
|
201
|
+
const xs = Array.from(new Set(rectangles.flatMap((rect) => [rect.x, rect.x + rect.width]))).sort((a, b) => a - b);
|
|
202
|
+
const ys = Array.from(new Set(rectangles.flatMap((rect) => [rect.y, rect.y + rect.height]))).sort((a, b) => a - b);
|
|
203
|
+
const filled = Array.from({ length: ys.length - 1 }, () => new Uint8Array(xs.length - 1));
|
|
204
|
+
for (const rect of rectangles) {
|
|
205
|
+
const left = xs.indexOf(rect.x);
|
|
206
|
+
const right = xs.indexOf(rect.x + rect.width);
|
|
207
|
+
const top = ys.indexOf(rect.y);
|
|
208
|
+
const bottom = ys.indexOf(rect.y + rect.height);
|
|
209
|
+
for (let y = top; y < bottom; ++y) for (let x = left; x < right; ++x) filled[y][x] = 1;
|
|
210
|
+
}
|
|
211
|
+
const segments = [];
|
|
212
|
+
const isFilled = (x, y) => y >= 0 && y < filled.length && x >= 0 && x < filled[y].length && filled[y][x] !== 0;
|
|
213
|
+
for (let y = 0; y < filled.length; ++y) for (let x = 0; x < filled[y].length; ++x) {
|
|
214
|
+
if (!isFilled(x, y)) continue;
|
|
215
|
+
if (!isFilled(x, y - 1)) segments.push({
|
|
216
|
+
from: {
|
|
217
|
+
x: xs[x],
|
|
218
|
+
y: ys[y]
|
|
219
|
+
},
|
|
220
|
+
to: {
|
|
221
|
+
x: xs[x + 1],
|
|
222
|
+
y: ys[y]
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
if (!isFilled(x + 1, y)) segments.push({
|
|
226
|
+
from: {
|
|
227
|
+
x: xs[x + 1],
|
|
228
|
+
y: ys[y]
|
|
229
|
+
},
|
|
230
|
+
to: {
|
|
231
|
+
x: xs[x + 1],
|
|
232
|
+
y: ys[y + 1]
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
if (!isFilled(x, y + 1)) segments.push({
|
|
236
|
+
from: {
|
|
237
|
+
x: xs[x + 1],
|
|
238
|
+
y: ys[y + 1]
|
|
239
|
+
},
|
|
240
|
+
to: {
|
|
241
|
+
x: xs[x],
|
|
242
|
+
y: ys[y + 1]
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
if (!isFilled(x - 1, y)) segments.push({
|
|
246
|
+
from: {
|
|
247
|
+
x: xs[x],
|
|
248
|
+
y: ys[y + 1]
|
|
249
|
+
},
|
|
250
|
+
to: {
|
|
251
|
+
x: xs[x],
|
|
252
|
+
y: ys[y]
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
const segmentsByStart = /* @__PURE__ */ new Map();
|
|
257
|
+
for (const segment of segments) {
|
|
258
|
+
const key = pointKey(segment.from);
|
|
259
|
+
const candidates = segmentsByStart.get(key);
|
|
260
|
+
if (candidates == null) segmentsByStart.set(key, [segment]);
|
|
261
|
+
else candidates.push(segment);
|
|
262
|
+
}
|
|
263
|
+
const parts = [];
|
|
264
|
+
const unused = new Set(segments);
|
|
265
|
+
while (unused.size > 0) {
|
|
266
|
+
const first = unused.values().next().value;
|
|
267
|
+
unused.delete(first);
|
|
268
|
+
const start = first.from;
|
|
269
|
+
let previousSegment = first;
|
|
270
|
+
let current = first.to;
|
|
271
|
+
const points = [start, current];
|
|
272
|
+
while (pointKey(current) !== pointKey(start)) {
|
|
273
|
+
const next = selectNextFragmentSegment(segmentsByStart.get(pointKey(current)), previousSegment, unused);
|
|
274
|
+
if (next == null) break;
|
|
275
|
+
unused.delete(next);
|
|
276
|
+
previousSegment = next;
|
|
277
|
+
current = next.to;
|
|
278
|
+
const previous = points[points.length - 1];
|
|
279
|
+
const beforePrevious = points[points.length - 2];
|
|
280
|
+
if (beforePrevious != null && (beforePrevious.x === previous.x && previous.x === current.x || beforePrevious.y === previous.y && previous.y === current.y)) points[points.length - 1] = current;
|
|
281
|
+
else points.push(current);
|
|
282
|
+
}
|
|
283
|
+
if (pointKey(current) === pointKey(start)) {
|
|
284
|
+
const path = renderRoundedFragmentContour(points, 8);
|
|
285
|
+
if (path.length > 0) parts.push(path);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return parts.join(" ");
|
|
289
|
+
}
|
|
290
|
+
var FRAGMENT_PADDING = 8;
|
|
291
|
+
function buildFragmentPath(operatorIds, operators, edges = [], padding = FRAGMENT_PADDING, corridorWidth = padding * 2, leftToRight = false) {
|
|
292
|
+
const rectangles = [];
|
|
293
|
+
const memberIds = new Set(operatorIds);
|
|
294
|
+
for (const operatorId of operatorIds) {
|
|
295
|
+
const op = operators[operatorId];
|
|
296
|
+
if (op == null) continue;
|
|
297
|
+
appendFragmentRect(rectangles, op.rect, padding);
|
|
298
|
+
}
|
|
299
|
+
for (const edge of edges) {
|
|
300
|
+
if (!memberIds.has(edge.childOperator) || !memberIds.has(edge.parentOperator)) continue;
|
|
301
|
+
const child = operators[edge.childOperator];
|
|
302
|
+
const parent = operators[edge.parentOperator];
|
|
303
|
+
if (child == null || parent == null) continue;
|
|
304
|
+
appendFragmentCorridor(rectangles, child.rect, parent.rect, corridorWidth, padding, leftToRight);
|
|
305
|
+
}
|
|
306
|
+
return traceFragmentRectangles(rectangles);
|
|
307
|
+
}
|
|
308
|
+
function readIndexRange(read, begin, count) {
|
|
309
|
+
const out = [];
|
|
310
|
+
for (let i = 0; i < count; ++i) {
|
|
311
|
+
const value = read(begin + i);
|
|
312
|
+
if (value != null) out.push(value);
|
|
313
|
+
}
|
|
314
|
+
return out;
|
|
315
|
+
}
|
|
316
|
+
function materializeProfileScene(viewModel) {
|
|
317
|
+
const vm = viewModel.read();
|
|
318
|
+
const layoutConfig = vm.layoutConfig().unpack();
|
|
319
|
+
const input = layoutConfig.input;
|
|
320
|
+
const leftToRight = input.orientation === dashql.buffers.profile.ProfileLayoutOrientation.LEFT_TO_RIGHT;
|
|
321
|
+
const selectEdgeType = leftToRight ? selectHorizontalEdgeType : selectVerticalEdgeType;
|
|
322
|
+
const operators = new Array(vm.operatorsLength());
|
|
323
|
+
const tmpOperator = new dashql.buffers.profile.ProfileOperator();
|
|
324
|
+
for (let i = 0; i < vm.operatorsLength(); ++i) {
|
|
325
|
+
const op = vm.operators(i, tmpOperator);
|
|
326
|
+
const layout = op.layoutRect();
|
|
327
|
+
const typeName = readString(vm, op.typeName());
|
|
328
|
+
const label = readString(vm, op.label()) ?? typeName ?? "operator";
|
|
329
|
+
operators[i] = {
|
|
330
|
+
id: i,
|
|
331
|
+
kind: op.kind(),
|
|
332
|
+
typeName,
|
|
333
|
+
label,
|
|
334
|
+
displayLabel: truncateProfileLabel(label, input.maxLabelChars),
|
|
335
|
+
rect: {
|
|
336
|
+
x: layout.x(),
|
|
337
|
+
y: layout.y(),
|
|
338
|
+
width: layout.width(),
|
|
339
|
+
height: layout.height()
|
|
340
|
+
},
|
|
341
|
+
ports: 0,
|
|
342
|
+
estimatedRows: op.estimatedRows(),
|
|
343
|
+
fragment: op.fragment(),
|
|
344
|
+
properties: readAttributeRange(vm, op.attributesBegin(), op.attributeCount())
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
const edges = [];
|
|
348
|
+
const tmpEdge = new dashql.buffers.profile.ProfileOperatorEdge();
|
|
349
|
+
for (let i = 0; i < vm.operatorEdgesLength(); ++i) {
|
|
350
|
+
const edge = vm.operatorEdges(i, tmpEdge);
|
|
351
|
+
const child = operators[edge.child()];
|
|
352
|
+
const parent = operators[edge.parent()];
|
|
353
|
+
child.ports |= 1;
|
|
354
|
+
parent.ports |= 2;
|
|
355
|
+
const edgeType = selectEdgeType(child.rect.x, child.rect.y, parent.rect.x, parent.rect.y);
|
|
356
|
+
const path = buildEdgePathBetweenRectangles(new PathBuilder(), edgeType, child.rect.x, child.rect.y, parent.rect.x, parent.rect.y, child.rect.width, child.rect.height, parent.rect.width, parent.rect.height, 4).render();
|
|
357
|
+
edges.push({
|
|
358
|
+
id: i,
|
|
359
|
+
childOperator: child.id,
|
|
360
|
+
parentOperator: parent.id,
|
|
361
|
+
slot: edge.slot(),
|
|
362
|
+
outputCardinalityEstimated: Number.isNaN(child.estimatedRows) ? null : child.estimatedRows,
|
|
363
|
+
path
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
const crossEdges = [];
|
|
367
|
+
const tmpCrossEdge = new dashql.buffers.profile.ProfileOperatorCrossEdge();
|
|
368
|
+
for (let i = 0; i < vm.operatorCrossEdgesLength(); ++i) {
|
|
369
|
+
const edge = vm.operatorCrossEdges(i, tmpCrossEdge);
|
|
370
|
+
const source = operators[edge.source()];
|
|
371
|
+
const target = operators[edge.target()];
|
|
372
|
+
if (source == null || target == null) continue;
|
|
373
|
+
source.ports |= 1;
|
|
374
|
+
target.ports |= 2;
|
|
375
|
+
const properties = readAttributeRange(vm, edge.attributesBegin(), edge.attributeCount());
|
|
376
|
+
crossEdges.push({
|
|
377
|
+
id: i,
|
|
378
|
+
sourceOperator: source.id,
|
|
379
|
+
targetOperator: target.id,
|
|
380
|
+
kind: typeof properties.kind === "string" ? properties.kind : "reference",
|
|
381
|
+
properties,
|
|
382
|
+
path: buildCrossEdgePath(source.rect, target.rect, void 0, void 0, leftToRight)
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
const tmpFragment = new dashql.buffers.profile.ProfileFragment();
|
|
386
|
+
const fragments = [];
|
|
387
|
+
for (let i = 0; i < vm.fragmentsLength(); ++i) {
|
|
388
|
+
const fragment = vm.fragments(i, tmpFragment);
|
|
389
|
+
if (fragment.hidden() !== 0) continue;
|
|
390
|
+
const operatorIds = readIndexRange((j) => vm.fragmentOperators(j), fragment.operatorsBegin(), fragment.operatorCount());
|
|
391
|
+
fragments.push({
|
|
392
|
+
id: i,
|
|
393
|
+
operatorIds,
|
|
394
|
+
path: buildFragmentPath(operatorIds, operators, edges, FRAGMENT_PADDING, void 0, leftToRight)
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
const pipelines = [];
|
|
398
|
+
const tmpPipeline = new dashql.buffers.profile.ProfilePipeline();
|
|
399
|
+
const tmpSlot = new dashql.buffers.profile.ProfileSlot();
|
|
400
|
+
for (let i = 0; i < vm.pipelinesLength(); ++i) {
|
|
401
|
+
const pipeline = vm.pipelines(i, tmpPipeline);
|
|
402
|
+
const operatorIds = readIndexRange((j) => vm.slots(j, tmpSlot)?.operator() ?? null, pipeline.slotsBegin(), pipeline.slotCount());
|
|
403
|
+
pipelines.push({
|
|
404
|
+
id: i,
|
|
405
|
+
operatorIds,
|
|
406
|
+
path: buildPipelinePath(operatorIds, operators)
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
const bounds = vm.layoutRect();
|
|
410
|
+
return {
|
|
411
|
+
width: bounds?.width() ?? 0,
|
|
412
|
+
height: bounds?.height() ?? 0,
|
|
413
|
+
leftToRight,
|
|
414
|
+
layoutConfig,
|
|
415
|
+
operators,
|
|
416
|
+
edges,
|
|
417
|
+
crossEdges,
|
|
418
|
+
fragments,
|
|
419
|
+
pipelines
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
export { PROFILE_OPERATOR_PORT_INPUT, PROFILE_OPERATOR_PORT_OUTPUT, buildCrossEdgePath, buildFragmentPath, buildPipelinePath, estimateRelativeDifference, materializeProfileScene, truncateProfileLabel };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as dashql from '@akohn/dashql';
|
|
3
|
+
import { createProfileLayoutConfig } from '@akohn/dashql/platform/query/profile_layout_config';
|
|
4
|
+
import { ProfileExecutionState, type ProfileEntityState } from '@akohn/dashql/platform/query/profile_execution_state';
|
|
5
|
+
import { materializeProfileScene, ProfileSceneOperator } from './profile_scene.js';
|
|
6
|
+
export { materializeProfileScene, PROFILE_OPERATOR_PORT_INPUT, PROFILE_OPERATOR_PORT_OUTPUT, type ProfileScene, type ProfileSceneOperator, } from './profile_scene.js';
|
|
7
|
+
export { computeProfileFitTransform } from './profile_fit.js';
|
|
8
|
+
export { createProfileLayoutConfig };
|
|
9
|
+
export declare function formatFragmentMetrics(state: ProfileEntityState | null | undefined): {
|
|
10
|
+
text: string;
|
|
11
|
+
description: string;
|
|
12
|
+
} | null;
|
|
13
|
+
export interface QueryProfileViewProps {
|
|
14
|
+
plan: dashql.FlatBufferPtr<dashql.buffers.profile.QueryProfile>;
|
|
15
|
+
execution?: ProfileExecutionState;
|
|
16
|
+
showProgress?: boolean;
|
|
17
|
+
autoFocus?: boolean;
|
|
18
|
+
fill?: boolean;
|
|
19
|
+
onRotate?: () => void;
|
|
20
|
+
dependencies?: QueryProfileViewDependencies;
|
|
21
|
+
}
|
|
22
|
+
export interface QueryProfileViewDependencies {
|
|
23
|
+
materializeProfileScene: typeof materializeProfileScene;
|
|
24
|
+
}
|
|
25
|
+
export type ProfileEdgeColorScheme = (value: number) => string;
|
|
26
|
+
export declare const PROFILE_EDGE_COLOR_SCHEME_RD_BU: ProfileEdgeColorScheme;
|
|
27
|
+
export declare const PROFILE_EDGE_COLOR_SCHEME_RD_PU: ProfileEdgeColorScheme;
|
|
28
|
+
export declare const PROFILE_COST_COLOR_SCHEME_OR_RD: ProfileEdgeColorScheme;
|
|
29
|
+
export declare function formatEstimateSymbol(difference: number, absoluteDifference?: number): string;
|
|
30
|
+
export declare function formatCpuShare(share: number): string;
|
|
31
|
+
export declare function formatShortBytes(bytes: number): string;
|
|
32
|
+
export declare function placeOperatorAnnotation(operator: Pick<ProfileSceneOperator, 'rect'>, input: Pick<dashql.buffers.profile.ProfileLayoutConfigT, 'nodePaddingLeft'>): {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
};
|
|
36
|
+
export declare function QueryProfileView({ plan, execution, showProgress, autoFocus, fill, onRotate, dependencies }: QueryProfileViewProps): React.JSX.Element;
|