pub struct TracingServiceState {
pub producers: Vec<Producer>,
pub data_sources: Vec<DataSource>,
pub tracing_sessions: Vec<TracingSession>,
pub supports_tracing_sessions: Option<bool>,
pub num_sessions: Option<i32>,
pub num_sessions_started: Option<i32>,
pub tracing_service_version: Option<String>,
}
Expand description
Reports the state of the tracing service. Used to gather details about the data sources connected. See ConsumerPort::QueryServiceState().
Fields§
§producers: Vec<Producer>
Lists all the producers connected.
data_sources: Vec<DataSource>
Lists the data sources available.
tracing_sessions: Vec<TracingSession>
Lists the tracing sessions active AND owned by a consumer that has the same UID of the caller (or all of them if the caller is root). Introduced in v24 / Android T.
supports_tracing_sessions: Option<bool>
This is always set to true from v24 and beyond. This flag is only used to tell the difference between: (1) talking to a recent service which happens to have no tracing session active; (2) talking to an older version of the service which will never report any tracing session.
num_sessions: Option<i32>
Total number of tracing sessions.
num_sessions_started: Option<i32>
Number of tracing sessions in the started state. Always <= num_sessions.
tracing_service_version: Option<String>
The version of traced (the same returned by traced --version
).
This is a human readable string with and its format varies depending on
the build system and the repo (standalone vs AOSP).
This is intended for human debugging only.
Implementations§
Source§impl TracingServiceState
impl TracingServiceState
Sourcepub fn num_sessions(&self) -> i32
pub fn num_sessions(&self) -> i32
Returns the value of num_sessions
, or the default value if num_sessions
is unset.
Sourcepub fn num_sessions_started(&self) -> i32
pub fn num_sessions_started(&self) -> i32
Returns the value of num_sessions_started
, or the default value if num_sessions_started
is unset.
Sourcepub fn tracing_service_version(&self) -> &str
pub fn tracing_service_version(&self) -> &str
Returns the value of tracing_service_version
, or the default value if tracing_service_version
is unset.
Sourcepub fn supports_tracing_sessions(&self) -> bool
pub fn supports_tracing_sessions(&self) -> bool
Returns the value of supports_tracing_sessions
, or the default value if supports_tracing_sessions
is unset.
Trait Implementations§
Source§impl Clone for TracingServiceState
impl Clone for TracingServiceState
Source§fn clone(&self) -> TracingServiceState
fn clone(&self) -> TracingServiceState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TracingServiceState
impl Debug for TracingServiceState
Source§impl Default for TracingServiceState
impl Default for TracingServiceState
Source§impl Message for TracingServiceState
impl Message for TracingServiceState
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
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>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
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>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.Source§impl PartialEq for TracingServiceState
impl PartialEq for TracingServiceState
impl StructuralPartialEq for TracingServiceState
Auto Trait Implementations§
impl Freeze for TracingServiceState
impl RefUnwindSafe for TracingServiceState
impl Send for TracingServiceState
impl Sync for TracingServiceState
impl Unpin for TracingServiceState
impl UnwindSafe for TracingServiceState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)