noxu_db/sequence_stats.rs
1//! Sequence statistics.
2//!
3
4/// Statistics for a `Sequence` handle.
5///
6///
7#[derive(Debug, Clone)]
8pub struct SequenceStats {
9 /// Total number of successful `get` calls on this handle.
10 pub n_gets: u64,
11
12 /// Number of `get` calls that were served from the in-memory cache
13 /// without touching the database.
14 pub n_cache_hits: u64,
15
16 /// The value most recently written to the database (the "stored value").
17 /// Other handles may have already consumed values between `current_value`
18 /// and `cache_last`.
19 pub current_value: i64,
20
21 /// The next value that will be returned from the local cache.
22 pub cache_value: i64,
23
24 /// The last value reserved in the local cache.
25 pub cache_last: i64,
26
27 /// Configured minimum of the sequence range.
28 pub range_min: i64,
29
30 /// Configured maximum of the sequence range.
31 pub range_max: i64,
32
33 /// Configured cache size for this handle.
34 pub cache_size: i32,
35}