Skip to content

Commit 3d40665

Browse files
Merge pull request #51 from shadab-mohammad-oracle/patch-10
Update README.md
2 parents e9b50c8 + 00c7ac7 commit 3d40665

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,48 @@ This project is a next-generation database endpoint latency benchmarking tool, p
44

55
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.
66

7+
__How Latency Checks Work :__
8+
9+
Latency is measured as the total time taken for each test cycle—which includes the connection, SQL execution, and result fetching in a single measurement.
10+
11+
__Process per iteration (databases):__
12+
13+
1. The timer starts just before the database driver begins a query cycle. This includes any necessary database connection and the execution of the test SQL (typically `SELECT 1` or a user-provided query).
14+
2. The timer stops immediately after the query results are fetched (i.e., after `cursor.fetchall()` returns).
15+
3. The elapsed time is recorded as the latency for that operation, in milliseconds.
16+
4. This measurement is appended to a list, so statistics (average, mean, p99, p90, stddev) can be calculated on all trials.
17+
18+
This entire measured duration includes:
19+
20+
- For engines like Oracle/PostgreSQL/MySQL/SQL Server:
21+
22+
- TCP network round-trip time (for connect & query)
23+
- Any network stack or driver overhead
24+
- Server-side session creation (if not pooled)
25+
- Query parsing & planning
26+
- SQL execution on server
27+
- Fetching of any results (for basic `SELECT 1` it’s minimal)
28+
- Transmission of the results back to the client
29+
30+
The approach does not separate out the network portion vs. SQL execution: it is an end-to-end measurement for “open (if needed) + execute + fetch”.
31+
32+
__For URL Latency Checks:__
33+
34+
- The tool uses the Python `requests` library.
35+
36+
- The timer starts immediately before `requests.get(url)` and stops immediately after the HTTP(S) response has been received (after the body is completely read).
37+
38+
- The measured latency thus includes:
39+
40+
- DNS resolution (if needed)
41+
- TCP/TLS handshake
42+
- Network round-trip(s)
43+
- Server processing time for the request
44+
- Transmission of the full response body
45+
46+
For both DBs and URL cases, it is a “total user-experienced latency” as seen by a typical client, not a fine-grained split of connection and query phases.
47+
48+
749

850
__Key Features:__
951

@@ -288,6 +330,8 @@ curl -u admin:abcd1234 -X POST https://localhost:8000/api/test-latency \
288330
#### GUI
289331
<img width="458" alt="Screenshot 2025-07-05 at 11 03 00 PM" src="https://github.com/user-attachments/assets/d97ee854-b7ff-4ee6-af5f-7c1fe127a281" />
290332

333+
__Summary:__\
334+
The latency metric reported by this tool is the full end-to-end time required to execute the test operation—from just before the action is started to just after it completes—capturing the complete delay as experienced by a real client under typical network and server conditions.
291335

292336
---
293337

0 commit comments

Comments
 (0)