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: usizeFixed concurrency c.
warmup_requests: usizeWarmup requests, discarded and never written to the receipt.
quiesce: DurationQuiesce between warmup completion and the first sampled request.
min_samples: usizeMinimum sampled requests to issue before the window may close.
min_wall_clock: DurationMinimum wall-clock the window must stay open.
request_timeout: DurationHard 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: ClientModelRecorded, not assumed.
Implementations§
Source§impl BandConfig
impl BandConfig
Sourcepub fn conformant(concurrency: usize) -> Self
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.
Sourcepub fn relaxed(
concurrency: usize,
min_samples: usize,
min_wall_clock: Duration,
quiesce: Duration,
) -> Self
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.
Sourcepub fn relaxed_with_cooldown(
concurrency: usize,
min_samples: usize,
min_wall_clock: Duration,
quiesce: Duration,
cooldown: Duration,
) -> Self
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.
Sourcepub fn conformance_violations(&self) -> Vec<String>
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.
Sourcepub fn conformance_violations_against(
&self,
params: &ProtocolParams,
) -> Vec<String>
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.
Sourcepub fn is_conformant(&self) -> bool
pub fn is_conformant(&self) -> bool
True when Self::conformance_violations is empty.
Trait Implementations§
Source§impl Clone for BandConfig
impl Clone for BandConfig
Source§impl Debug for BandConfig
impl Debug for BandConfig
Source§impl<'de> Deserialize<'de> for BandConfig
impl<'de> Deserialize<'de> for BandConfig
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 BandConfig
Source§impl PartialEq for BandConfig
impl PartialEq for BandConfig
Source§impl Serialize for BandConfig
impl Serialize for BandConfig
impl StructuralPartialEq for BandConfig
Auto Trait Implementations§
impl Freeze for BandConfig
impl RefUnwindSafe for BandConfig
impl Send for BandConfig
impl Sync for BandConfig
impl Unpin for BandConfig
impl UnsafeUnpin for BandConfig
impl UnwindSafe for BandConfig
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§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> 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