Enum TraceRow

Source
pub enum TraceRow<'a> {
    Start {
        ts: u64,
        id: u64,
        parent: Option<u64>,
        name: Cow<'a, str>,
        target: Cow<'a, str>,
        values: Vec<(Cow<'a, str>, TraceValue<'a>)>,
    },
    End {
        ts: u64,
        id: u64,
    },
    Enter {
        ts: u64,
        id: u64,
        thread_id: u64,
    },
    Exit {
        ts: u64,
        id: u64,
        thread_id: u64,
    },
    Event {
        ts: u64,
        parent: Option<u64>,
        values: Vec<(Cow<'a, str>, TraceValue<'a>)>,
    },
    Record {
        id: u64,
        values: Vec<(Cow<'a, str>, TraceValue<'a>)>,
    },
    Allocation {
        ts: u64,
        thread_id: u64,
        allocations: u64,
        allocation_count: u64,
        deallocations: u64,
        deallocation_count: u64,
    },
    AllocationCounters {
        ts: u64,
        thread_id: u64,
        allocations: u64,
        allocation_count: u64,
        deallocations: u64,
        deallocation_count: u64,
    },
}
Expand description

A raw trace line.

Variants§

§

Start

A new span has been started, but not entered yet.

Fields

§ts: u64

Timestamp

§id: u64

Unique id for this span.

§parent: Option<u64>

Id of the parent span, if any.

§name: Cow<'a, str>

The name of the span.

§target: Cow<'a, str>

The target of the span.

§values: Vec<(Cow<'a, str>, TraceValue<'a>)>

A list of key-value pairs for all attributes of the span.

§

End

A span has ended. The id might be reused in future.

Fields

§ts: u64

Timestamp

§id: u64

Unique id for this span. Must be created by a Start event before.

§

Enter

A span has been entered. This means it is spending CPU time now.

Fields

§ts: u64

Timestamp

§id: u64

Unique id for this span. Must be created by a Start event before.

§thread_id: u64

The thread id of the thread that entered the span.

§

Exit

A span has been exited. This means it is not spending CPU time anymore.

Fields

§ts: u64

Timestamp

§id: u64

Unique id for this span. Must be entered by a Enter event before.

§thread_id: u64

The thread id of the thread that exits the span.

§

Event

A event has happened for some span.

Fields

§ts: u64

Timestamp

§parent: Option<u64>

Id of the parent span, if any.

§values: Vec<(Cow<'a, str>, TraceValue<'a>)>

A list of key-value pairs for all attributes of the event.

§

Record

Additional fields for a span

Fields

§id: u64

Unique id for this span. Must be created by a Start event before.

§values: Vec<(Cow<'a, str>, TraceValue<'a>)>

A list of key-value pairs for all attributes of the span.

§

Allocation

Data about (de)allocations that happened

Fields

§ts: u64

Timestamp

§thread_id: u64

The thread id of the thread where allocations happend.

§allocations: u64

Allocations

§allocation_count: u64

Allocation count

§deallocations: u64

Deallocations

§deallocation_count: u64

Deallocation count

§

AllocationCounters

Data about (de)allocations per thread counters. Actual allocations can be computed from the difference.

Fields

§ts: u64

Timestamp

§thread_id: u64

The thread id of the thread where allocations happend.

§allocations: u64

Allocations

§allocation_count: u64

Allocation count

§deallocations: u64

Deallocations

§deallocation_count: u64

Deallocation count

Trait Implementations§

Source§

impl<'a> Debug for TraceRow<'a>

Source§

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

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

impl<'de: 'a, 'a> Deserialize<'de> for TraceRow<'a>

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<'a> Serialize for TraceRow<'a>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for TraceRow<'a>

§

impl<'a> RefUnwindSafe for TraceRow<'a>

§

impl<'a> Send for TraceRow<'a>

§

impl<'a> Sync for TraceRow<'a>

§

impl<'a> Unpin for TraceRow<'a>

§

impl<'a> UnwindSafe for TraceRow<'a>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, 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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,