pub struct PoolStats {
pub imports_performed: u64,
pub reused: u64,
pub acquired: u64,
pub released_to_pool: u64,
pub released_dropped: u64,
pub drains: u64,
pub drained: u64,
}Expand description
Cumulative metrics for one SessionPool.
Snapshot via SessionPool::stats. Counters never reset — to
compute a delta, take two snapshots and subtract.
imports_performed + reused == acquired by construction: every
SessionPool::acquire call increments acquired exactly once
plus either imports_performed (cache miss) or reused (cache
hit). Similarly, released_to_pool + released_dropped counts every
PooledSession::drop firing. released_to_pool is cumulative:
an entry counted there may later be removed by SessionPool::drain,
which records the removal in drained.
Fields§
§imports_performed: u64Number of fresh Lean.importModules calls performed because no
pooled environment matched the requested imports list.
reused: u64Number of acquire calls that found a matching pooled environment and reused it instead of re-importing.
acquired: u64Total acquire calls (== imports_performed + reused).
released_to_pool: u64Number of release events that pushed the environment back onto the free list.
released_dropped: u64Number of release events that dropped the environment because the pool was at capacity.
drains: u64Number of explicit SessionPool::drain calls.
drained: u64Number of cached environments dropped by explicit drains.