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: f64The base timeout which will always be there (an estimate of RTT)
timeout_fraction: f64Timeout is set to a fraction of expected upload time (> 1.0)
backoff: f64Every retry, the timeout is multiplied by backoff (> 1.0)
n_retries: usizeNumber of times to retry a single request before giving up
avg_power: f64To 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