pub struct RunJournal {
pub run_id: String,
pub export_name: String,
pub entries: Vec<JournalEntry>,
}Expand description
Canonical in-memory record of a pipeline run.
Accumulated during execution via record(). Query methods let callers
answer the four DoD questions without iterating entries directly.
Fields§
§run_id: String§export_name: String§entries: Vec<JournalEntry>All events in insertion order.
Implementations§
Source§impl RunJournal
impl RunJournal
pub fn new(run_id: impl Into<String>, export_name: impl Into<String>) -> Self
Sourcepub fn plan_snapshot(&self) -> Option<&PlanSnapshot>
pub fn plan_snapshot(&self) -> Option<&PlanSnapshot>
Returns the plan snapshot recorded at the start of the run.
Sourcepub fn files(&self) -> Vec<&JournalEntry>
pub fn files(&self) -> Vec<&JournalEntry>
All FileWritten entries, in the order files were committed.
Sourcepub fn retries(&self) -> Vec<&JournalEntry>
pub fn retries(&self) -> Vec<&JournalEntry>
All RetryAttempted entries.
Sourcepub fn chunk_events(&self) -> Vec<&JournalEntry>
pub fn chunk_events(&self) -> Vec<&JournalEntry>
All chunk lifecycle entries (ChunkStarted, ChunkCompleted, ChunkFailed).
Sourcepub fn longest_chunk_ms(&self) -> Option<i64>
pub fn longest_chunk_ms(&self) -> Option<i64>
The longest single-chunk wall time in milliseconds, if derivable.
Pairs each ChunkStarted with its ChunkCompleted by chunk_index
(robust to the interleaving the parallel runners produce) and returns the
largest gap. This is the #5 source-harm lever — how long one chunk query,
and the snapshot / locks it holds, stayed open — made measurable.
None when no pair is found: a non-chunked run, or a parallel runner that
records ChunkCompleted in a single post-scope batch (so no real
per-chunk start time exists). The sequential and checkpoint paths
timestamp each event as it happens, so they yield true per-chunk timings.
Sourcepub fn quality_issues(&self) -> Vec<&JournalEntry>
pub fn quality_issues(&self) -> Vec<&JournalEntry>
All QualityIssue entries (both FAIL and WARN severity).
Sourcepub fn schema_changes(&self) -> Vec<&JournalEntry>
pub fn schema_changes(&self) -> Vec<&JournalEntry>
All SchemaChanged entries.
Sourcepub fn warnings(&self) -> Vec<&JournalEntry>
pub fn warnings(&self) -> Vec<&JournalEntry>
All Warning and PlanWarning entries.
Sourcepub fn final_outcome(&self) -> Option<&JournalEntry>
pub fn final_outcome(&self) -> Option<&JournalEntry>
The last RunCompleted entry, or None if the run has not yet finished.
Trait Implementations§
Source§impl Clone for RunJournal
impl Clone for RunJournal
Source§fn clone(&self) -> RunJournal
fn clone(&self) -> RunJournal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more