Struct android_trace_log::AndroidTraceLog[][src]

pub struct AndroidTraceLog {
    pub data_file_overflow: bool,
    pub clock: Clock,
    pub elapsed_time: Duration,
    pub total_method_calls: u64,
    pub clock_call_overhead: Duration,
    pub vm: Vm,
    pub start_time: DateTime<Utc>,
    pub pid: Option<u32>,
    pub gc_trace: Option<GcTrace>,
    pub threads: Vec<Thread>,
    pub methods: Vec<Method>,
    pub events: Vec<Event>,

Android trace log


data_file_overflow: bool

Whether the trace has overflowed the trace buffer and is missing events

clock: Clock

The clock used for the events

elapsed_time: Duration

Total recording duration

total_method_calls: u64

Total number of calls registered

clock_call_overhead: Duration

The approximate trace overhead per call

vm: Vm

The process VM used

start_time: DateTime<Utc>

Trace start time

pid: Option<u32>

PID of the traced process

gc_trace: Option<GcTrace>

If GC is being tracked, contains the GC trace info

threads: Vec<Thread>

All threads in the trace log

methods: Vec<Method>

All methods in the trace log

events: Vec<Event>

All events in the trace log


impl AndroidTraceLog[src]

pub fn valid(&self) -> bool[src]

Verifies the object can be serialized and iterated over

pub fn serialize_into<W: Write>(&self, w: &mut W) -> Result<()>[src]

Serialize the trace into a Write object

Panics if using global clock (only used in file version 1) with 2-byte thread IDs (only used in file version 2+) or if some event's time doesn't match the trace's clock value. Will not panic if valid returned true.

pub fn serialize(&self) -> Result<Vec<u8>>[src]

Serialize the trace into a byte array. Can panic if the log is invalid; see serialize_into

pub fn iter(&self) -> impl Iterator<Item = EventView<'_>>[src]

Iterate over all events while preparing an event view that allows to quickly access an event's thread and method. Has some startup time due to needing to prepare method/thread lookup tables.

Panics if an event has an invalid method/thread ID. Will not panic if valid returned true.

Trait Implementations

impl Clone for AndroidTraceLog[src]

impl Debug for AndroidTraceLog[src]

impl Eq for AndroidTraceLog[src]

impl PartialEq<AndroidTraceLog> for AndroidTraceLog[src]

impl StructuralEq for AndroidTraceLog[src]

impl StructuralPartialEq for AndroidTraceLog[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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

type Error = Infallible

The type returned in the event of a conversion error.

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.