pub struct Stats {
pub num_total: Option<u64>,
pub num_failed: Option<u64>,
pub num_skipped: Option<u64>,
}
Expand description
Stats are emitted only upon Flush() and are monotonic (i.e. they are absolute counters since the beginning of the lifetime of the tracing session and NOT relative to the previous Stats snapshot).
Fields§
§num_total: Option<u64>
Total number of log events seen, including errors and skipped entries (num of events stored in the trace = total - failed - skipped).
num_failed: Option<u64>
Parser failures.
num_skipped: Option<u64>
Messages skipped due to filters.
Implementations§
Source§impl Stats
impl Stats
Sourcepub fn num_total(&self) -> u64
pub fn num_total(&self) -> u64
Returns the value of num_total
, or the default value if num_total
is unset.
Sourcepub fn num_failed(&self) -> u64
pub fn num_failed(&self) -> u64
Returns the value of num_failed
, or the default value if num_failed
is unset.
Sourcepub fn num_skipped(&self) -> u64
pub fn num_skipped(&self) -> u64
Returns the value of num_skipped
, or the default value if num_skipped
is unset.
Trait Implementations§
Source§impl Message for Stats
impl Message for Stats
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.impl StructuralPartialEq for Stats
Auto Trait Implementations§
impl Freeze for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnwindSafe for Stats
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