MCPcopy
hub / github.com/jackc/pgx / Stat

Method Stat

pgxpool/pool.go:714–721  ·  view source on GitHub ↗

Stat returns a pgxpool.Stat struct with a snapshot of Pool statistics.

()

Source from the content-addressed store, hash-verified

712
713// Stat returns a pgxpool.Stat struct with a snapshot of Pool statistics.
714func (p *Pool) Stat() *Stat {
715 return &Stat{
716 s: p.p.Stat(),
717 newConnsCount: p.newConnsCount.Load(),
718 lifetimeDestroyCount: p.lifetimeDestroyCount.Load(),
719 idleDestroyCount: p.idleDestroyCount.Load(),
720 }
721}
722
723// Exec acquires a connection from the [Pool] and executes the given SQL.
724// SQL can be either a prepared statement name or an SQL string.

Calls

no outgoing calls