pub struct PacedBench {
pub streams: usize,
pub deadline: Duration,
pub wall: Duration,
pub service: Vec<Duration>,
pub added: Vec<Duration>,
pub admissions: usize,
pub starved: usize,
pub admitting: Vec<Duration>,
}Expand description
What streams paced streams did against that clock: how long each turn took
to run, and how late each one completed against the moment its input
arrived. The second is what a real-time load is judged on – it holds the
queueing a turn waited through as well as its own run.
Fields§
§streams: usize§deadline: Duration§wall: Duration§service: Vec<Duration>One entry per turn, over every stream, sorted.
added: Vec<Duration>One entry per turn, over every stream, sorted.
admissions: usizeSessions admitted over the trial: one per stream without churn, and however many the holding time turned over with it.
starved: usizeAdmissions which found every lane held and had to wait for one.
admitting: Vec<Duration>What each admission waited between asking for a session and getting one, sorted. An autobatch runtime answers on its worker, between turns, so this holds the turn in flight as well as the lane’s own reset – it is the wait, not the cost of the reset. Read it at a quantile: every seat’s first admission lands in one storm at the start of the trial, so a mean over a short trial is mostly that storm.
Implementations§
Source§impl PacedBench
impl PacedBench
Sourcepub fn admissions_per_second(&self) -> f64
pub fn admissions_per_second(&self) -> f64
Sessions admitted per second: how fast the lanes turn over.
Sourcepub fn admission_quantile(&self, q: f64) -> Duration
pub fn admission_quantile(&self, q: f64) -> Duration
The wait q of the admissions came in under, q in 0..1.
Sourcepub fn starve_fraction(&self) -> f64
pub fn starve_fraction(&self) -> f64
The share of admissions which waited for a lane.
pub fn turns(&self) -> usize
pub fn turns_per_second(&self) -> f64
pub fn mean_service(&self) -> Duration
Sourcepub fn added_quantile(&self, q: f64) -> Duration
pub fn added_quantile(&self, q: f64) -> Duration
The added latency q of the turns came in under, q in 0..1.
Sourcepub fn late_fraction(&self) -> f64
pub fn late_fraction(&self) -> f64
The share of turns which completed past the deadline.
Auto Trait Implementations§
impl Freeze for PacedBench
impl RefUnwindSafe for PacedBench
impl Send for PacedBench
impl Sync for PacedBench
impl Unpin for PacedBench
impl UnsafeUnpin for PacedBench
impl UnwindSafe for PacedBench
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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