pub struct ConsolidationMetrics {Show 40 fields
pub groups_flushed: AtomicU64,
pub frames_consolidated: AtomicU64,
pub transactions_batched: AtomicU64,
pub fsyncs_total: AtomicU64,
pub flush_duration_us_total: AtomicU64,
pub wait_duration_us_total: AtomicU64,
pub max_group_size_observed: AtomicU64,
pub busy_retries: AtomicU64,
pub prepare_us_total: AtomicU64,
pub batch_build_us_total: AtomicU64,
pub conflict_snapshot_us_total: AtomicU64,
pub lane_prepare_us_total: AtomicU64,
pub consolidator_lock_wait_us_total: AtomicU64,
pub consolidator_flushing_wait_us_total: AtomicU64,
pub flusher_arrival_wait_us_total: AtomicU64,
pub inner_lock_wait_us_total: AtomicU64,
pub exclusive_lock_us_total: AtomicU64,
pub wal_append_us_total: AtomicU64,
pub flush_frame_prep_us_total: AtomicU64,
pub append_conflict_check_us_total: AtomicU64,
pub append_frames_us_total: AtomicU64,
pub wal_sync_us_total: AtomicU64,
pub waiter_epoch_wait_us_total: AtomicU64,
pub flusher_commits: AtomicU64,
pub waiter_commits: AtomicU64,
pub commit_phase_a_us_total: AtomicU64,
pub commit_phase_b_us_total: AtomicU64,
pub commit_phase_c1_us_total: AtomicU64,
pub commit_phase_c2_us_total: AtomicU64,
pub commit_phase_count: AtomicU64,
pub hist_consolidator_lock_wait: PhaseHistogram,
pub hist_arrival_wait: PhaseHistogram,
pub hist_wal_backend_lock_wait: PhaseHistogram,
pub hist_wal_append: PhaseHistogram,
pub hist_exclusive_lock: PhaseHistogram,
pub hist_waiter_epoch_wait: PhaseHistogram,
pub hist_phase_b: PhaseHistogram,
pub hist_wal_sync: PhaseHistogram,
pub hist_full_commit: PhaseHistogram,
pub wake_reasons: WakeReasonCounters,
}Expand description
Atomic counters for group commit consolidation observability.
Fields§
§groups_flushed: AtomicU64Total groups flushed.
frames_consolidated: AtomicU64Total frames written via consolidated groups.
transactions_batched: AtomicU64Total transactions batched.
fsyncs_total: AtomicU64Total fsync operations (one per group).
flush_duration_us_total: AtomicU64Total time spent flushing (microseconds).
wait_duration_us_total: AtomicU64Total time writers spent waiting for flush (microseconds).
max_group_size_observed: AtomicU64Maximum group size observed.
busy_retries: AtomicU64Total busy retries during flush (exponential backoff).
prepare_us_total: AtomicU64Time building batch before entering consolidator (microseconds).
batch_build_us_total: AtomicU64Time cloning staged pages into an owned group-commit batch (microseconds).
conflict_snapshot_us_total: AtomicU64Time pinning WAL conflict snapshot and attaching metadata (microseconds).
lane_prepare_us_total: AtomicU64Time spent preparing lane-local WAL frame bytes (microseconds).
consolidator_lock_wait_us_total: AtomicU64Time waiting to acquire consolidator.lock() (microseconds).
consolidator_flushing_wait_us_total: AtomicU64Time waiting while consolidator phase == FLUSHING (microseconds).
flusher_arrival_wait_us_total: AtomicU64Time flusher spends waiting for more batches (microseconds).
inner_lock_wait_us_total: AtomicU64Time waiting to acquire inner.lock() (microseconds).
exclusive_lock_us_total: AtomicU64Time acquiring EXCLUSIVE file lock (microseconds).
wal_append_us_total: AtomicU64Time in WAL append_frames (microseconds).
flush_frame_prep_us_total: AtomicU64Time preparing flusher frame refs and prepared batches (microseconds).
append_conflict_check_us_total: AtomicU64Time checking stale WAL conflicts immediately before append (microseconds).
append_frames_us_total: AtomicU64Time spent in the WAL append call itself (microseconds).
wal_sync_us_total: AtomicU64Time in WAL sync/fsync (microseconds).
waiter_epoch_wait_us_total: AtomicU64Time waiters spend waiting for epoch completion (microseconds).
flusher_commits: AtomicU64Count of commits that took flusher role.
waiter_commits: AtomicU64Count of commits that took waiter role.
commit_phase_a_us_total: AtomicU64Phase A: prepare under inner.lock (microseconds).
commit_phase_b_us_total: AtomicU64Phase B: WAL group commit (microseconds).
commit_phase_c1_us_total: AtomicU64Phase C1: post-commit metadata under inner.lock (microseconds).
commit_phase_c2_us_total: AtomicU64Phase C2: publish to snapshot plane (microseconds).
commit_phase_count: AtomicU64Total commits with phase timing recorded.
hist_consolidator_lock_wait: PhaseHistogramDistribution: consolidator lock wait.
hist_arrival_wait: PhaseHistogramDistribution: arrival wait (flusher only).
hist_wal_backend_lock_wait: PhaseHistogramDistribution: WAL backend (inner) lock wait.
hist_wal_append: PhaseHistogramDistribution: WAL append_frames.
hist_exclusive_lock: PhaseHistogramDistribution: exclusive file lock acquisition.
hist_waiter_epoch_wait: PhaseHistogramDistribution: waiter epoch wait.
hist_phase_b: PhaseHistogramDistribution: full Phase B (group commit path, flusher + waiter).
hist_wal_sync: PhaseHistogramDistribution: WAL sync/fsync.
hist_full_commit: PhaseHistogramDistribution: full commit (phase A + B + C).
wake_reasons: WakeReasonCountersWhy waiters woke up during epoch wait.
Implementations§
Source§impl ConsolidationMetrics
impl ConsolidationMetrics
Sourcepub fn record_flush(&self, frames: u64, transactions: u64, duration_us: u64)
pub fn record_flush(&self, frames: u64, transactions: u64, duration_us: u64)
Record a completed group flush.
Sourcepub fn record_wait(&self, duration_us: u64)
pub fn record_wait(&self, duration_us: u64)
Record waiter wait time.
Sourcepub fn record_busy_retry(&self)
pub fn record_busy_retry(&self)
Record a flush retry triggered by a transient busy error.
Sourcepub fn record_prepare_breakdown(
&self,
batch_build_us: u64,
conflict_snapshot_us: u64,
lane_prepare_us: u64,
)
pub fn record_prepare_breakdown( &self, batch_build_us: u64, conflict_snapshot_us: u64, lane_prepare_us: u64, )
Record pre-queue commit preparation breakdown.
Sourcepub fn record_flush_breakdown(
&self,
flush_frame_prep_us: u64,
append_conflict_check_us: u64,
append_frames_us: u64,
)
pub fn record_flush_breakdown( &self, flush_frame_prep_us: u64, append_conflict_check_us: u64, append_frames_us: u64, )
Record flusher-side frame preparation and append breakdown.
Sourcepub fn record_phase_timing(
&self,
prepare_us: u64,
consolidator_lock_wait_us: u64,
consolidator_flushing_wait_us: u64,
is_flusher: bool,
flusher_arrival_wait_us: u64,
inner_lock_wait_us: u64,
exclusive_lock_us: u64,
wal_append_us: u64,
wal_sync_us: u64,
waiter_epoch_wait_us: u64,
)
pub fn record_phase_timing( &self, prepare_us: u64, consolidator_lock_wait_us: u64, consolidator_flushing_wait_us: u64, is_flusher: bool, flusher_arrival_wait_us: u64, inner_lock_wait_us: u64, exclusive_lock_us: u64, wal_append_us: u64, wal_sync_us: u64, waiter_epoch_wait_us: u64, )
Record phase timing for a commit operation.
Sourcepub fn record_commit_phases(
&self,
phase_a_us: u64,
phase_b_us: u64,
phase_c1_us: u64,
phase_c2_us: u64,
)
pub fn record_commit_phases( &self, phase_a_us: u64, phase_b_us: u64, phase_c1_us: u64, phase_c2_us: u64, )
Record full commit path phase timing.
Sourcepub fn snapshot(&self) -> ConsolidationMetricsSnapshot
pub fn snapshot(&self) -> ConsolidationMetricsSnapshot
Take a point-in-time snapshot.