pub struct ScheduleTrace { /* private fields */ }Expand description
The main schedule trace recorder.
Implementations§
Source§impl ScheduleTrace
impl ScheduleTrace
Sourcepub fn with_config(config: TraceConfig) -> Self
pub fn with_config(config: TraceConfig) -> Self
Create with custom configuration.
Sourcepub fn advance_tick(&mut self)
pub fn advance_tick(&mut self)
Advance the logical tick.
Sourcepub fn record_with_queue_state(
&mut self,
event: TaskEvent,
queued: usize,
running: usize,
)
pub fn record_with_queue_state( &mut self, event: TaskEvent, queued: usize, running: usize, )
Record an event with queue state and optional auto-snapshot.
Sourcepub fn record_with_queue_state_at(
&mut self,
event: TaskEvent,
queued: usize,
running: usize,
now: Instant,
)
pub fn record_with_queue_state_at( &mut self, event: TaskEvent, queued: usize, running: usize, now: Instant, )
Record an event with queue state at a specific time (deterministic tests).
Sourcepub fn spawn(&mut self, task_id: u64, priority: u8, name: Option<String>)
pub fn spawn(&mut self, task_id: u64, priority: u8, name: Option<String>)
Record a spawn event.
Sourcepub fn cancel(&mut self, task_id: u64, reason: CancelReason)
pub fn cancel(&mut self, task_id: u64, reason: CancelReason)
Record a cancelled event.
Sourcepub fn entries(&self) -> &VecDeque<TraceEntry>
pub fn entries(&self) -> &VecDeque<TraceEntry>
Get all entries.
Sourcepub fn snapshot_sampling_summary(&self) -> Option<VoiSummary>
pub fn snapshot_sampling_summary(&self) -> Option<VoiSummary>
Snapshot sampling summary, if enabled.
Sourcepub fn snapshot_sampling_logs_jsonl(&self) -> Option<String>
pub fn snapshot_sampling_logs_jsonl(&self) -> Option<String>
Snapshot sampling logs rendered as JSONL, if enabled.
Sourcepub fn checksum(&self) -> u64
pub fn checksum(&self) -> u64
Compute FNV-1a checksum of the trace.
This checksum is stable across platforms and can be used for golden comparisons.
Sourcepub fn checksum_hex(&self) -> String
pub fn checksum_hex(&self) -> String
Compute checksum as hex string.
Source§impl ScheduleTrace
impl ScheduleTrace
Sourcepub fn summary(&self) -> TraceSummary
pub fn summary(&self) -> TraceSummary
Generate summary statistics.
Trait Implementations§
Source§impl Clone for ScheduleTrace
impl Clone for ScheduleTrace
Source§fn clone(&self) -> ScheduleTrace
fn clone(&self) -> ScheduleTrace
Returns a duplicate of the value. Read more
1.0.0 · 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 ScheduleTrace
impl Debug for ScheduleTrace
Auto Trait Implementations§
impl Freeze for ScheduleTrace
impl RefUnwindSafe for ScheduleTrace
impl Send for ScheduleTrace
impl Sync for ScheduleTrace
impl Unpin for ScheduleTrace
impl UnwindSafe for ScheduleTrace
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