Skip to content
Merged
Changes from 1 commit
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
16 changes: 14 additions & 2 deletions project/ui/qprof-ui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@
" button_other_info.disabled = True\n",
" table_1.clear_output(wait=True)\n",
" table_2.clear_output(wait=True)\n",
" table_3.clear_output(wait=True)\n",
" try:\n",
" transaction_statement_list = qprof.transactions\n",
" logging.info(f'[Query Profile Tree Page] The list of transaction and statement ids are: {transaction_statement_list}')\n",
Expand All @@ -441,25 +442,36 @@
" FROM dc_optimizer_events\n",
" WHERE {where_clause};\n",
" \"\"\"\n",
" query_3 = f\"\"\"\n",
" SELECT *\n",
" FROM dc_file_reads\n",
" WHERE {where_clause};\n",
" \"\"\"\n",
" logging.info(f'[Query Profile Tree Page] Trying to get the DC SLOW EVENTS table')\n",
" res_1 = vp.vDataFrame(f\"\"\"{query}\"\"\")\n",
" res_2 = vp.vDataFrame(f\"\"\"{query_2}\"\"\")\n",
" res_3 = vp.vDataFrame(f\"\"\"{query_3}\"\"\")\n",
" with table_1:\n",
" res_1.idisplay()\n",
" with table_2:\n",
" res_2.idisplay()\n",
" with table_3:\n",
" res_3.idisplay()\n",
" except Exception as e:\n",
" with table_1:\n",
" display(widgets.HTML(f\"<p style='color:red'>The following error occured: </p> <p> {e}</p>\"))\n",
" with table_2:\n",
" display(widgets.HTML(f\"<p style='color:red'>The following error occured: </p> <p> {e}</p>\"))\n",
" with table_3:\n",
" display(widgets.HTML(f\"<p style='color:red'>The following error occured: </p> <p> {e}</p>\"))\n",
" button_other_info.disabled = False\n",
" \n",
"table_1 = widgets.Output()\n",
"table_2 = widgets.Output()\n",
"table_3 = widgets.Output()\n",
"tables = widgets.Tab()\n",
"tables.children = [table_1, table_2]\n",
"tables.titles = [\"Slow Events\", \"Optimizer Events\"]\n",
"tables.children = [table_1, table_2, table_3]\n",
"tables.titles = [\"Slow Events\", \"Optimizer Events\", \"File Reads\"]\n",
"other_info = widgets.VBox([button_other_info, tables])\n",
"\n",
"button_other_info.on_click(on_button_clicked_other_info)\n",
Expand Down