@@ -11,88 +11,69 @@ https://github.com/user-attachments/assets/74497e35-a85b-4051-bee0-99a3c1ed67d0
11
11
Built with ❤️ using FastAPI.
12
12
13
13
14
- ## Clone Repository ##
14
+ ## 1. Clone Repository ##
15
15
``` bash
16
16
git clone https://github.com/oracle-quickstart/db-endpoint-latency-testing-ammeter.git && cd db-endpoint-latency-testing-ammeter/
17
17
```
18
18
19
- ## Quick Build with One-Command ##
19
+ ## 2. Set APP_ADMIN_PASS environment variable ##
20
20
``` bash
21
- bash build.sh
22
- ```
23
-
24
- ## Alternate : Step-by-Step Manual Build ##
25
-
26
- ### 1. Create a Python Virtual Environment
27
-
28
- ``` bash
29
- python3 -m venv .venv
21
+ export APP_ADMIN_PASS=' abcd1234'
30
22
```
31
23
32
- #### Activate on Unix/macOS:
24
+ ## 3. Quick Build with One-Command ##
33
25
``` bash
34
- source .venv/bin/activate
35
- ```
36
-
37
- #### Activate on Windows:
38
- ``` bash
39
- .venv\S cripts\a ctivate
40
- ```
41
-
42
- ### 2. Install requirements
43
- ``` bash
44
- pip3 install -r requirements.txt
26
+ bash build.sh
45
27
```
46
28
47
- ### 3 . Launch the Web App
29
+ ## 4 . Launch the Web App; Only required when you restart the App ##
48
30
``` bash
49
31
uvicorn app.main:app --host 0.0.0.0 --port 8000
50
32
```
51
- ### 4 . Open your browser at:
33
+ ## 5 . Open the DB Latency app in our browser ##
52
34
```
53
- http ://localhost:8000
35
+ https ://localhost:8000
54
36
```
55
- - Log in: ` admin ` / ` change_this ` (update password in ` app/main.py ` for production ).
37
+ - Log in: ` admin ` / ` abcd1234 ` (update with your password by setting ` APP_ADMIN_PASS ` environment variable ).
56
38
- Fill out the form and run latency tests in real time with live chart and table views.
57
39
- For any errors (connection, authentication) you'll see detailed front-end feedback.
58
40
59
41
<img width =" 655 " alt =" Screenshot 2025-07-04 at 2 49 25 AM " src =" https://github.com/user-attachments/assets/c15b53dc-e138-4448-9777-e980db4354f0 " />
60
42
61
43
62
- ### 5 . Default SQL : API Usage via Curl/CLI MySQL Example
44
+ ## 6 . Default SQL : API Usage via Curl/CLI MySQL Example ##
63
45
``` bash
64
- curl -u admin:change_this -X POST http://localhost:8000/api/test-latency \
46
+ curl -u admin:abcd1234 -X POST https://localhost:8000/api/test-latency \
47
+ -k \
65
48
-d dbtype=mysql \
66
49
-d host=localhost \
67
50
-d port=3390 \
68
- -d username=testuser \
69
- -d password=" YourPassword1 ##" \
70
- -d database=testdb \
51
+ -d username=snare \
52
+ -d password=" abcdABCD1234 ##" \
53
+ -d database=snarepoc \
71
54
-d interval=1 \
72
55
-d period=10 \
73
56
| jq .
74
57
```
75
58
76
59
77
- https://github.com/user-attachments/assets/61a85844-6464-4630-86ad-5a34e11adecd
78
-
79
-
80
60
81
- ### 6. Custom User SQL : API Usage via Curl/CLI MySQL Example
61
+ ## 6. Custom User SQL : API Usage via Curl/CLI MySQL Example ##
82
62
83
63
To test with a custom SQL query from the command line, simply add a -d custom_sql="YOUR SQL HERE" parameter to your curl command, like this:
84
64
85
65
``` bash
86
- curl -u admin:change_this -X POST http://localhost:8000/api/test-latency \
66
+ curl -u admin:abcd1234 -X POST https://localhost:8000/api/test-latency \
67
+ -k \
87
68
-d dbtype=mysql \
88
69
-d host=localhost \
89
70
-d port=3390 \
90
- -d username=testuser \
91
- -d password=" YourPassword1 ##" \
92
- -d database=testdb \
71
+ -d username=snare \
72
+ -d password=" abcdABCD1234 ##" \
73
+ -d database=snarepoc \
93
74
-d interval=1 \
94
75
-d period=10 \
95
- -d custom_sql=" SELECT * FROM mytable WHERE status='ACTIVE' LIMIT 10 " \
76
+ -d custom_sql=" select count(*) from WIN2019SNAREDC_SNARE_IA; " \
96
77
| jq .
97
78
```
98
79
0 commit comments