pub struct BufferStats {Show 19 fields
pub buffer_size: Option<u64>,
pub bytes_written: Option<u64>,
pub bytes_overwritten: Option<u64>,
pub bytes_read: Option<u64>,
pub padding_bytes_written: Option<u64>,
pub padding_bytes_cleared: Option<u64>,
pub chunks_written: Option<u64>,
pub chunks_rewritten: Option<u64>,
pub chunks_overwritten: Option<u64>,
pub chunks_discarded: Option<u64>,
pub chunks_read: Option<u64>,
pub chunks_committed_out_of_order: Option<u64>,
pub write_wrap_count: Option<u64>,
pub patches_succeeded: Option<u64>,
pub patches_failed: Option<u64>,
pub readaheads_succeeded: Option<u64>,
pub readaheads_failed: Option<u64>,
pub abi_violations: Option<u64>,
pub trace_writer_packet_loss: Option<u64>,
}
Expand description
From TraceBuffer::Stats.
Next id: 21.
Fields§
§buffer_size: Option<u64>
Size of the circular buffer in bytes.
bytes_written: Option<u64>
Num. bytes written into the circular buffer, including chunk headers.
bytes_overwritten: Option<u64>
Num. bytes overwritten before they have been read (i.e. loss of data).
bytes_read: Option<u64>
Total size of chunks that were fully read from the circular buffer by the consumer. This may not be equal to |bytes_written| either in the middle of tracing, or if |chunks_overwritten| is non-zero. Note that this is the size of the chunks read from the buffer, including chunk headers, which will be different from the total size of packets returned to the consumer.
The current utilization of the trace buffer (mid-tracing) can be obtained by subtracting |bytes_read| and |bytes_overwritten| from |bytes_written|, adding the difference of |padding_bytes_written| and |padding_bytes_cleared|, and comparing this sum to the |buffer_size|. Note that this represents the total size of buffered data in the buffer, yet this data may be spread non-contiguously through the buffer and may be overridden before the utilization reaches 100%.
padding_bytes_written: Option<u64>
Num. bytes that were allocated as padding between chunks in the circular buffer.
padding_bytes_cleared: Option<u64>
Num. of padding bytes that were removed from the circular buffer when they were overwritten.
The difference between |padding_bytes_written| and |padding_bytes_cleared| denotes the total size of padding currently present in the buffer.
chunks_written: Option<u64>
Num. chunks (!= packets) written into the buffer.
chunks_rewritten: Option<u64>
Num. chunks (!= packets) rewritten into the buffer. This means we rewrote the same chunk with additional packets appended to the end.
chunks_overwritten: Option<u64>
Num. chunks overwritten before they have been read (i.e. loss of data).
chunks_discarded: Option<u64>
Num. chunks discarded (i.e. loss of data). Can be > 0 only when a buffer is configured with FillPolicy == DISCARD.
chunks_read: Option<u64>
Num. chunks (!= packets) that were fully read from the circular buffer by the consumer. This may not be equal to |chunks_written| either in the middle of tracing, or if |chunks_overwritten| is non-zero.
chunks_committed_out_of_order: Option<u64>
Num. chunks that were committed out of order.
write_wrap_count: Option<u64>
Num. times the ring buffer wrapped around.
patches_succeeded: Option<u64>
Num. out-of-band (OOB) patches that succeeded.
patches_failed: Option<u64>
Num. OOB patches that failed (e.g., the chunk to patch was gone).
readaheads_succeeded: Option<u64>
Num. readaheads (for large multi-chunk packet reads) that ended up in a successful packet read.
readaheads_failed: Option<u64>
Num. readaheads aborted because of missing chunks in the sequence stream. Note that a small number > 0 is totally expected: occasionally, when issuing a read, the very last packet in a sequence might be incomplete (because the producer is still writing it while we read). The read will stop at that point, for that sequence, increasing this counter.
abi_violations: Option<u64>
Num. of violations of the SharedMemoryABI found while writing or reading the buffer. This is an indication of either a bug in the producer(s) or malicious producer(s).
trace_writer_packet_loss: Option<u64>
Num. of times the service detected packet loss on a trace writer sequence. This is usually caused by exhaustion of available chunks in the writer process’s SMB. Note that this relies on the client’s TraceWriter indicating this loss to the service – packets lost for other reasons are not reflected in this stat.
Implementations§
Source§impl BufferStats
impl BufferStats
Sourcepub fn bytes_written(&self) -> u64
pub fn bytes_written(&self) -> u64
Returns the value of bytes_written
, or the default value if bytes_written
is unset.
Sourcepub fn chunks_written(&self) -> u64
pub fn chunks_written(&self) -> u64
Returns the value of chunks_written
, or the default value if chunks_written
is unset.
Sourcepub fn chunks_overwritten(&self) -> u64
pub fn chunks_overwritten(&self) -> u64
Returns the value of chunks_overwritten
, or the default value if chunks_overwritten
is unset.
Sourcepub fn write_wrap_count(&self) -> u64
pub fn write_wrap_count(&self) -> u64
Returns the value of write_wrap_count
, or the default value if write_wrap_count
is unset.
Sourcepub fn patches_succeeded(&self) -> u64
pub fn patches_succeeded(&self) -> u64
Returns the value of patches_succeeded
, or the default value if patches_succeeded
is unset.
Sourcepub fn patches_failed(&self) -> u64
pub fn patches_failed(&self) -> u64
Returns the value of patches_failed
, or the default value if patches_failed
is unset.
Sourcepub fn readaheads_succeeded(&self) -> u64
pub fn readaheads_succeeded(&self) -> u64
Returns the value of readaheads_succeeded
, or the default value if readaheads_succeeded
is unset.
Sourcepub fn readaheads_failed(&self) -> u64
pub fn readaheads_failed(&self) -> u64
Returns the value of readaheads_failed
, or the default value if readaheads_failed
is unset.
Sourcepub fn abi_violations(&self) -> u64
pub fn abi_violations(&self) -> u64
Returns the value of abi_violations
, or the default value if abi_violations
is unset.
Sourcepub fn chunks_rewritten(&self) -> u64
pub fn chunks_rewritten(&self) -> u64
Returns the value of chunks_rewritten
, or the default value if chunks_rewritten
is unset.
Sourcepub fn chunks_committed_out_of_order(&self) -> u64
pub fn chunks_committed_out_of_order(&self) -> u64
Returns the value of chunks_committed_out_of_order
, or the default value if chunks_committed_out_of_order
is unset.
Sourcepub fn buffer_size(&self) -> u64
pub fn buffer_size(&self) -> u64
Returns the value of buffer_size
, or the default value if buffer_size
is unset.
Sourcepub fn bytes_overwritten(&self) -> u64
pub fn bytes_overwritten(&self) -> u64
Returns the value of bytes_overwritten
, or the default value if bytes_overwritten
is unset.
Sourcepub fn bytes_read(&self) -> u64
pub fn bytes_read(&self) -> u64
Returns the value of bytes_read
, or the default value if bytes_read
is unset.
Sourcepub fn padding_bytes_written(&self) -> u64
pub fn padding_bytes_written(&self) -> u64
Returns the value of padding_bytes_written
, or the default value if padding_bytes_written
is unset.
Sourcepub fn padding_bytes_cleared(&self) -> u64
pub fn padding_bytes_cleared(&self) -> u64
Returns the value of padding_bytes_cleared
, or the default value if padding_bytes_cleared
is unset.
Sourcepub fn chunks_read(&self) -> u64
pub fn chunks_read(&self) -> u64
Returns the value of chunks_read
, or the default value if chunks_read
is unset.
Sourcepub fn chunks_discarded(&self) -> u64
pub fn chunks_discarded(&self) -> u64
Returns the value of chunks_discarded
, or the default value if chunks_discarded
is unset.
Sourcepub fn trace_writer_packet_loss(&self) -> u64
pub fn trace_writer_packet_loss(&self) -> u64
Returns the value of trace_writer_packet_loss
, or the default value if trace_writer_packet_loss
is unset.
Trait Implementations§
Source§impl Clone for BufferStats
impl Clone for BufferStats
Source§fn clone(&self) -> BufferStats
fn clone(&self) -> BufferStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BufferStats
impl Debug for BufferStats
Source§impl Default for BufferStats
impl Default for BufferStats
Source§impl Message for BufferStats
impl Message for BufferStats
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
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>
self
.