Source File
stat.go
Belonging Package
github.com/jackc/pgx/v5/pgxpool
package pgxpoolimport ()// Stat is a snapshot of Pool statistics.type Stat struct {s *puddle.StatnewConnsCount int64lifetimeDestroyCount int64idleDestroyCount int64}// AcquireCount returns the cumulative count of successful acquires from the pool.func ( *Stat) () int64 {return .s.AcquireCount()}// AcquireDuration returns the total duration of all successful acquires from// the pool.func ( *Stat) () time.Duration {return .s.AcquireDuration()}// AcquiredConns returns the number of currently acquired connections in the pool.func ( *Stat) () int32 {return .s.AcquiredResources()}// CanceledAcquireCount returns the cumulative count of acquires from the pool// that were canceled by a context.func ( *Stat) () int64 {return .s.CanceledAcquireCount()}// ConstructingConns returns the number of conns with construction in progress in// the pool.func ( *Stat) () int32 {return .s.ConstructingResources()}// EmptyAcquireCount returns the cumulative count of successful acquires from the pool// that waited for a resource to be released or constructed because the pool was// empty.func ( *Stat) () int64 {return .s.EmptyAcquireCount()}// IdleConns returns the number of currently idle conns in the pool.func ( *Stat) () int32 {return .s.IdleResources()}// MaxConns returns the maximum size of the pool.func ( *Stat) () int32 {return .s.MaxResources()}// TotalConns returns the total number of resources currently in the pool.// The value is the sum of ConstructingConns, AcquiredConns, and// IdleConns.func ( *Stat) () int32 {return .s.TotalResources()}// NewConnsCount returns the cumulative count of new connections opened.func ( *Stat) () int64 {return .newConnsCount}// MaxLifetimeDestroyCount returns the cumulative count of connections destroyed// because they exceeded MaxConnLifetime.func ( *Stat) () int64 {return .lifetimeDestroyCount}// MaxIdleDestroyCount returns the cumulative count of connections destroyed because// they exceeded MaxConnIdleTime.func ( *Stat) () int64 {return .idleDestroyCount}// EmptyAcquireWaitTime returns the cumulative time waited for successful acquires// from the pool for a resource to be released or constructed because the pool was// empty.func ( *Stat) () time.Duration {return .s.EmptyAcquireWaitTime()}
The pages are generated with Golds v0.7.6. (GOOS=linux GOARCH=amd64)