Type Alias mz_storage::statistics::SourceStatistics

source ·
pub type SourceStatistics = StorageStatistics<SourceStatisticsRecord, SourceStatisticsMetrics, SourceStatisticsMetadata>;
Expand description

Statistics maintained for sources.

Aliased Type§

struct SourceStatistics { /* private fields */ }

Implementations§

source§

impl SourceStatistics

source

pub fn clear(&self)

Clear the data, resetting gauges to uninitialized. This does not reset prometheus gauges, which will be overwritten with new values.

source

pub fn snapshot(&mut self) -> Option<SourceStatisticsRecord>

Get a snapshot of the data, returning None if all gauges are not initialized.

This also resets counters, so that we continue to move diffs around.

source

pub fn initialize_snapshot_committed(&self, upper: &Antichain<Timestamp>)

Set the snapshot_committed stat based on the reported upper, and mark the stats as initialized.

  • In sql, we ensure that we never reset snapshot_committed to false, but gauges and counters are ordinarily reset to 0 in Prometheus, so on restarts this value may be inconsistent.
source

pub fn update_snapshot_committed(&self, upper: &Antichain<Timestamp>)

Set the snapshot_committed stat based on the reported upper.

source

pub fn inc_messages_received_by(&self, value: u64)

Increment the messages_received stat.

source

pub fn inc_updates_staged_by(&self, value: u64)

Increment the updates stat.

source

pub fn inc_updates_committed_by(&self, value: u64)

Increment the messages_committed stat.

source

pub fn inc_bytes_received_by(&self, value: u64)

Increment the bytes_received stat.

source

pub fn update_bytes_indexed_by(&self, value: i64)

Update the bytes_indexed stat. A positive value will add and a negative value will subtract.

source

pub fn set_bytes_indexed(&self, value: i64)

Set the bytes_indexed to the given value

source

pub fn update_records_indexed_by(&self, value: i64)

Update the records_indexed stat. A positive value will add and a negative value will subtract.

source

pub fn set_records_indexed(&self, value: i64)

Set the records_indexed to the given value

source

pub fn initialize_rehydration_latency_ms(&self)

Initialize the rehydration_latency_ms stat as NULL.

source

pub fn update_envelope_state_tombstones_by(&self, value: i64)

Update the envelope_state_tombstones stat. A positive value will add and a negative value will subtract.

source

pub fn update_rehydration_latency_ms(&self, upper: &Antichain<Timestamp>)

Set the rehydration_latency_ms stat based on the reported upper.

source

pub fn set_offset_known(&self, value: u64)

Set the offset_known stat to the given value.

source

pub fn set_offset_committed(&self, value: u64)

Set the offset_committed stat to the given value.

source

pub fn set_snapshot_records_known(&self, value: u64)

Set the snapshot_records_known stat to the given value.

source

pub fn set_snapshot_records_staged(&self, value: u64)

Set the snapshot_records_known stat to the given value.