From 649ebf51db88bd97ecf0129b963f593b0c614310 Mon Sep 17 00:00:00 2001 From: Luke <39926192+LukeWasTakenn@users.noreply.github.com> Date: Fri, 31 Mar 2023 19:32:07 +0200 Subject: [PATCH] update oxmysql ui docs to better reflect it's existence (#112) --- docs/oxmysql/Getting Started/index.md | 10 ++---- docs/oxmysql/Getting Started/ui.md | 52 +++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 docs/oxmysql/Getting Started/ui.md diff --git a/docs/oxmysql/Getting Started/index.md b/docs/oxmysql/Getting Started/index.md index 6af53e41..3f723afa 100644 --- a/docs/oxmysql/Getting Started/index.md +++ b/docs/oxmysql/Getting Started/index.md @@ -68,15 +68,11 @@ oxmysql_debug remove ox_core oxmysql_debug add ox_core ``` -### Using the UI +### Debug UI -Before using the UI first you have to make sure you have the `mysql_ui` convar set to true: +Debug UI is used to see your total query number, speeds, per resource queries and their speeds, etc... -```yaml -set mysql_ui true -``` - -Also make sure that you have `command` ace permission access, then you should be able to use the `mysql` command in game to open up the UI and see your query data. +You can read more about using the debug UI on the [Using the Debug UI](/docs/oxmysql/Getting%20Started/ui) page ## Compatibility diff --git a/docs/oxmysql/Getting Started/ui.md b/docs/oxmysql/Getting Started/ui.md new file mode 100644 index 00000000..e4cebf3d --- /dev/null +++ b/docs/oxmysql/Getting Started/ui.md @@ -0,0 +1,52 @@ +--- +title: Using the Debug UI +--- + +Debug UI can show you useful information about your queries such as the total query time, count and total number of slow queries. +You can also see which resources take up the most query time, the number of queries they ran and how many were slow. + + +## Requirements + +Before using the UI first you have to make sure you have the `mysql_ui` convar set to true: + +```yaml +set mysql_ui true +``` + +Also make sure that you have `command` ace permission access, then you should be able to use the `mysql` command in game to open up the UI and see your query data. + + +:::tip + +You *do not* need to have the `mysql_debug` convar set to `true` in order to use the debug ui. +::: + +## Main page + +The main page shows you the resources that ran queries where you can filter them through a search bar, your general data +along side a pie chart which shows what resources took the most query time. + +![oxmysql_ui_main](https://i.imgur.com/iQqWELJ.png) + + + +## Resource page + +The resource page shows you all the queries and their execution time inside a table that the resource previously ran, +alongside the total amount of the queries, execution time and slow queries for the selected resource. + +Columns can be sorted by ascending and descending order. + +Hovering over a query will display the full query inside a tooltip. + + +![oxmysql_ui_queries](https://i.imgur.com/gZpJoIg.png) + +:::tip + +Queries that exceed the value set in the `mysql_slow_query_warning` convar (defualt is 150) are going to show up as orange +and will be added to the slow queries count. +::: + +*Note: For demonstation purposes the `mysql_slow_query_warning` convar was set to 5 here.*