Struct s3_algo::AlgorithmConfig
source · pub struct AlgorithmConfig {
pub base_timeout: f64,
pub timeout_fraction: f64,
pub backoff: f64,
pub n_retries: usize,
pub avg_power: f64,
}
Fields§
§base_timeout: f64
The base timeout which will always be there (an estimate of RTT)
timeout_fraction: f64
Timeout is set to a fraction of expected upload time (> 1.0)
backoff: f64
Every retry, the timeout is multiplied by backoff (> 1.0)
n_retries: usize
Number of times to retry a single request before giving up
avg_power: f64
To estimate the upload speed incrementally, we use an exponential average:
new_avg_speed = avg_power * new_speed + (1 - avg_power) * avg_speed
.
Thus, between 0.0 and 1.0, closer to 1.0 means that newer data points have more significance.
Trait Implementations§
source§impl Clone for AlgorithmConfig
impl Clone for AlgorithmConfig
source§fn clone(&self) -> AlgorithmConfig
fn clone(&self) -> AlgorithmConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AlgorithmConfig
impl Debug for AlgorithmConfig
source§impl Default for AlgorithmConfig
impl Default for AlgorithmConfig
source§impl<'de> Deserialize<'de> for AlgorithmConfig
impl<'de> Deserialize<'de> for AlgorithmConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for AlgorithmConfig
impl Send for AlgorithmConfig
impl Sync for AlgorithmConfig
impl Unpin for AlgorithmConfig
impl UnwindSafe for AlgorithmConfig
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
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>
Creates a shared type from an unshared type.