1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Add pool instrumentation.

This commit is contained in:
Anatolii Mihailenco
2016-01-19 18:36:40 +02:00
parent dd1ac33826
commit f7a4bd5023
5 changed files with 57 additions and 0 deletions

View File

@ -192,3 +192,9 @@ func NewClient(opt *Options) *Client {
pool := newConnPool(opt)
return newClient(opt, pool)
}
// PoolStats returns connection pool stats
func (c *Client) PoolStats() *PoolStats {
stats := c.baseClient.connPool.Stats()
return &stats
}