pub struct TraceArchive {
pub metadata: TraceMetadata,
pub spans: Vec<TracedSpan>,
pub events: Vec<TracedEvent>,
pub network_events: Vec<NetworkEvent>,
pub console_messages: Vec<ConsoleMessage>,
}Expand description
Complete trace archive
Fields§
§metadata: TraceMetadataTrace metadata
spans: Vec<TracedSpan>All traced spans
events: Vec<TracedEvent>All traced events
network_events: Vec<NetworkEvent>Network events
console_messages: Vec<ConsoleMessage>Console messages
Implementations§
Source§impl TraceArchive
impl TraceArchive
Sourcepub fn new(metadata: TraceMetadata) -> Self
pub fn new(metadata: TraceMetadata) -> Self
Create a new archive
Sourcepub fn save_json(&self, path: &Path) -> ProbarResult<()>
pub fn save_json(&self, path: &Path) -> ProbarResult<()>
Save archive to JSON file
Sourcepub fn load_json(path: &Path) -> ProbarResult<Self>
pub fn load_json(path: &Path) -> ProbarResult<Self>
Load archive from JSON file
Sourcepub fn spans_by_name(&self, name: &str) -> Vec<&TracedSpan>
pub fn spans_by_name(&self, name: &str) -> Vec<&TracedSpan>
Get spans by name
Sourcepub fn events_by_category(&self, category: EventCategory) -> Vec<&TracedEvent>
pub fn events_by_category(&self, category: EventCategory) -> Vec<&TracedEvent>
Get events by category
Sourcepub fn failed_requests(&self) -> Vec<&NetworkEvent>
pub fn failed_requests(&self) -> Vec<&NetworkEvent>
Get failed network requests
Sourcepub fn error_spans(&self) -> Vec<&TracedSpan>
pub fn error_spans(&self) -> Vec<&TracedSpan>
Get error spans
Trait Implementations§
Source§impl Clone for TraceArchive
impl Clone for TraceArchive
Source§fn clone(&self) -> TraceArchive
fn clone(&self) -> TraceArchive
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 TraceArchive
impl Debug for TraceArchive
Source§impl<'de> Deserialize<'de> for TraceArchive
impl<'de> Deserialize<'de> for TraceArchive
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
Auto Trait Implementations§
impl Freeze for TraceArchive
impl RefUnwindSafe for TraceArchive
impl Send for TraceArchive
impl Sync for TraceArchive
impl Unpin for TraceArchive
impl UnsafeUnpin for TraceArchive
impl UnwindSafe for TraceArchive
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
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>,
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