Struct perfetto_consumer_proto::perfetto::protos::TraceStats

source ·
pub struct TraceStats {
Show 17 fields pub buffer_stats: Vec<BufferStats>, pub chunk_payload_histogram_def: Vec<i64>, pub writer_stats: Vec<WriterStats>, pub producers_connected: Option<u32>, pub producers_seen: Option<u64>, pub data_sources_registered: Option<u32>, pub data_sources_seen: Option<u64>, pub tracing_sessions: Option<u32>, pub total_buffers: Option<u32>, pub chunks_discarded: Option<u64>, pub patches_discarded: Option<u64>, pub invalid_packets: Option<u64>, pub filter_stats: Option<FilterStats>, pub flushes_requested: Option<u64>, pub flushes_succeeded: Option<u64>, pub flushes_failed: Option<u64>, pub final_flush_outcome: Option<i32>,
}
Expand description

Statistics for the internals of the tracing service.

Next id: 19.

Fields§

§buffer_stats: Vec<BufferStats>

Stats for the TraceBuffer(s) of the current trace session.

§chunk_payload_histogram_def: Vec<i64>

The thresholds of each the writer_stats histogram buckets. This is emitted only once as all WriterStats share the same bucket layout. This field has the same cardinality of the writer_stats.chunk_payload_histogram_{counts,sum} - 1. (The -1 is because the last overflow bucket is not reported in the _def). An array of values [10, 100, 1000] in the _def array means that there are four buckets (3 + the implicit overflow bucket): [0]: x <= 10; [1]: 100 < x <= 1000; [2]: 1000 < x <= 1000; [3]: x > 1000.

§writer_stats: Vec<WriterStats>§producers_connected: Option<u32>

Num. producers connected (whether they are involved in the current tracing session or not).

§producers_seen: Option<u64>

Num. producers ever seen for all trace sessions since startup (it’s a good proxy for inferring num. producers crashed / killed).

§data_sources_registered: Option<u32>

Num. data sources registered for all trace sessions.

§data_sources_seen: Option<u64>

Num. data sources ever seen for all trace sessions since startup.

§tracing_sessions: Option<u32>

Num. concurrently active tracing sessions.

§total_buffers: Option<u32>

Num. buffers for all tracing session (not just the current one). This will be >= buffer_stats.size(), because the latter is only about the current session.

§chunks_discarded: Option<u64>

Num. chunks that were discarded by the service before attempting to commit them to a buffer, e.g. because the producer specified an invalid buffer ID.

§patches_discarded: Option<u64>

Num. patches that were discarded by the service before attempting to apply them to a buffer, e.g. because the producer specified an invalid buffer ID.

§invalid_packets: Option<u64>

Packets that failed validation of the TrustedPacket. If this is > 0, there is a bug in the producer.

§filter_stats: Option<FilterStats>§flushes_requested: Option<u64>

Count of Flush() requests (either from the Consumer, or self-induced periodic flushes). The final Flush() is also included in the count.

§flushes_succeeded: Option<u64>

The count of the Flush() requests that were completed successfully. In a well behaving trace this should always be == flush_requests.

§flushes_failed: Option<u64>

The count of the Flush() requests that failed (in most timed out). In a well behaving trace this should always be == 0.

§final_flush_outcome: Option<i32>

Implementations§

source§

impl TraceStats

source

pub fn producers_connected(&self) -> u32

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

source

pub fn producers_seen(&self) -> u64

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

source

pub fn data_sources_registered(&self) -> u32

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

source

pub fn data_sources_seen(&self) -> u64

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

source

pub fn tracing_sessions(&self) -> u32

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

source

pub fn total_buffers(&self) -> u32

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

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

source

pub fn invalid_packets(&self) -> u64

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

source

pub fn flushes_requested(&self) -> u64

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

source

pub fn flushes_succeeded(&self) -> u64

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

source

pub fn flushes_failed(&self) -> u64

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

source

pub fn final_flush_outcome(&self) -> FinalFlushOutcome

Returns the enum value of final_flush_outcome, or the default if the field is unset or set to an invalid enum value.

source

pub fn set_final_flush_outcome(&mut self, value: FinalFlushOutcome)

Sets final_flush_outcome to the provided enum value.

Trait Implementations§

source§

impl Clone for TraceStats

source§

fn clone(&self) -> TraceStats

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 TraceStats

source§

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

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

impl Default for TraceStats

source§

fn default() -> Self

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

impl Message for TraceStats

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 TraceStats

source§

fn eq(&self, other: &TraceStats) -> 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 TraceStats

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.