Skip to main content

ExperimentalTracingV2ProducerStats

Struct ExperimentalTracingV2ProducerStats 

Source
pub struct ExperimentalTracingV2ProducerStats {
Show 21 fields pub producer_id: Option<u32>, pub pid: Option<i32>, pub producer_name: Option<String>, pub chunk_size_bytes: Option<u32>, pub num_chunks: Option<u32>, pub chunks_read: Option<u64>, pub bytes_read: Option<u64>, pub data_loss_chunks: Option<u64>, pub malformed_chunks: Option<u64>, pub unsupported_format_chunks: Option<u64>, pub invalid_writer_chunks: Option<u64>, pub invalid_destination_chunks: Option<u64>, pub trace_buffer_rejected_chunks: Option<u64>, pub rewrite_requests: Option<u64>, pub positions_skipped: Option<u64>, pub drain_passes: Option<u64>, pub drain_time_ns: Option<u64>, pub drain_max_time_ns: Option<u64>, pub writer_dropped_packets: Option<u64>, pub writer_stalls: Option<u64>, pub writer_stall_time_ms: Option<u64>,
}
Expand description

Stats for the tracing v2 ring buffer of one producer since connection. The service emits one packet for each connected producer that has a data source in the session and an attached ring buffer. A producer that only uses the SMB has no stats packet. A cloned session keeps the stats from the time of the clone.

These stats include producer identity, so they are separate from TraceStats and pass through the session’s trace filter.

Next id: 22.

Fields§

§producer_id: Option<u32>

The producer that owns the ring buffer.

§pid: Option<i32>§producer_name: Option<String>§chunk_size_bytes: Option<u32>

Layout of the attached ring buffer.

§num_chunks: Option<u32>§chunks_read: Option<u64>

Num. chunks that the service copied out of the ring buffer.

§bytes_read: Option<u64>

Total size of the packet fragments in |chunks_read|. It excludes the chunk headers and the fragment sizes.

§data_loss_chunks: Option<u64>

Num. chunks discarded because their writer marked them as lossy. A writer marks the next chunk it gets after it dropped data, e.g. when the ring buffer was full.

§malformed_chunks: Option<u64>

Num. chunks discarded because the sizes of their fragments are invalid. Either a size cannot be decoded, or the fragments do not fit in the chunk. A nonzero value points to a writer bug or to corrupt memory.

§unsupported_format_chunks: Option<u64>

Num. chunks discarded because the service does not know their format.

§invalid_writer_chunks: Option<u64>

The chunk’s writer ID was zero or out of range.

§invalid_destination_chunks: Option<u64>

The chunk’s target buffer is not a TraceBuffer that the producer can write to.

§trace_buffer_rejected_chunks: Option<u64>

The trace buffer refused the chunk. Its BufferStats say why, in |abi_violations| or |chunks_discarded|.

§rewrite_requests: Option<u64>

Num. chunks that the service read while their writer was still filling them. The writer then moves its open fragment to another chunk.

§positions_skipped: Option<u64>

Num. ring buffer positions that gave no chunk to the service. They are positions that no writer claimed, chunks with no published fragment and the discarded chunks above.

§drain_passes: Option<u64>

Num. times the service read the ring buffer. It reads it when the producer sends a DrainV2RingBuffer request, on its own (e.g. on a flush), and to retry a pass that stopped early.

§drain_time_ns: Option<u64>

Time that the service spent in |drain_passes|, measured with CLOCK_MONOTONIC. It does not count time when the device was suspended.

§drain_max_time_ns: Option<u64>

Time of the longest of |drain_passes|, on the same clock. The service has one main thread, so a long pass delays every other producer and request.

§writer_dropped_packets: Option<u64>

Num. packets that the writers dropped before the packets reached a chunk. This includes packets dropped before the service attached the ring buffer. A writer adds its drops when it flushes or stops dropping, so the value can lag.

§writer_stalls: Option<u64>

Num. times a writer waited for a free chunk, and the total time of those waits. This is time that the app’s threads were blocked. A writer checks again after about 100 ms, so a longer stall counts several times.

§writer_stall_time_ms: Option<u64>

Implementations§

Source§

impl ExperimentalTracingV2ProducerStats

Source

pub fn producer_id(&self) -> u32

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

Source

pub fn pid(&self) -> i32

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

Source

pub fn producer_name(&self) -> &str

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

Source

pub fn chunk_size_bytes(&self) -> u32

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

Source

pub fn num_chunks(&self) -> u32

Returns the value of num_chunks, or the default value if num_chunks 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 bytes_read(&self) -> u64

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

Source

pub fn data_loss_chunks(&self) -> u64

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

Source

pub fn malformed_chunks(&self) -> u64

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

Source

pub fn unsupported_format_chunks(&self) -> u64

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

Source

pub fn invalid_writer_chunks(&self) -> u64

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

Source

pub fn invalid_destination_chunks(&self) -> u64

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

Source

pub fn trace_buffer_rejected_chunks(&self) -> u64

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

Source

pub fn rewrite_requests(&self) -> u64

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

Source

pub fn positions_skipped(&self) -> u64

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

Source

pub fn drain_passes(&self) -> u64

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

Source

pub fn drain_time_ns(&self) -> u64

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

Source

pub fn drain_max_time_ns(&self) -> u64

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

Source

pub fn writer_dropped_packets(&self) -> u64

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

Source

pub fn writer_stalls(&self) -> u64

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

Source

pub fn writer_stall_time_ms(&self) -> u64

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

Trait Implementations§

Source§

impl Clone for ExperimentalTracingV2ProducerStats

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ExperimentalTracingV2ProducerStats

Source§

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

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

impl Default for ExperimentalTracingV2ProducerStats

Source§

fn default() -> Self

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

impl Eq for ExperimentalTracingV2ProducerStats

Source§

impl Hash for ExperimentalTracingV2ProducerStats

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Message for ExperimentalTracingV2ProducerStats

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(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where 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( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where 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(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

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

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

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

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

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

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

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

impl PartialEq for ExperimentalTracingV2ProducerStats

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ExperimentalTracingV2ProducerStats

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§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.