perfetto_consumer_proto::perfetto::protos

Struct 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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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§

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,

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

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.