Skip to main content

IngestReport

Struct IngestReport 

Source
pub struct IngestReport { /* private fields */ }
Expand description

Cloneable handle shared by the parser, hasher collector, and merge.

Implementations§

Source§

impl IngestReport

Source

pub fn silent() -> Self

Reporter that drops all output.

Source

pub fn new( verbose: u8, sink: impl Fn(&IngestSnapshot) + Send + Sync + 'static, ) -> Self

Reporter at verbose level invoking sink on each snapshot.

Source

pub fn text_stderr(verbose: u8) -> Self

Human-readable text progress to stderr.

Source

pub fn json_stdout(verbose: u8) -> Self

Machine-readable JSON progress to stdout.

Source

pub fn set_workers(&mut self, workers: u32)

Record the configured worker count.

Source

pub fn set_source_bytes(&self, n: u64)

Record total source bytes.

Source

pub fn add_bytes_read(&self, n: u64)

Add n to bytes read.

Source

pub fn set_triples(&self, n: u64)

Record triples produced.

Source

pub fn set_interned(&self, n: u64)

Record interned-term count.

Source

pub fn add_lex_run(&self)

Increment the lex-run counter.

Source

pub fn add_quin_chunk(&self)

Increment the quin-chunk counter.

Source

pub fn add_sort_ms(&self, ms: u64)

Add ms to cumulative sort time.

Source

pub fn set_parse_ms(&self, ms: u64)

Record parse time.

Source

pub fn set_publish_ms(&self, ms: u64)

Record publish time.

Source

pub fn set_skip_target(&self, n: u64)

Record the skip target.

Source

pub fn set_quin_chunks(&self, n: u64)

Set the quin-chunk counter.

Source

pub fn set_lex_runs(&self, n: u64)

Set the lex-run counter.

Source

pub fn quin_chunks(&self) -> u64

Quin-chunk counter.

Source

pub fn lex_runs(&self) -> u64

Lex-run counter.

Source

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.

Source

pub fn verbose(&self) -> u8

Verbosity level 0–2.

Source

pub fn note_sink(&self) -> Arc<dyn Fn(&str) + Send + Sync> ⓘ

Shared callback for free-form note lines.

Source

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.

Source

pub fn maybe_tick(&self, phase: IngestPhase, triples: u64)

Throttled parse tick: every 2M triples or 2 seconds.

Source

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.

Source

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§

Source§

impl Clone for IngestReport

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<S, A> Aggregate<Result<S, Error>> for A
where A: Aggregate<S>,

§

fn from_shares<T>(iter: T) -> Result<A, Error>
where T: IntoIterator<Item = Result<S, Error>>,

Aggregate shares in an MPC protocol.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more