1const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('./core/symbols') 2const kPool = Symbol('pool') 3 4class PoolStats { 5 constructor (pool) { 6 this[kPool] = pool 7 } 8 9 get connected () { 10 return this[kPool][kConnected] 11 } 12 13 get free () { 14 return this[kPool][kFree] 15 } 16 17 get pending () { 18 return this[kPool][kPending] 19 } 20 21 get queued () { 22 return this[kPool][kQueued] 23 } 24 25 get running () { 26 return this[kPool][kRunning] 27 } 28 29 get size () { 30 return this[kPool][kSize] 31 } 32} 33 34module.exports = PoolStats 35