pub struct IngestReport { /* private fields */ }Expand description
Cloneable handle shared by the parser, hasher collector, and merge.
Implementations§
Source§impl IngestReport
impl IngestReport
Sourcepub fn new(
verbose: u8,
sink: impl Fn(&IngestSnapshot) + Send + Sync + 'static,
) -> Self
pub fn new( verbose: u8, sink: impl Fn(&IngestSnapshot) + Send + Sync + 'static, ) -> Self
Reporter at verbose level invoking sink on each snapshot.
Sourcepub fn text_stderr(verbose: u8) -> Self
pub fn text_stderr(verbose: u8) -> Self
Human-readable text progress to stderr.
Sourcepub fn json_stdout(verbose: u8) -> Self
pub fn json_stdout(verbose: u8) -> Self
Machine-readable JSON progress to stdout.
Sourcepub fn set_workers(&mut self, workers: u32)
pub fn set_workers(&mut self, workers: u32)
Record the configured worker count.
Sourcepub fn set_source_bytes(&self, n: u64)
pub fn set_source_bytes(&self, n: u64)
Record total source bytes.
Sourcepub fn add_bytes_read(&self, n: u64)
pub fn add_bytes_read(&self, n: u64)
Add n to bytes read.
Sourcepub fn set_triples(&self, n: u64)
pub fn set_triples(&self, n: u64)
Record triples produced.
Sourcepub fn set_interned(&self, n: u64)
pub fn set_interned(&self, n: u64)
Record interned-term count.
Sourcepub fn add_lex_run(&self)
pub fn add_lex_run(&self)
Increment the lex-run counter.
Sourcepub fn add_quin_chunk(&self)
pub fn add_quin_chunk(&self)
Increment the quin-chunk counter.
Sourcepub fn add_sort_ms(&self, ms: u64)
pub fn add_sort_ms(&self, ms: u64)
Add ms to cumulative sort time.
Sourcepub fn set_parse_ms(&self, ms: u64)
pub fn set_parse_ms(&self, ms: u64)
Record parse time.
Sourcepub fn set_publish_ms(&self, ms: u64)
pub fn set_publish_ms(&self, ms: u64)
Record publish time.
Sourcepub fn set_skip_target(&self, n: u64)
pub fn set_skip_target(&self, n: u64)
Record the skip target.
Sourcepub fn set_quin_chunks(&self, n: u64)
pub fn set_quin_chunks(&self, n: u64)
Set the quin-chunk counter.
Sourcepub fn set_lex_runs(&self, n: u64)
pub fn set_lex_runs(&self, n: u64)
Set the lex-run counter.
Sourcepub fn quin_chunks(&self) -> u64
pub fn quin_chunks(&self) -> u64
Quin-chunk counter.
Sourcepub fn attach_progress_file(&self, path: PathBuf)
pub fn attach_progress_file(&self, path: PathBuf)
Durable snapshot for a job directory (progress.json). Does not change
checkpoint.triples — that is accepted work only.
Sourcepub fn note_sink(&self) -> Arc<dyn Fn(&str) + Send + Sync> ⓘ
pub fn note_sink(&self) -> Arc<dyn Fn(&str) + Send + Sync> ⓘ
Shared callback for free-form note lines.
Sourcepub fn emit(
&self,
phase: IngestPhase,
message: impl Into<String>,
detail: Option<String>,
)
pub fn emit( &self, phase: IngestPhase, message: impl Into<String>, detail: Option<String>, )
Emit a phase event: update counters from detail, invoke the sink when verbosity permits, write the progress file.
Sourcepub fn maybe_tick(&self, phase: IngestPhase, triples: u64)
pub fn maybe_tick(&self, phase: IngestPhase, triples: u64)
Throttled parse tick: every 2M triples or 2 seconds.
Sourcepub fn maybe_tick_skip(&self, replayed: u64, target: u64)
pub fn maybe_tick_skip(&self, replayed: u64, target: u64)
Skip-N replay tick. replayed is how many already-accepted triples this
pass has walked; target is checkpoint.triples. Does not mean new work.
Sourcepub fn snapshot(
&self,
phase: IngestPhase,
message: String,
detail: Option<String>,
) -> IngestSnapshot
pub fn snapshot( &self, phase: IngestPhase, message: String, detail: Option<String>, ) -> IngestSnapshot
Build an IngestSnapshot for phase/message from the live
counters, computing rates, percent-complete, and ETA.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for IngestReport
impl !UnwindSafe for IngestReport
impl Freeze for IngestReport
impl Send for IngestReport
impl Sync for IngestReport
impl Unpin for IngestReport
impl UnsafeUnpin for IngestReport
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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