pub struct BoundedPlan {
pub calls: Option<usize>,
pub duration: Option<Duration>,
pub rate: f64,
pub seed: u64,
pub most_in_flight: usize,
pub cleanup: Duration,
}Expand description
Finite admission and cleanup limits for an externally controllable run.
Unlike Plan, either calls or duration may end admission. At least one must be present;
command layers validate that contract before calling this harness.
Fields§
§calls: Option<usize>Maximum calls admitted, if count-bounded.
duration: Option<Duration>Maximum time during which calls may be admitted, if time-bounded. A duration beyond the runtime clock’s range closes admission immediately rather than panicking; command layers should reject it as invalid input.
rate: f64Calls admitted per second.
seed: u64Reproducible arrival-jitter seed.
most_in_flight: usizeMaximum simultaneously active calls.
The harness normalizes zero to one and values above Tokio’s semaphore ceiling to that ceiling so a programmatically constructed plan cannot panic. User-facing command layers should reject either value and report the invalid configuration instead.
cleanup: DurationTime allowed for every owned call to acknowledge stop and finish.
Trait Implementations§
Source§impl Clone for BoundedPlan
impl Clone for BoundedPlan
Source§fn clone(&self) -> BoundedPlan
fn clone(&self) -> BoundedPlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BoundedPlan
impl Debug for BoundedPlan
impl Copy for BoundedPlan
Auto Trait Implementations§
impl Freeze for BoundedPlan
impl RefUnwindSafe for BoundedPlan
impl Send for BoundedPlan
impl Sync for BoundedPlan
impl Unpin for BoundedPlan
impl UnsafeUnpin for BoundedPlan
impl UnwindSafe for BoundedPlan
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
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>
§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