aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/undici/lib/util/stats.js
diff options
context:
space:
mode:
Diffstat (limited to 'vanilla/node_modules/undici/lib/util/stats.js')
-rw-r--r--vanilla/node_modules/undici/lib/util/stats.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/vanilla/node_modules/undici/lib/util/stats.js b/vanilla/node_modules/undici/lib/util/stats.js
new file mode 100644
index 0000000..a13132e
--- /dev/null
+++ b/vanilla/node_modules/undici/lib/util/stats.js
@@ -0,0 +1,32 @@
+'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 }