pub struct ExecutionTracer { /* private fields */ }Expand description
Execution tracer
Implementations§
Source§impl ExecutionTracer
impl ExecutionTracer
Sourcepub fn new(test_name: &str, config: TracingConfig) -> Self
pub fn new(test_name: &str, config: TracingConfig) -> Self
Create a new execution tracer
Sourcepub fn stop(&mut self) -> TraceArchive
pub fn stop(&mut self) -> TraceArchive
Stop tracing and return archive
Sourcepub fn elapsed_ms(&self) -> u64
pub fn elapsed_ms(&self) -> u64
Get elapsed time in milliseconds
Sourcepub fn start_span(&mut self, name: &str) -> String
pub fn start_span(&mut self, name: &str) -> String
Start a new span
Sourcepub fn error_span(&mut self, span_id: &str, message: &str)
pub fn error_span(&mut self, span_id: &str, message: &str)
Mark a span as error
Sourcepub fn record_event(&mut self, event: TracedEvent)
pub fn record_event(&mut self, event: TracedEvent)
Record an event
Sourcepub fn record_network(&mut self, event: NetworkEvent)
pub fn record_network(&mut self, event: NetworkEvent)
Record a network event
Sourcepub fn record_console(&mut self, message: ConsoleMessage)
pub fn record_console(&mut self, message: ConsoleMessage)
Record a console message
Sourcepub const fn is_running(&self) -> bool
pub const fn is_running(&self) -> bool
Check if tracing is running
Sourcepub fn span_count(&self) -> usize
pub fn span_count(&self) -> usize
Get current span count
Sourcepub fn event_count(&self) -> usize
pub fn event_count(&self) -> usize
Get current event count
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExecutionTracer
impl RefUnwindSafe for ExecutionTracer
impl Send for ExecutionTracer
impl Sync for ExecutionTracer
impl Unpin for ExecutionTracer
impl UnsafeUnpin for ExecutionTracer
impl UnwindSafe for ExecutionTracer
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> 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