pub struct TraceDocument {
pub schema: String,
pub run: TraceRunMeta,
pub spans: Vec<SpanRecord>,
pub ops: Vec<OpEvent>,
pub tensors: Vec<TensorEvent>,
pub tensor_stats: Vec<TensorStatsEvent>,
pub memory: Vec<MemoryEvent>,
pub device_memory: Vec<DeviceMemoryEvent>,
pub device_intervals: Vec<DeviceIntervalEvent>,
pub gradients: Vec<GradientEvent>,
pub edges: Vec<EdgeEvent>,
pub terminal: TerminalEvent,
}Expand description
Full trace document assembled from JSONL events.
Fields§
§schema: String§run: TraceRunMeta§spans: Vec<SpanRecord>§ops: Vec<OpEvent>§tensors: Vec<TensorEvent>§tensor_stats: Vec<TensorStatsEvent>§memory: Vec<MemoryEvent>§device_memory: Vec<DeviceMemoryEvent>§device_intervals: Vec<DeviceIntervalEvent>§gradients: Vec<GradientEvent>§edges: Vec<EdgeEvent>§terminal: TerminalEventImplementations§
Source§impl TraceDocument
impl TraceDocument
Sourcepub fn from_events(events: impl IntoIterator<Item = TraceEvent>) -> Result<Self>
pub fn from_events(events: impl IntoIterator<Item = TraceEvent>) -> Result<Self>
Build a document from an ordered event stream (meta must be first).
Sourcepub fn build_summary(&self) -> TraceSummary
pub fn build_summary(&self) -> TraceSummary
Profiler summary: op count, total wall time, span tree shape, memory totals.
Sourcepub fn to_events(&self) -> Vec<TraceEvent>
pub fn to_events(&self) -> Vec<TraceEvent>
Flatten the document back into JSONL events (meta first, then body in stable order).
Trait Implementations§
Source§impl Clone for TraceDocument
impl Clone for TraceDocument
Source§fn clone(&self) -> TraceDocument
fn clone(&self) -> TraceDocument
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TraceDocument
impl Debug for TraceDocument
Source§impl<'de> Deserialize<'de> for TraceDocument
impl<'de> Deserialize<'de> for TraceDocument
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for TraceDocument
impl PartialEq for TraceDocument
Source§impl Serialize for TraceDocument
impl Serialize for TraceDocument
impl StructuralPartialEq for TraceDocument
Auto Trait Implementations§
impl Freeze for TraceDocument
impl RefUnwindSafe for TraceDocument
impl Send for TraceDocument
impl Sync for TraceDocument
impl Unpin for TraceDocument
impl UnsafeUnpin for TraceDocument
impl UnwindSafe for TraceDocument
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more