Type Alias mz_storage::statistics::SinkStatistics
source · pub type SinkStatistics = StorageStatistics<SinkStatisticsRecord, SinkStatisticsMetrics, ()>;
Expand description
Statistics maintained for sinks.
Aliased Type§
struct SinkStatistics {
stats: Rc<RefCell<StatsInner<SinkStatisticsRecord, SinkStatisticsMetrics>>>,
meta: (),
}
Fields§
§stats: Rc<RefCell<StatsInner<SinkStatisticsRecord, SinkStatisticsMetrics>>>
§meta: ()
Meta data needed to maintain statistics.
Implementations§
source§impl SinkStatistics
impl SinkStatistics
pub(crate) fn new( id: GlobalId, worker_id: usize, metrics: &SinkStatisticsMetricDefs, ) -> Self
sourcepub fn clear(&self)
pub fn clear(&self)
Clear the data, resetting gauges to uninitialized. This does not reset prometheus gauges, which will be overwritten with new values.
sourcepub fn snapshot(&self) -> Option<SinkStatisticsRecord>
pub fn snapshot(&self) -> Option<SinkStatisticsRecord>
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.
sourcepub fn inc_messages_staged_by(&self, value: u64)
pub fn inc_messages_staged_by(&self, value: u64)
Increment the messages_staged
stat.
sourcepub fn inc_bytes_staged_by(&self, value: u64)
pub fn inc_bytes_staged_by(&self, value: u64)
Increment the bytes_received
stat.
sourcepub fn inc_messages_committed_by(&self, value: u64)
pub fn inc_messages_committed_by(&self, value: u64)
Increment the messages_committed
stat.
sourcepub fn inc_bytes_committed_by(&self, value: u64)
pub fn inc_bytes_committed_by(&self, value: u64)
Increment the bytes_committed
stat.