pub struct SentinelBudget {
pub charges: Vec<(u64, u64)>,
pub last_honor_unix: u64,
}Expand description
The work meter (D3.1 — the hot-loops no-regression rule).
A counted budget charges a hot 2 GiB checkpoint the same one unit as
a 4 KiB file, so a storming agent could drive dirty_bytes × 60/hour
of extra upload while staying inside a green budget — a regression on
the one performance sub-axis lean currently maxes (a tight local
loop’s republish is coalesced by cadence; sentinels un-coalesce it on
demand). Metering work instead bounds sentinel-driven published bytes
at budget × whole_put_max per hour independent of dirty-set size,
and a workspace at the cap degrades to exactly today’s cadence
behavior — the definition of no regression.
Fields§
§charges: Vec<(u64, u64)>(unix, units) charges inside the rolling hour.
last_honor_unix: u64The last sentinel-honoring barrier, for the min-interval.
Implementations§
Trait Implementations§
Source§impl Clone for SentinelBudget
impl Clone for SentinelBudget
Source§impl Debug for SentinelBudget
impl Debug for SentinelBudget
Source§impl Default for SentinelBudget
impl Default for SentinelBudget
Source§impl<'de> Deserialize<'de> for SentinelBudget
impl<'de> Deserialize<'de> for SentinelBudget
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SentinelBudget
impl RefUnwindSafe for SentinelBudget
impl Send for SentinelBudget
impl Sync for SentinelBudget
impl Unpin for SentinelBudget
impl UnsafeUnpin for SentinelBudget
impl UnwindSafe for SentinelBudget
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
Mutably borrows from an owned value. Read more