Skip to content

Commit

Permalink
Expose puddle.Pool's EmptyAcquireWaitTime in pgxpool's Stats
Browse files Browse the repository at this point in the history
Addresses: #2205
  • Loading branch information
vamshiaruru32 committed Dec 26, 2024
1 parent bcf3fbd commit 12b37f3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pgxpool/stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,10 @@ func (s *Stat) MaxLifetimeDestroyCount() int64 {
func (s *Stat) MaxIdleDestroyCount() int64 {
return s.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 (s *Stat) EmptyAcquireWaitTime() time.Duration {
return s.s.EmptyAcquireWaitTime()
}

0 comments on commit 12b37f3

Please sign in to comment.