This project is a secure, lightweight SaaS-like database latency testing tool with a Mobile GUI, along with REST API.
DB.Latency.Checker.Demo.mov
Built with ❤️ using FastAPI.
git clone https://github.com/oracle-quickstart/db-endpoint-latency-testing-ammeter.git && cd db-endpoint-latency-testing-ammeter/
export APP_ADMIN_PASS='abcd1234'
bash build.sh
uvicorn app.main:app --host 0.0.0.0 --port 8000
https://localhost:8000
- Log in:
admin
/abcd1234
(update with your password which you set forAPP_ADMIN_PASS
environment variable). - Fill out the form and run latency tests in real time with live chart and table views.
- For any errors (connection, authentication) you'll see detailed front-end feedback.

curl -u admin:abcd1234 -X POST https://localhost:8000/api/test-latency \
-k \
-d dbtype=mysql \
-d host=localhost \
-d port=3390 \
-d username=snare \
-d password="abcdABCD1234##" \
-d database=snarepoc \
-d interval=1 \
-d period=10 \
| jq .
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:
curl -u admin:abcd1234 -X POST https://localhost:8000/api/test-latency \
-k \
-d dbtype=mysql \
-d host=localhost \
-d port=3390 \
-d username=snare \
-d password="abcdABCD1234##" \
-d database=snarepoc \
-d interval=1 \
-d period=10 \
-d custom_sql="select count(*) from WIN2019SNAREDC_SNARE_IA;" \
| jq .
-
If
custom_sql
is included (and not empty), that query is used for measuring latency (instead ofSELECT 1
). -
All other parameters stay the same as before.
-
You can enter multi-line SQL in the terminal by wrapping it in quotes, or you can pipe in a file with
-d custom_sql="$(cat myquery.sql)"
.
-
Custom queries that are slower will always yield fewer completed test cycles in a fixed period. For eg: If your custom query takes, for example, 0.3 seconds and your interval is 1 second, each full cycle is actually ~1.3s, so over a 10 second period you’ll only get about 7-8 cycles.
-
For
SELECT 1
, each loop is closer to 1s so you see 10 full cycles. -
This is expected behavior and the code is running safely/correctly.
-
Custom queries that are slower will always yield fewer completed test cycles in a fixed period. Hence use Custom queries carefully.
- Amazon RDS Oracle
- OCI Autonomous Database
- OCI VMDB
- OCI Exadata Cloud Service
- Oracle Database On-Premise
- Amazon RDS Postgres
- Amazon RDS Aurora Postgres
- Postgres On-premise
- Amazon RDS MySQL
- Amazon RDS Aurora MySQL
- OCI MySQL Database Service
- OCI MySQL Heatwave
- MySQL On-Premise
- Check Public or Private URLs for latency
This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide
Please consult the security guide for our responsible security vulnerability disclosure process
Copyright (c) 2025 Oracle and/or its affiliates.
Released under the Apache License Version 2.0, January 2004 http://www.apache.org/licenses/.