Skip to content

Commit e9b50c8

Browse files
Merge pull request #50 from shadab-mohammad-oracle/patch-10
Update README.md
2 parents 864ad12 + d6f52af commit e9b50c8

File tree

1 file changed

+112
-75
lines changed

1 file changed

+112
-75
lines changed

README.md

Lines changed: 112 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,74 @@
1-
# DELTA - FastAPI based WebApp to Test Database Latency (NEW, 2025)
1+
# DELTA - Database Latency Checker Tool (NEW, 2025)
22

3-
This project is a secure, lightweight SaaS-like database latency testing tool with a Mobile GUI, along with REST API.
3+
This project is a next-generation database endpoint latency benchmarking tool, purpose-built for modern hybrid cloud and distributed application architecture. Its unique value comes from its ability to precisely measure, visualize, and diagnose both network round-trip latency and SQL execution time for a wide range of databases—including Oracle (on-prem and Autonomous/ADB), PostgreSQL, MySQL, and even HTTP/HTTPS endpoints.
44

5-
https://github.com/user-attachments/assets/74497e35-a85b-4051-bee0-99a3c1ed67d0
5+
By running YOUR own query, this tool captures every millisecond: DNS, handshake, connection pool, DB engine, result marshaling—just as your app user sees it. This is true end-to-end, *application-perceived* latency and not just network latency.
6+
7+
8+
__Key Features:__
9+
10+
- __Granular Latency Breakdown:__ For every test, the tool separately measures the network connect time and the server-side SQL execution time. This allows you to see whether delays come from raw network/infrastructure, from database query planning/execution, or both.
11+
- __End-to-End and Per-Operation Metrics:__ Outputs both total and component latencies for each query iteration, viewable in tables and visualized in real-time charts.
12+
- __Live, Interactive UI:__ Includes a mobile-friendly GUI for interactive testing, as well as a full REST API for automation and integration with CI/CD or monitoring workflows.
13+
- __Cloud & Hybrid-Ready:__ Designed for real-world topologies, it works with databases anywhere—public cloud (AWS, OCI, GCP, Azure), private datacenters, or in hybrid scenarios.
14+
- __Easy Secure Remote Testing:__ Supports SSH tunnels so you can safely benchmark against remote cloud VMs or databases not directly exposed to the public internet.
15+
- __Flexible Connection Patterns:__ Accepts detailed connection parameters or industry-standard DSN strings, supporting advanced Oracle topologies and features like TCPS (TLS) secure connections and failover.
16+
- __Custom SQL Query Support:__ Test both trivial connectivity and the performance/latency of real, business-relevant workload queries.
17+
- __Cross-Database Comparison:__ Enables performance comparisons across database types and clouds, supporting architectural and vendor selection.
18+
- __Open, Extensible, and Developer-Friendly:__ FastAPI/REST backend, Python client code for scripting, and a well-documented interface for extension to additional DB engines or metrics.
19+
20+
__How It Helps:__
21+
22+
This tool equips architects, SREs, DBAs, and developers to:
23+
24+
- Quantify and visualize the real impact of hybrid or multi-cloud designs, by showing where latency is introduced in split-architecture applications.
25+
- Simulate user experience for apps where the app and database reside in different data centers, clouds, or geographies.
26+
- Optimize architecture design and deployment decisions by differentiating between network-related and DB-query-related bottlenecks.
27+
- Validate and baseline connectivity, driver, TLS, and authentication configurations for complex, regulated, or highly available environments.
28+
- Inform SLAs and help justify needed investments in network or database tuning.
29+
30+
31+
## DELTA - Database Endpoint Latency Testing Ammeter
32+
![image](https://github.com/user-attachments/assets/2fbb6927-0f48-4a85-9ae6-74efb63e6ef0)
33+
34+
35+
https://github.com/user-attachments/assets/1fdf1e00-21bc-4be2-9815-a253a64df796
636

737
Built with ❤️ using FastAPI.
838

39+
## 🔌 Databases Supported
40+
41+
### 📌 Oracle DB
42+
- Amazon RDS for Oracle
43+
- OCI Autonomous Database (without Wallet TLS)
44+
- OCI Base Database Service
45+
- OCI Exadata Cloud Service - Dedicated
46+
- OCI Exascale Service- Dedicated
47+
- Oracle Database@Azure
48+
- Oracle Database@GCP
49+
- Oracle Database@AWS
50+
- Oracle Database installed on OnPremises or on any other cloud provider in a VM
51+
52+
### 📌 PostgreSQL
53+
- Amazon RDS Postgres
54+
- Amazon RDS Aurora Postgres
55+
- OCI PostgreSQL
56+
- PostgreSQL installed on OnPremises or on any other cloud provider in a VM
57+
58+
### 📌 MySQL
59+
- Amazon RDS MySQL
60+
- Amazon RDS Aurora MySQL
61+
- Heatwave@AWS
62+
- OCI MySQL Heatwave
63+
- MySQL installed on OnPremises or on any other cloud provider in a VM
64+
65+
### 📌 URL - HTTPS | HTTP
66+
- Check Public or Private URLs for latency
67+
68+
## Pre-Requisites ##
69+
70+
`Python >=3.9`
71+
972
## 1. Clone Repository ##
1073
```bash
1174
git clone https://github.com/oracle-quickstart/db-endpoint-latency-testing-ammeter.git && cd db-endpoint-latency-testing-ammeter/
@@ -18,11 +81,7 @@ export APP_ADMIN_PASS='abcd1234'
1881
```bash
1982
bash build.sh
2083
```
21-
## 4. Launch the Web App; Only required when you restart the App ##
22-
```bash
23-
uvicorn app.main:app --host 0.0.0.0 --port 8000
24-
```
25-
## 5. Open the DB Latency app in our browser ##
84+
## 4. Open the DB Latency app in our browser ##
2685
```
2786
https://localhost:8000
2887
```
@@ -33,7 +92,7 @@ https://localhost:8000
3392
<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" />
3493

3594

36-
## 6. Default SQL : API Usage via Curl/CLI MySQL Example ##
95+
## 5. Default SQL : API Usage via Curl/CLI MySQL Example ##
3796
```bash
3897
curl -u admin:abcd1234 -X POST https://localhost:8000/api/test-latency \
3998
-k \
@@ -47,7 +106,7 @@ curl -u admin:abcd1234 -X POST https://localhost:8000/api/test-latency \
47106
-d period=10 \
48107
| jq .
49108
```
50-
## 7. Custom User SQL : API Usage via Curl/CLI MySQL Example ##
109+
## 6. Custom User SQL : API Usage via Curl/CLI MySQL Example ##
51110

52111
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:
53112

@@ -80,32 +139,8 @@ curl -u admin:abcd1234 -X POST https://localhost:8000/api/test-latency \
80139

81140
- Custom queries that are slower will always yield fewer completed test cycles in a fixed period. Hence use Custom queries carefully.
82141

83-
## 🔌 Databases Supported
84-
85-
### 📌 Oracle DB
86-
- Amazon RDS Oracle
87-
- OCI Autonomous Database
88-
- OCI VMDB
89-
- OCI Exadata Cloud Service
90-
- Oracle Database On-Premise
91-
92-
### 📌 PostgreSQL
93-
- Amazon RDS Postgres
94-
- Amazon RDS Aurora Postgres
95-
- Postgres On-premise
96-
97-
### 📌 MySQL
98-
- Amazon RDS MySQL
99-
- Amazon RDS Aurora MySQL
100-
- OCI MySQL Database Service
101-
- OCI MySQL Heatwave
102-
- MySQL On-Premise
103-
104-
### 📌 URL - HTTPS | HTTP
105-
- Check Public or Private URLs for latency
106142

107-
# Bonus
108-
## Stop and Start Shell Scripts (Linux and macOS) ##
143+
## 7. Stop and Start Shell Scripts (Linux and macOS) ##
109144

110145
- `start.sh`: Activates the Python virtual environment and launches uvicorn with HTTPS, using the generated self-signed certificate.
111146
- `stop.sh`: Finds and terminates any uvicorn process running your app cleanly and safely.
@@ -118,46 +153,6 @@ Start the Delta App
118153
```bash
119154
bash start.sh
120155
```
121-
## Windows Build File (Beta: Not tested)
122-
123-
Yes, you must first download (clone or extract) the GitHub repo to your Windows machine.
124-
125-
__Instructions:__
126-
127-
1. __Download the Repository__
128-
129-
- If you have Git installed:
130-
131-
- Open Command Prompt or PowerShell.
132-
- Run:
133-
134-
```javascript
135-
git clone https://github.com/oracle-quickstart/db-endpoint-latency-testing-ammeter.git
136-
cd db-endpoint-latency-testing-ammeter
137-
```
138-
- Or download the zip from the GitHub releases or code page, and extract all files to a folder.
139-
140-
2. __Run the Build Script__
141-
142-
- In Command Prompt (NOT PowerShell), navigate to the project folder.
143-
- Run:
144-
145-
```javascript
146-
build_windows.bat
147-
```
148-
- This script will:
149-
150-
- Create a virtual environment
151-
- Install dependencies
152-
- Generate a self-signed SSL certificate
153-
- Launch the app on [](https://localhost:8000)<https://localhost:8000>
154-
155-
__Requirements on Windows:__
156-
157-
- Python 3 (with pip)
158-
- openssl.exe in PATH (commonly included with Git Bash or available at [slproweb.com](https://slproweb.com/products/Win32OpenSSL.html))
159-
160-
You do not need to manually install anything except Python and openssl; the script handles the rest.
161156

162157
---
163158

@@ -296,6 +291,48 @@ curl -u admin:abcd1234 -X POST https://localhost:8000/api/test-latency \
296291

297292
---
298293

294+
# Bonus
295+
## Windows Build File (Beta: Not tested)
296+
297+
Yes, you must first download (clone or extract) the GitHub repo to your Windows machine.
298+
299+
__Instructions:__
300+
301+
1. __Download the Repository__
302+
303+
- If you have Git installed:
304+
305+
- Open Command Prompt or PowerShell.
306+
- Run:
307+
308+
```javascript
309+
git clone https://github.com/oracle-quickstart/db-endpoint-latency-testing-ammeter.git
310+
cd db-endpoint-latency-testing-ammeter
311+
```
312+
- Or download the zip from the GitHub releases or code page, and extract all files to a folder.
313+
314+
2. __Run the Build Script__
315+
316+
- In Command Prompt (NOT PowerShell), navigate to the project folder.
317+
- Run:
318+
319+
```javascript
320+
build_windows.bat
321+
```
322+
- This script will:
323+
324+
- Create a virtual environment
325+
- Install dependencies
326+
- Generate a self-signed SSL certificate
327+
- Launch the app on [](https://localhost:8000)<https://localhost:8000>
328+
329+
__Requirements on Windows:__
330+
331+
- Python 3 (with pip)
332+
- openssl.exe in PATH (commonly included with Git Bash or available at [slproweb.com](https://slproweb.com/products/Win32OpenSSL.html))
333+
334+
You do not need to manually install anything except Python and openssl; the script handles the rest.
335+
299336
## Contributing
300337

301338
This project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)

0 commit comments

Comments
 (0)