pub async fn db_pool_stats(url: &str) -> Result<()>Expand description
Show connection pool statistics.
Displays detailed metrics about the database connection pool including active, idle, and in-use connections with utilization percentage.
§Arguments
url- Database connection URL
§Metrics
- Max connections (pool size)
- Active connections
- Idle connections
- In-use connections
- Waiting tasks (if any)
- Pool utilization percentage
§Recommendations
- High utilization (>80%): Consider increasing max_connections
- Low utilization (<20%): Consider reducing max_connections
§Examples
db_pool_stats("postgresql://localhost/celers").await?;