pub struct SessionStats {
pub ffi_calls: u64,
pub batch_items: u64,
pub elapsed_ns: u64,
}Expand description
Cumulative dispatch metrics for one LeanSession.
Snapshot via LeanSession::stats. Each typed query method records
one FFI call; the bulk methods additionally record the per-item batch
size. elapsed_ns accumulates the wall time spent inside the inner
.call(...) dispatch (measured with Instant::now) — it excludes
Rust-side argument marshaling, name lookup, and result decoding so
the number is comparable across singular and bulk paths.
import is not counted: import vs. reuse is tracked at the
crate::host::pool::SessionPool level. Construction of a session
always pays for one import, and that cost is reported by
crate::host::pool::PoolStats::imports_performed when the session
flows through a pool.
Fields§
§ffi_calls: u64Number of typed query FFI calls dispatched through this session, counting each singular call once and each bulk call once regardless of batch size.
batch_items: u64Cumulative number of per-item entries processed by the bulk
methods. Singular calls do not contribute. A batch of N items
adds N here and 1 to Self::ffi_calls.
elapsed_ns: u64Cumulative nanoseconds spent inside the dispatch .call(...)
across every recorded FFI call.
Trait Implementations§
Source§impl Clone for SessionStats
impl Clone for SessionStats
Source§fn clone(&self) -> SessionStats
fn clone(&self) -> SessionStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionStats
impl Debug for SessionStats
Source§impl Default for SessionStats
impl Default for SessionStats
Source§fn default() -> SessionStats
fn default() -> SessionStats
Source§impl PartialEq for SessionStats
impl PartialEq for SessionStats
Source§fn eq(&self, other: &SessionStats) -> bool
fn eq(&self, other: &SessionStats) -> bool
self and other values to be equal, and is used by ==.