pub struct Diagnostics { /* private fields */ }Expand description
内部诊断与指标数据结构。
使用原子操作确保线程安全,提供日志系统运行时的关键指标。
Implementations§
Source§impl Diagnostics
impl Diagnostics
Sourcepub fn increment_events_processed(&self)
pub fn increment_events_processed(&self)
增加已处理事件计数。
Sourcepub fn increment_events_dropped_backpressure(&self)
pub fn increment_events_dropped_backpressure(&self)
增加因背压而丢弃的事件计数。
Sourcepub fn increment_events_dropped_error(&self)
pub fn increment_events_dropped_error(&self)
增加因错误而丢弃的事件计数。
Sourcepub fn increment_sink_errors(&self)
pub fn increment_sink_errors(&self)
增加 Sink 错误计数。
Sourcepub fn increment_pre_init_buffer_events(&self)
pub fn increment_pre_init_buffer_events(&self)
增加预初始化缓冲区事件计数。
Sourcepub fn increment_pre_init_buffer_overflows(&self)
pub fn increment_pre_init_buffer_overflows(&self)
增加预初始化缓冲区溢出计数。
Sourcepub fn increment_database_batch_writes(&self)
pub fn increment_database_batch_writes(&self)
增加数据库批量写入计数。
Sourcepub fn increment_file_writes(&self)
pub fn increment_file_writes(&self)
增加文件写入计数。
Sourcepub fn increment_stdout_writes(&self)
pub fn increment_stdout_writes(&self)
增加标准输出写入计数。
Sourcepub fn add_events_processed(&self, count: u64)
pub fn add_events_processed(&self, count: u64)
批量增加已处理事件计数。
Sourcepub fn snapshot(&self) -> DiagnosticsSnapshot
pub fn snapshot(&self) -> DiagnosticsSnapshot
获取诊断数据的快照。
Trait Implementations§
Source§impl Debug for Diagnostics
impl Debug for Diagnostics
Auto Trait Implementations§
impl !Freeze for Diagnostics
impl Forget for Diagnostics
impl RefUnwindSafe for Diagnostics
impl Send for Diagnostics
impl Sync for Diagnostics
impl Unpin for Diagnostics
impl UnsafeUnpin for Diagnostics
impl UnwindSafe for Diagnostics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more