diff --git a/project/ui/qprof-ui.ipynb b/project/ui/qprof-ui.ipynb index 0027b587..cc062d97 100644 --- a/project/ui/qprof-ui.ipynb +++ b/project/ui/qprof-ui.ipynb @@ -371,7 +371,14 @@ "outputs": [], "source": [ "display(HTML(html_code))\n", - "logging.info(f'[Query Profile Tree Page] Completed the script to automatically display the tree')" + "logging.info(f'[Query Profile Tree Page] Completed the script to automatically display the tree')\n", + "\n", + "def create_tooltip(text):\n", + " # Create an info icon using HTML\n", + " info_icon = widgets.HTML(\n", + " value=f''\n", + " )\n", + " return info_icon" ] }, { @@ -531,7 +538,15 @@ " disabled=False\n", ")\n", "granularity_level = 2\n", - "engine_table_granularity_switch_title = widgets.HTML(' Select granularity level:')\n", + "engine_table_granularity_switch_title = widgets.HBox([widgets.HTML(' Select granularity level:'), \n", + " create_tooltip(\"\"\"\n", + "The granularity level of the summary table. \n", + "Across paths: The summary table for each path. \n", + "Across nodes: The summary table for each node. All rows are summed and times are averaged\n", + "\"\"\"\n", + " )\n", + " ]\n", + ")\n", "def on_granularity_change(change):\n", " if change['type'] == 'change' and change['name'] == 'value':\n", " if change['new'] == 'Across nodes':\n", @@ -634,15 +649,19 @@ " def summary_on_path_id_dropdown_change(change):\n", " if not summary_node_name_dropdown.value == \"All\":\n", " vdf=summary_vdf_main[summary_vdf_main[\"node_name\"]==summary_node_name_dropdown.value]\n", + " summary_localplan_id_dropdown.options = ['All'] + sorted(vdf[\"localplan_id\"].distinct())\n", + " summary_operator_name_dropdown.options = ['All'] + sorted(vdf[\"operator_name\"].distinct())\n", " else:\n", " vdf = summary_vdf_main\n", " if change['type'] == 'change' and change['name'] == 'value':\n", " selected_key = change['new']\n", " if selected_key == 'All':\n", " summary_localplan_id_dropdown.options = ['All'] + sorted(vdf[\"localplan_id\"].distinct())\n", + " summary_operator_name_dropdown.options = ['All'] + sorted(vdf[\"operator_name\"].distinct())\n", " else: \n", " vdf = vdf[vdf[\"path_id\"]==selected_key]\n", " summary_localplan_id_dropdown.options = ['All'] + sorted(vdf[\"localplan_id\"].distinct())\n", + " summary_operator_name_dropdown.options = ['All'] + sorted(vdf[\"operator_name\"].distinct())\n", " summary_localplan_id_dropdown.value = 'All'\n", " if engine_table_granularity_switch.value == 'Across nodes':\n", " display_vdf_across_nodes(path_id = selected_key)\n", @@ -655,6 +674,7 @@ " def summary_on_localplan_id_dropdown_change(change):\n", " if not summary_node_name_dropdown.value == \"All\":\n", " vdf=summary_vdf_main[summary_vdf_main[\"node_name\"]==summary_node_name_dropdown.value]\n", + " summary_operator_name_dropdown.options = ['All'] + sorted(vdf[\"operator_name\"].distinct())\n", " else:\n", " vdf = summary_vdf_main\n", " if not summary_path_id_dropdown.value == \"All\":\n", @@ -682,7 +702,7 @@ " vdf = summary_vdf_main\n", " if not summary_path_id_dropdown.value == \"All\":\n", " vdf=vdf[vdf[\"path_id\"]==summary_path_id_dropdown.value]\n", - " if not summary_path_id_dropdown.value == \"All\":\n", + " if not summary_localplan_id_dropdown.value == \"All\":\n", " vdf=vdf[vdf[\"localplan_id\"]==summary_localplan_id_dropdown.value]\n", " if change['type'] == 'change' and change['name'] == 'value':\n", " selected_key = change['new']\n", @@ -691,7 +711,6 @@ " else:\n", " display_vdf_across_paths(path_id=summary_path_id_dropdown.value)\n", " detailed_update_table(node_name=summary_node_name_dropdown.value, path_id=summary_path_id_dropdown.value, localplan_id=summary_localplan_id_dropdown.value, operator_name=selected_key)\n", - " \n", " summary_operator_name_dropdown.observe(summary_on_operator_name_dropdown_change, names='value') \n", "\n", " engine_table_granularity_title_switch = widgets.VBox([engine_table_granularity_switch_title, engine_table_granularity_switch], layout=widgets.Layout(padding='0 0 0 10px'))\n", @@ -709,7 +728,14 @@ "\n", "\n", "# Tab for detailed Executio Engine Table\n", - "engine_table_detailed_selection_title = widgets.HTML(' Select detailed view:')\n", + "engine_table_detailed_selection_title = widgets.HBox([widgets.HTML(' Select detailed view:'), \n", + " create_tooltip(\"\"\"\n", + "Pivot Table: The detailed view of the query execution engine with selected metrics.\n", + "Raw Table: The raw table of the EXECUTION_ENGINE_PROFILES.\n", + "\"\"\"\n", + " )\n", + " ]\n", + ")\n", "engine_table_detailed_selection_switch = widgets.RadioButtons(\n", " options=['Pivot Table', 'Raw Table'],\n", " value='Pivot Table',\n", @@ -1616,7 +1642,7 @@ "\n", "\n", "
\n", - " Page version update date: 8/28/2024\n", + " Page version update date: 9/3/2024\n", "
\n", "\n", ""