pub struct Consumed {
pub steps: usize,
pub effects: usize,
pub spend: Spend,
pub elapsed_secs: u64,
pub denials: u32,
pub egress_bytes: u64,
}Expand description
Running totals for one run.
Fields§
§steps: usize§effects: usizeEffects dispatched, not effects that succeeded.
A call that fails still consumed a call — it occupied a connection, hit a rate limit, and may have cost money on the way to failing. Counting only successes leaves the one loop a ceiling most needs to stop, a failing call retried forever, costing nothing on paper.
spend: Spend§elapsed_secs: u64Whole seconds between the first and last journaled clock reading.
A difference of unix timestamps rather than a duration, so it counts
second boundaries crossed: the same 1.4 s of work reads as 1 or 2
depending on where in a second it began, and two runs of one workload
can report different figures. That is deliberate and is what makes the
ceiling replayable — a duration measured off the wall clock would give a
different verdict on every look, and a resumed run would replay as
healthy. What it costs is that this is not a stopwatch: a ceiling set
close to a step’s real cost admits a step at one starting instant and
refuses the same step a fraction of a second later.
denials: u32Policy refusals this run has accrued.
egress_bytes: u64Bytes this run has sent into sinks.
Accumulated from each announced attempt’s outbound value, on the pass
that announces it and on every pass that replays it. Recomputed from the
effect rather than read back from the record, which is sound here and
not for spend: the outbound value lives inside descriptor.args and so
inside the effect key, and a value that changed would diverge before it
could be billed. Spend has no such cover, which is why it is journaled.
Trait Implementations§
impl Copy for Consumed
Source§impl<'de> Deserialize<'de> for Consumed
impl<'de> Deserialize<'de> for Consumed
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Consumed
impl StructuralPartialEq for Consumed
Auto Trait Implementations§
impl Freeze for Consumed
impl RefUnwindSafe for Consumed
impl Send for Consumed
impl Sync for Consumed
impl Unpin for Consumed
impl UnsafeUnpin for Consumed
impl UnwindSafe for Consumed
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<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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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