pub struct AdaptivePolicy {
pub fraction: f64,
pub ceiling: usize,
pub total_ram: u64,
pub max_rate: Option<u64>,
}Expand description
The controller’s tuning policy (its view of config; the TransferConfig
integration is a later gate).
Fields§
§fraction: f64Target operating fraction of the discovered knee (default 0.8): the
controller aims for fraction × knee for both concurrency and rate,
leaving headroom.
ceiling: usizeAbsolute concurrency ceiling; the limit never exceeds this.
total_ram: u64Total machine RAM in bytes, the denominator of the memory-budget
guardrail (limit × p95_obj_size ≤ fraction × total_ram). 0 disables
the memory cap.
max_rate: Option<u64>Optional hard cap on the target byte-rate (e.g. a user --max-rate).
None means rate is bounded only by the measured goodput knee.
Implementations§
Trait Implementations§
Source§impl Clone for AdaptivePolicy
impl Clone for AdaptivePolicy
Source§fn clone(&self) -> AdaptivePolicy
fn clone(&self) -> AdaptivePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AdaptivePolicy
Source§impl Debug for AdaptivePolicy
impl Debug for AdaptivePolicy
Auto Trait Implementations§
impl Freeze for AdaptivePolicy
impl RefUnwindSafe for AdaptivePolicy
impl Send for AdaptivePolicy
impl Sync for AdaptivePolicy
impl Unpin for AdaptivePolicy
impl UnsafeUnpin for AdaptivePolicy
impl UnwindSafe for AdaptivePolicy
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
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,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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 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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.