← Back to Stormify Documentation

PoolStats

data class PoolStats(val total: Int, val inUse: Int, val idle: Int, val acquireCount: Long, val waitedAcquireCount: Long, val evictedCount: Long, val retiredCount: Long)

Snapshot of a SuspendConnectionPool's internal counters at a point in time.

All fields are read from atomic counters without locking, so they are individually accurate but the set as a whole may not represent a consistent moment — e.g. inUse + idle may differ slightly from total if reads race with a borrow.

Constructors

Link copied to clipboard
constructor(total: Int, inUse: Int, idle: Int, acquireCount: Long, waitedAcquireCount: Long, evictedCount: Long, retiredCount: Long)

Properties

Link copied to clipboard

Total number of successful acquire calls over the pool's lifetime.

Link copied to clipboard

Total number of connections evicted because of validation failure or use error.

Link copied to clipboard
val idle: Int

Connections sitting in the idle queue, ready to be reused.

Link copied to clipboard
val inUse: Int

Connections currently handed out via use { }.

Link copied to clipboard

Total number of connections retired because they exceeded maxLifetime.

Link copied to clipboard
val total: Int

Total connections currently owned by the pool (in-use + idle + being validated).

Link copied to clipboard

Total number of times a caller waited because the pool was saturated.