Skip to content

Commit 0b114a7

Browse files
Merge pull request #34 from shadab-mohammad-oracle/patch-5
Update README.md
2 parents 91daca0 + 34d5317 commit 0b114a7

File tree

1 file changed

+22
-41
lines changed

1 file changed

+22
-41
lines changed

README.md

Lines changed: 22 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,88 +11,69 @@ https://github.com/user-attachments/assets/74497e35-a85b-4051-bee0-99a3c1ed67d0
1111
Built with ❤️ using FastAPI.
1212

1313

14-
## Clone Repository ##
14+
## 1. Clone Repository ##
1515
```bash
1616
git clone https://github.com/oracle-quickstart/db-endpoint-latency-testing-ammeter.git && cd db-endpoint-latency-testing-ammeter/
1717
```
1818

19-
## Quick Build with One-Command ##
19+
## 2. Set APP_ADMIN_PASS environment variable ##
2020
```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'
3022
```
3123

32-
#### Activate on Unix/macOS:
24+
## 3. Quick Build with One-Command ##
3325
```bash
34-
source .venv/bin/activate
35-
```
36-
37-
#### Activate on Windows:
38-
```bash
39-
.venv\Scripts\activate
40-
```
41-
42-
### 2. Install requirements
43-
```bash
44-
pip3 install -r requirements.txt
26+
bash build.sh
4527
```
4628

47-
### 3. Launch the Web App
29+
## 4. Launch the Web App; Only required when you restart the App ##
4830
```bash
4931
uvicorn app.main:app --host 0.0.0.0 --port 8000
5032
```
51-
### 4. Open your browser at:
33+
## 5. Open the DB Latency app in our browser ##
5234
```
53-
http://localhost:8000
35+
https://localhost:8000
5436
```
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).
5638
- Fill out the form and run latency tests in real time with live chart and table views.
5739
- For any errors (connection, authentication) you'll see detailed front-end feedback.
5840

5941
<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" />
6042

6143

62-
### 5. Default SQL : API Usage via Curl/CLI MySQL Example
44+
## 6. Default SQL : API Usage via Curl/CLI MySQL Example ##
6345
```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 \
6548
-d dbtype=mysql \
6649
-d host=localhost \
6750
-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 \
7154
-d interval=1 \
7255
-d period=10 \
7356
| jq .
7457
```
7558

7659

77-
https://github.com/user-attachments/assets/61a85844-6464-4630-86ad-5a34e11adecd
78-
79-
8060

81-
### 6. Custom User SQL : API Usage via Curl/CLI MySQL Example
61+
## 6. Custom User SQL : API Usage via Curl/CLI MySQL Example ##
8262

8363
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:
8464

8565
```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 \
8768
-d dbtype=mysql \
8869
-d host=localhost \
8970
-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 \
9374
-d interval=1 \
9475
-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;" \
9677
| jq .
9778
```
9879

0 commit comments

Comments
 (0)