Skip to content

Commit 00b86ca

Browse files
authored
Merge pull request #2208 from vamshiaruru/feat/expose_empty_acquire_wait_time_from_puddle
Expose puddle.Pool's EmptyAcquireWaitTime in pgxpool's Stats
2 parents bcf3fbd + 12b37f3 commit 00b86ca

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pgxpool/stat.go

+7
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,10 @@ func (s *Stat) MaxLifetimeDestroyCount() int64 {
8282
func (s *Stat) MaxIdleDestroyCount() int64 {
8383
return s.idleDestroyCount
8484
}
85+
86+
// EmptyAcquireWaitTime returns the cumulative time waited for successful acquires
87+
// from the pool for a resource to be released or constructed because the pool was
88+
// empty.
89+
func (s *Stat) EmptyAcquireWaitTime() time.Duration {
90+
return s.s.EmptyAcquireWaitTime()
91+
}

0 commit comments

Comments
 (0)