pub struct ThreadDescriptor {
pub pid: Option<i32>,
pub tid: Option<i32>,
pub thread_name: Option<String>,
pub chrome_thread_type: Option<i32>,
pub reference_timestamp_us: Option<i64>,
pub reference_thread_time_us: Option<i64>,
pub reference_thread_instruction_count: Option<i64>,
pub legacy_sort_index: Option<i32>,
}
Expand description
Describes a thread’s attributes. Emitted as part of a TrackDescriptor, usually by the thread’s trace writer.
Next id: 9.
Fields§
§pid: Option<i32>
§tid: Option<i32>
§thread_name: Option<String>
§chrome_thread_type: Option<i32>
§reference_timestamp_us: Option<i64>
Deprecated. Use ClockSnapshot in combination with TracePacket’s timestamp and timestamp_clock_id fields instead.
reference_thread_time_us: Option<i64>
Absolute reference values. Clock values in subsequent TrackEvents can be encoded accumulatively and relative to these. This reduces their var-int encoding size. TODO(eseckler): Deprecated. Replace these with ClockSnapshot encoding.
reference_thread_instruction_count: Option<i64>
§legacy_sort_index: Option<i32>
To support old UI. New UI should determine default sorting by thread_type.
Implementations§
Source§impl ThreadDescriptor
impl ThreadDescriptor
Sourcepub fn legacy_sort_index(&self) -> i32
pub fn legacy_sort_index(&self) -> i32
Returns the value of legacy_sort_index
, or the default value if legacy_sort_index
is unset.
Sourcepub fn chrome_thread_type(&self) -> ChromeThreadType
pub fn chrome_thread_type(&self) -> ChromeThreadType
Returns the enum value of chrome_thread_type
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_chrome_thread_type(&mut self, value: ChromeThreadType)
pub fn set_chrome_thread_type(&mut self, value: ChromeThreadType)
Sets chrome_thread_type
to the provided enum value.
Sourcepub fn thread_name(&self) -> &str
pub fn thread_name(&self) -> &str
Returns the value of thread_name
, or the default value if thread_name
is unset.
Sourcepub fn reference_timestamp_us(&self) -> i64
pub fn reference_timestamp_us(&self) -> i64
Returns the value of reference_timestamp_us
, or the default value if reference_timestamp_us
is unset.
Sourcepub fn reference_thread_time_us(&self) -> i64
pub fn reference_thread_time_us(&self) -> i64
Returns the value of reference_thread_time_us
, or the default value if reference_thread_time_us
is unset.
Sourcepub fn reference_thread_instruction_count(&self) -> i64
pub fn reference_thread_instruction_count(&self) -> i64
Returns the value of reference_thread_instruction_count
, or the default value if reference_thread_instruction_count
is unset.
Trait Implementations§
Source§impl Clone for ThreadDescriptor
impl Clone for ThreadDescriptor
Source§fn clone(&self) -> ThreadDescriptor
fn clone(&self) -> ThreadDescriptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ThreadDescriptor
impl Debug for ThreadDescriptor
Source§impl Default for ThreadDescriptor
impl Default for ThreadDescriptor
Source§impl Message for ThreadDescriptor
impl Message for ThreadDescriptor
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.