pub(crate) struct Counts {
processed: i32,
waiting: i32,
failed: i32,
moved_on: i32,
finding: Option<String>,
}Expand description
What a phase body did. Composite phases add up their flows’ counts with +=.
failed and waiting are disjoint parts of processed: each is counted only with the row, or
module, it describes.
Fields§
§processed: i32§waiting: i32Rows written with an answer that only means “not yet”, such as an enrolment not made.
failed: i32§moved_on: i32Rows another writer moved on before their answer could be written, which are not processed.
finding: Option<String>Implementations§
Source§impl Counts
impl Counts
Sourcepub(crate) fn processed(count: i64) -> Self
pub(crate) fn processed(count: i64) -> Self
A clean iteration that moved count rows; saturating, so an over-large sweep never reaches
the dashboard as negative throughput.
Sourcepub(crate) fn processed_with_failures(processed: i32, failed: i32) -> Self
pub(crate) fn processed_with_failures(processed: i32, failed: i32) -> Self
failed of the processed rows, or modules, ended up carrying an error.
pub(crate) fn all_failed(count: i32) -> Self
Sourcepub(crate) fn with_finding(self, finding: Option<String>) -> Self
pub(crate) fn with_finding(self, finding: Option<String>) -> Self
Something the phase found wrong that failed no row, such as a missing mail template: the iteration’s error when no request failed.
Sourcepub(crate) fn record_decided(&mut self, is_failure: bool)
pub(crate) fn record_decided(&mut self, is_failure: bool)
One row a decision was written for without asking the registry.
fn record_verdict(&mut self, is_failure: bool, is_waiting: bool)
Sourcepub(crate) fn record_applied(&mut self, registration_id: Uuid, applied: Applied)
pub(crate) fn record_applied(&mut self, registration_id: Uuid, applied: Applied)
One answered or refused row’s write. A row that had already moved on is only logged at debug: the batch summary reports it, and a study registry outage can make it routine.
Sourcepub(crate) fn processed_count(&self) -> i32
pub(crate) fn processed_count(&self) -> i32
The rows, or modules, the iteration wrote a decision for.
Sourcepub(crate) fn waiting_count(&self) -> i32
pub(crate) fn waiting_count(&self) -> i32
How many of the processed ones ended up waiting for something, which is no failure.
Sourcepub(crate) fn failed_count(&self) -> i32
pub(crate) fn failed_count(&self) -> i32
How many of the processed ones ended up carrying an error code other than a waiting one.
pub(crate) fn moved_on_count(&self) -> i32
pub(crate) fn into_finding(self) -> Option<String>
Trait Implementations§
Source§impl AddAssign for Counts
impl AddAssign for Counts
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
+= operation. Read moreAuto Trait Implementations§
impl Freeze for Counts
impl RefUnwindSafe for Counts
impl Send for Counts
impl Sync for Counts
impl Unpin for Counts
impl UnsafeUnpin for Counts
impl UnwindSafe for Counts
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].