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

source

pub fn bytes_written(&self) -> u64

Returns the value of bytes_written, or the default value if bytes_written is unset.

source

pub fn chunks_written(&self) -> u64

Returns the value of chunks_written, or the default value if chunks_written is unset.

source

pub fn chunks_overwritten(&self) -> u64

Returns the value of chunks_overwritten, or the default value if chunks_overwritten is unset.

source

pub fn write_wrap_count(&self) -> u64

Returns the value of write_wrap_count, or the default value if write_wrap_count is unset.

source

pub fn patches_succeeded(&self) -> u64

Returns the value of patches_succeeded, or the default value if patches_succeeded is unset.

source

pub fn patches_failed(&self) -> u64

Returns the value of patches_failed, or the default value if patches_failed is unset.

source

pub fn readaheads_succeeded(&self) -> u64

Returns the value of readaheads_succeeded, or the default value if readaheads_succeeded is unset.

source

pub fn readaheads_failed(&self) -> u64

Returns the value of readaheads_failed, or the default value if readaheads_failed is unset.

source

pub fn abi_violations(&self) -> u64

Returns the value of abi_violations, or the default value if abi_violations is unset.

source

pub fn chunks_rewritten(&self) -> u64

Returns the value of chunks_rewritten, or the default value if chunks_rewritten is unset.

source

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.

source

pub fn buffer_size(&self) -> u64

Returns the value of buffer_size, or the default value if buffer_size is unset.

source

pub fn bytes_overwritten(&self) -> u64

Returns the value of bytes_overwritten, or the default value if bytes_overwritten is unset.

source

pub fn bytes_read(&self) -> u64

Returns the value of bytes_read, or the default value if bytes_read is unset.

source

pub fn padding_bytes_written(&self) -> u64

Returns the value of padding_bytes_written, or the default value if padding_bytes_written is unset.

source

pub fn padding_bytes_cleared(&self) -> u64

Returns the value of padding_bytes_cleared, or the default value if padding_bytes_cleared is unset.

source

pub fn chunks_read(&self) -> u64

Returns the value of chunks_read, or the default value if chunks_read is unset.

source

pub fn chunks_discarded(&self) -> u64

Returns the value of chunks_discarded, or the default value if chunks_discarded is unset.

source

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

source§

fn clone(&self) -> BufferStats

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BufferStats

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BufferStats

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for BufferStats

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
source§

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>
where B: BufMut, Self: Sized,

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,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for BufferStats

source§

fn eq(&self, other: &BufferStats) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for BufferStats

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.