Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
33 lines
600 B
Plaintext
33 lines
600 B
Plaintext
'use strict'
|
|
|
|
const {
|
|
kConnected,
|
|
kPending,
|
|
kRunning,
|
|
kSize,
|
|
kFree,
|
|
kQueued
|
|
} = require('../core/symbols')
|
|
|
|
class ClientStats {
|
|
constructor (client) {
|
|
this.connected = client[kConnected]
|
|
this.pending = client[kPending]
|
|
this.running = client[kRunning]
|
|
this.size = client[kSize]
|
|
}
|
|
}
|
|
|
|
class PoolStats {
|
|
constructor (pool) {
|
|
this.connected = pool[kConnected]
|
|
this.free = pool[kFree]
|
|
this.pending = pool[kPending]
|
|
this.queued = pool[kQueued]
|
|
this.running = pool[kRunning]
|
|
this.size = pool[kSize]
|
|
}
|
|
}
|
|
|
|
module.exports = { ClientStats, PoolStats }
|