Lightweight Django middleware for APM-style request profiling
Measure DB vs App time and query count with near-zero configuration.
Why django-xbench?
π DevTools visibility : See DB vs app/serialization time in Chrome DevTools via Server-Timing .
: See DB vs app/serialization time in Chrome DevTools via . π Zero-agent : No daemon, no SaaS β just one Django middleware.
: No daemon, no SaaS β just one Django middleware. π§© Drop-in : Near-zero configuration (add middleware and go).
: Near-zero configuration (add middleware and go). π Privacy-first: Exposes timing + query counts only (no query contents stored).
Goal: make performance bottlenecks βvisibleβ (DB vs app/serialization) without heavyweight APM.
Here's how django-xbench exposes request timing breakdown using the Server-Timing header:
Adds Server-Timing and X-Bench-Queries headers and optionally logs per-request metrics.
... continue reading