Struct s3_algo::AlgorithmConfig [−][src]
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
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
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self