Performance overview
A clear view of your API, one request at a time.
Latency distribution
Nearest-rank percentiles across requests in this window
Cache offload
Share of all requests served from the response cache
No requests in this window.
Server error rate: -Endpoint activity
Live traffic by normalized business operation
| Operation | Requests | RPS | p95 / ms | Errors | Hits |
|---|---|---|---|---|---|
| No data yet. Send a request in the playground below. | |||||
Automated API workflows
One run. Correct dependencies. Every request accounted for.
Ready. Review the plan before starting.
Full workflows create one user, one product and one shipped order per cycle. Data persists; stopping does not roll back completed writes. Expected 4xx tests increase the monitored error rate. This sequential scenario runner is not a load benchmark.
| Step | Request | HTTP / expected | Client ms | Cache | Result |
|---|---|---|---|---|---|
| Run a scenario to see its ordered results. | |||||
Inspect selected step
Select a result to inspect its request, response and checks.
API playground
Send real requests. Inspect responses and cache behavior.
Writes change your database. Repeated reads may activate adaptive caching when origin work is slow enough.
Choose an operation and send your first request.
Request history
This page session · latest 20| Request | Status | Client ms | Cache |
|---|---|---|---|
| Your playground requests will appear here. | |||
Adaptive cache
—Cache controls are available directly in this local demo.
Tuning telemetry
Lifetime read counters since server restart; writes are excluded
Performance insights
Origin regressions & recent policy decisions
Observed cache comparison
Per-route server latency · retained samples
Your first monitoring session
Learn the flow, understand the numbers, and test with confidence.
01 / Start with a real request
- Open API playground. Choose GET /api/products and click Send request.
- If the list is empty, choose POST /api/products, edit the example JSON, and send it. A 201 response means the product was created.
- Send GET /api/products again. The response inspector shows JSON, status, client duration and the cache result.
- Click Repeat GET x 6. Each request appears in history and monitoring. For a complete scripted session, use Automated API workflows: review the plan, then Run workflow. The full scenario creates records and chains their returned IDs automatically.
- Use resource ID 1 for detail routes only if that record exists. Create a user and product before creating an order.
POST and PATCH change actual data. Duplicate user emails return 409; choose a unique email for each new user.
02 / Understand adaptive caching
- MISS
- The response was loaded from the database. The request provides an origin timing sample.
- HIT
- A reusable response was served from memory, avoiding another database query.
- BYPASS
- Shared caching was skipped because it is off or the request has credentials. The playground sends anonymous requests so unrelated localhost cookies do not bypass caching.
Caching activates after at least four origin observations when average work is at least 2 ms, the key is reused, and samples contain no failures. TTL ranges from 2 to 30 seconds. A fast or empty database may correctly keep observing without caching. The active policy stays enabled down to 1.5 ms to avoid oscillation, and reuse evidence expires after 60 seconds.
Writes clear dependent cached data, while unrelated responses stay cached. Expiry provides fresh origin samples. Sales reports over a seeded dataset are useful for seeing the effect.
03 / Read the metrics
- Throughput / RPS
- Completed requests divided by the entire selected window. Six requests over 60 seconds means 0.10 RPS.
- p50 / p95 / p99
- 50%, 95%, or 99% of observed requests finish at or below this latency. p95 helps expose slower responses that an average hides.
- Error rate
- All 4xx and 5xx responses divided by total requests. Server errors count 5xx only. A deliberately invalid test increases the error rate.
- Cache offload
- Cache hits divided by all business requests, including writes and errors. This is not the hit rate among eligible GET requests.
- Client vs server time
- The playground measures the browser round trip. Monitoring measures server processing. These values are expected to differ.
04 / Control caching
No token or login is needed. Use the cache panel directly.
- Enable adaptive
- Let measured origin performance and request reuse drive caching.
- Turn off
- Bypass response caching and load fresh data from the database.
- Clear cache
- Remove stored responses while keeping learned policies. The next read loads fresh data.
Anyone who can reach this local demo can change cache settings. Keep the server bound to 127.0.0.1 for local use.
05 / Test a useful workflow
- Create a user, then a product. Copy their IDs from the responses.
- Create an order with those IDs and quantity 2. Prices are integer cents; the order snapshots its original price.
- Read GET /api/reports/sales, then repeat it to observe cache decisions.
- Change the order status from pending to paid, then shipped; or cancel while pending/paid.
- Request a missing ID or submit invalid JSON to test error handling. Check the monitoring table afterward.
Regression alerts compare the latest five successful origin samples with the previous five. They require both at least a 1.5x mean-latency increase and a 5 ms absolute increase, with both cohorts inside the last five minutes. Cache hits are excluded.
06 / Troubleshooting and evidence
Why are metrics or cache telemetry empty?
No business requests may have occurred in this window. Choose a longer window or send a playground request. Cache policies learn from eligible anonymous GETs, not writes. Credentialed reads bypass shared caching and now appear in bypass/database-read counters. Old request metrics cannot be retroactively added to new telemetry; counters reset on restart. Refreshes, health checks and cache controls do not count as business traffic.
What do response codes mean?
200: success. 201: created. 404: missing record. 409: duplicate value, invalid reference, or forbidden order transition. 422: invalid fields or JSON. Business 503: database unavailable.
Why does the screen say stale?
A monitoring fetch failed. Existing data stays visible. Check that Uvicorn is running at this origin, then click Refresh.
Does the live comparison prove a speedup?
No. It compares retained server samples and may mix query variants. Run the controlled HTTP benchmark for performance evidence:
python scripts/benchmark.py --orders 50000 --requests 120 --concurrency 8 --repeats 3
Metrics retain up to 10,000 observations and reset on restart. A full high-volume window can be undercounted after this cap. This is a single-worker local demo; external database writes are not automatically invalidated.