Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QueryProfilerTree page - BugFix #294

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions project/ui/qprof-ui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -466,16 +466,9 @@
"\n",
"engine_tab_summary_1 = widgets.Output()\n",
"\n",
"tags = sorted(qprof.get_qexecution_report(return_useful_cols=True))\n",
"\n",
"\n",
"selected_checkboxes = [\"exec_time_us\", \"prod_rows\", \"proc_rows\", \"clock_time_us\"]\n",
"# Create checkboxes\n",
"checkboxes = [\n",
" widgets.Checkbox(value=(tag in selected_checkboxes), description=tag) \n",
" for tag in tags\n",
"]\n",
"\n",
"\n",
"# Function to update based on selections\n",
"def on_checkbox_change(change):\n",
Expand All @@ -498,10 +491,6 @@
" localplan_id=summary_localplan_id_dropdown.value, \n",
" operator_name=summary_operator_name_dropdown.value)\n",
"\n",
"# Attach the observer to each checkbox\n",
"for cb in checkboxes:\n",
" cb.observe(on_checkbox_change, names='value')\n",
"\n",
"# Selecting the granularity of the summary table\n",
"engine_table_granularity_switch = widgets.RadioButtons(\n",
" options=['Across paths', 'Across nodes'],\n",
Expand Down Expand Up @@ -794,12 +783,14 @@
" engine_table_detailed_widget = widgets.HTML(f\"<p style='color:red'>The following error occured: </p> <p> {e}</p>\") \n",
"\n",
"engine_table_detailed_top = widgets.HBox([engine_table_summary_controls, engine_table_detailed_selection_title_switch])\n",
"global engine_table_detailed\n",
"engine_table_detailed = widgets.VBox([\n",
" engine_table_detailed_top,\n",
" widgets.HBox([engine_table_detailed_widget ,widgets.VBox(checkboxes)]),\n",
" engine_table_detailed_widget,\n",
" # checkboxes, engine_table_detailed_widget\n",
"])\n",
"\n",
"\n",
"engine_table_tab = widgets.Tab()\n",
"engine_table_tab.children = [engine_tab_summary_all, engine_table_detailed]\n",
"engine_table_tab.titles = [\"Summary\", \"Detailed\"]\n",
Expand Down Expand Up @@ -859,7 +850,6 @@
" summary_operator_name_dropdown.options = ['All'] + sorted(summary_vdf[\"operator_name\"].distinct())\n",
" summary_baseplan_id_dropdown.options = ['All'] + sorted(vdf_across_nodes[\"baseplan_id\"].distinct())\n",
"\n",
"\n",
" # Initial table updates\n",
" display_vdf_across_paths()\n",
" detailed_update_table()\n",
Expand All @@ -876,6 +866,11 @@
" for cb in checkboxes:\n",
" cb.observe(on_checkbox_change, names='value')\n",
"\n",
" engine_table_detailed.children = [\n",
" engine_table_detailed_top,\n",
" widgets.HBox([engine_table_detailed_widget, widgets.VBox(checkboxes)]),\n",
" ]\n",
"\n",
" except Exception as e:\n",
" with engine_tab_summary_1:\n",
" engine_tab_summary_1.clear_output(wait=True)\n",
Expand Down
Loading