-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for SQL diagnostic functionality (#297)
* Added support for SQL diagnostic functionality. * Added support for SQL diagnostic functionality. * fix * fix * add doc * add doc * fix * update requirements * Added support for SQL diagnostic functionality * Added support for SQL diagnostic functionality * Added support for SQL diagnostic functionality * Added support for SQL diagnostic functionality * Added support for SQL diagnostic functionality * Added support for SQL diagnostic functionality * Optimize gather tasks file * Added support for SQL diagnostic functionality * Added support for SQL diagnostic functionality
- Loading branch information
Showing
66 changed files
with
3,872 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Test Full Scan Rule | ||
|
||
on: | ||
push: | ||
branches: "*" | ||
pull_request: | ||
branches: "*" | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch all history for proper version detection | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements3.txt | ||
- name: Run tests | ||
run: python -m unittest discover -s test/analyzer/sql -p 'test_*.py' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.idea/ | ||
.vscode/ | ||
venv/ | ||
*.pyc | ||
*site-packages/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
rm -rf ./gather_pack_* | ||
rm -rf ./analyze_pack_* | ||
rm -rf ./analyze_flt_result* | ||
rm -rf ./check_report | ||
rm -rf ./obdiag_gather_pack_* | ||
rm -rf ./obdiag_analyze_pack_* | ||
rm -rf ./obdiag_analyze_flt_result* | ||
rm -rf ./obdiag_check_report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## analyze sql | ||
|
||
```bash | ||
$ obdiag analyze sql [options] | ||
|
||
Options: | ||
--host=HOST tenant connection host | ||
--port=PORT tenant connection port | ||
--password=PASSWORD tenant connection user password | ||
--user=USER tenant connection user name | ||
--from=FROM specify the start of the time range. format: 'yyyy-mm- | ||
dd hh:mm:ss' | ||
--to=TO specify the end of the time range. format: 'yyyy-mm-dd | ||
hh:mm:ss' | ||
--since=SINCE Specify time range that from 'n' [d]ays, 'n' [h]ours | ||
or 'n' [m]inutes. before to now. format: <n> <m|h|d>. | ||
example: 1h. | ||
--level=LEVEL The alarm level, optional parameters [critical, warn, | ||
notice, ok] | ||
--output=OUTPUT The format of the output results, choices=[json, html] | ||
--limit=LIMIT The limit on the number of data rows returned by | ||
sql_audit for the tenant. | ||
--store_dir=STORE_DIR | ||
the dir to store result, current dir by default. | ||
--elapsed_time=ELAPSED_TIME | ||
The minimum threshold for filtering execution time, | ||
measured in microseconds. | ||
-c C obdiag custom config | ||
-h, --help Show help and exit. | ||
-v, --verbose Activate verbose output. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## analyze sql_review | ||
|
||
```bash | ||
$ obdiag analyze sql_review [options] | ||
|
||
Options: | ||
--host=HOST tenant connection host | ||
--port=PORT tenant connection port | ||
--password=PASSWORD tenant connection user password | ||
--user=USER tenant connection user name | ||
--files=FILES specify files | ||
--level=LEVEL The alarm level, optional parameters [critical, warn, | ||
notice, ok] | ||
--output=OUTPUT The format of the output results, choices=[json, html] | ||
--store_dir=STORE_DIR | ||
the dir to store result, current dir by default. | ||
-c C obdiag custom config | ||
-h, --help Show help and exit. | ||
-v, --verbose Activate verbose output. | ||
``` |
Oops, something went wrong.