Examples of configurations to make things easier.
This commit is contained in:
parent
1bc6306cf2
commit
c1792ef245
4 changed files with 79 additions and 8 deletions
16
readme.md
16
readme.md
|
|
@ -5,8 +5,8 @@ several queries and measure how long it takes for results to come back to your l
|
|||
|
||||
## How to use
|
||||
|
||||
1. First, you need to install the package in your Python installation or a virtual environment. If you have our Google
|
||||
Drive Shared Drive replicated locally, you can do it like this:
|
||||
1. First, you need to install the package in your Python installation or a virtual environment. If you have our Google
|
||||
Drive Shared Drive replicated locally, you can do it like this:
|
||||
|
||||
```commandline
|
||||
pip install "git+file:///g:\shared drives\data drive\90 useful\trino_query_performance_gauge@master"```
|
||||
|
|
@ -22,23 +22,23 @@ measure_query_performance --config my_config_file.json
|
|||
|
||||
## Composing a config file
|
||||
|
||||
You can take a look at the `example-config.json` in this repository.
|
||||
You can take a look at examples for different setups in `config_examples`. If you want to make a new config file, it
|
||||
will probably be easier for you to start from one of those templates.
|
||||
|
||||
A few notes:
|
||||
|
||||
- The valid engines are `"trino"` and `"mysql"`.
|
||||
- You can place as many queries as you would like in the `queries_to_measure` list.
|
||||
- I advice you to make the first query a silly, fast query such as `SELECT 1` to validate your connection and
|
||||
- I advice you to make the first query a silly, fast query such as `SELECT 1` to validate your connection and
|
||||
quickly confirm that everything is set up properly.
|
||||
|
||||
|
||||
|
||||
## A few more details
|
||||
|
||||
- Queries are run sequentially, as in the second query will only start after the first query is finished.
|
||||
- For this to work, your local machine must have access and permission to the connection you are targeting, so
|
||||
- For this to work, your local machine must have access and permission to the connection you are targeting, so
|
||||
remember to set up VPNs and other necessary configs properly.
|
||||
- A peculiarity: when using MySQL through an SSH tunnel, the port number used by the remote MySQL should be
|
||||
free in your local machine. That means that if the MySQL database is listening on port 3306, your local machine
|
||||
should have port 3306 free before running this.
|
||||
- Queries in JSON must be stored in a single line. A bit of a headache, I know. JSON limitations. You can use [this
|
||||
- Queries in JSON must be stored in a single line. A bit of a headache, I know. JSON limitations. You can use [this
|
||||
webpage](https://sqlformatter.org/) to easily jump between prettified and one-line formats for any query.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue