...
1 package pgxpool
2
3 import (
4 "time"
5
6 "github.com/jackc/puddle"
7 )
8
9
10 type Stat struct {
11 s *puddle.Stat
12 newConnsCount int64
13 lifetimeDestroyCount int64
14 idleDestroyCount int64
15 }
16
17
18 func (s *Stat) AcquireCount() int64 {
19 return s.s.AcquireCount()
20 }
21
22
23
24 func (s *Stat) AcquireDuration() time.Duration {
25 return s.s.AcquireDuration()
26 }
27
28
29 func (s *Stat) AcquiredConns() int32 {
30 return s.s.AcquiredResources()
31 }
32
33
34
35 func (s *Stat) CanceledAcquireCount() int64 {
36 return s.s.CanceledAcquireCount()
37 }
38
39
40
41 func (s *Stat) ConstructingConns() int32 {
42 return s.s.ConstructingResources()
43 }
44
45
46
47
48 func (s *Stat) EmptyAcquireCount() int64 {
49 return s.s.EmptyAcquireCount()
50 }
51
52
53 func (s *Stat) IdleConns() int32 {
54 return s.s.IdleResources()
55 }
56
57
58 func (s *Stat) MaxConns() int32 {
59 return s.s.MaxResources()
60 }
61
62
63
64
65 func (s *Stat) TotalConns() int32 {
66 return s.s.TotalResources()
67 }
68
69
70 func (s *Stat) NewConnsCount() int64 {
71 return s.newConnsCount
72 }
73
74
75
76 func (s *Stat) MaxLifetimeDestroyCount() int64 {
77 return s.lifetimeDestroyCount
78 }
79
80
81
82 func (s *Stat) MaxIdleDestroyCount() int64 {
83 return s.idleDestroyCount
84 }
85
View as plain text