Skip to main content

BandConfig

Struct BandConfig 

Source
pub struct BandConfig {
    pub concurrency: usize,
    pub warmup_requests: usize,
    pub quiesce: Duration,
    pub min_samples: usize,
    pub min_wall_clock: Duration,
    pub request_timeout: Duration,
    pub cooldown: Duration,
    pub client_model: ClientModel,
}
Expand description

One band’s measurement parameters.

BandConfig::conformant is the only constructor that produces §4.4-legal values. BandConfig::relaxed exists so unit tests can exercise the driver in milliseconds instead of minutes — and every run carries BandConfig::conformance_violations into its receipt, so a relaxed run is self-identifying rather than indistinguishable from a real one. A knob that lets you shrink the window without saying so is how a gate stops being able to fail.

Fields§

§concurrency: usize

Fixed concurrency c.

§warmup_requests: usize

Warmup requests, discarded and never written to the receipt.

§quiesce: Duration

Quiesce between warmup completion and the first sampled request.

§min_samples: usize

Minimum sampled requests to issue before the window may close.

§min_wall_clock: Duration

Minimum wall-clock the window must stay open.

§request_timeout: Duration

Hard per-request timeout.

§cooldown: Duration

§5.1 — the pause between the two lanes of one interleaved replicate. Without it the second lane inherits the first lane’s thermal and VRAM state, which is the drift interleaving exists to cancel.

§client_model: ClientModel

Recorded, not assumed.

Implementations§

Source§

impl BandConfig

Source

pub fn conformant(concurrency: usize) -> Self

The §4.4-conformant configuration for concurrency c.

§Panics

Never; concurrency of 0 is clamped to 1 so the worker pool always has a worker. A zero-worker band is unrepresentable rather than empty.

Source

pub fn relaxed( concurrency: usize, min_samples: usize, min_wall_clock: Duration, quiesce: Duration, ) -> Self

A shrunken configuration for tests and smoke runs. Never conformant: Self::conformance_violations is non-empty by construction unless the caller happens to pass the spec values back in.

Source

pub fn relaxed_with_cooldown( concurrency: usize, min_samples: usize, min_wall_clock: Duration, quiesce: Duration, cooldown: Duration, ) -> Self

Self::relaxed with the §5.1 cooldown shrunk too, for tests that must exercise the cooldown departure itself.

Source

pub fn conformance_violations(&self) -> Vec<String>

Every way this configuration departs from the protocol, in prose, for the receipt.

Compares against ProtocolParams::effective — the protocol: block of perf-matrix.yaml when it exists (PP-33), the spec fallback otherwise — so amending the matrix moves this predicate rather than a Rust literal.

Source

pub fn conformance_violations_against( &self, params: &ProtocolParams, ) -> Vec<String>

Self::conformance_violations against explicit parameters, so a test can prove the predicate reads the loaded block and not a constant.

Source

pub fn is_conformant(&self) -> bool

True when Self::conformance_violations is empty.

Trait Implementations§

Source§

impl Clone for BandConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BandConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BandConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for BandConfig

Source§

impl PartialEq for BandConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for BandConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for BandConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.