pub struct TuneParams {
pub concurrency: usize,
pub upload_window: usize,
pub download_window: usize,
pub chunk_size: u64,
pub compress_level: i32,
}Expand description
The shared, live parameter table.
Fields§
§concurrency: usizeCross-file fan-out / global in-flight request cap.
upload_window: usizePer-file upload in-flight chunk window.
download_window: usizePer-file download in-flight chunk window.
chunk_size: u64Shared transfer chunk size for both uploads and parallel downloads.
compress_level: i32zrip level for this transfer’s compressed body.
Implementations§
Source§impl TuneParams
impl TuneParams
Sourcepub fn request_budget(&self) -> usize
pub fn request_budget(&self) -> usize
Concurrent HTTP requests this parameter set may keep in flight.
Sourcepub fn from_caps_mins(caps: &Capabilities) -> TuneParams
pub fn from_caps_mins(caps: &Capabilities) -> TuneParams
The parameter table at the server’s advertised minimums (ramp start).
Sourcepub fn from_config(
concurrency: usize,
upload_window: usize,
download_window: usize,
chunk_size: u64,
compress_level: i32,
caps: &Capabilities,
) -> TuneParams
pub fn from_config( concurrency: usize, upload_window: usize, download_window: usize, chunk_size: u64, compress_level: i32, caps: &Capabilities, ) -> TuneParams
A static table derived from the client configuration.
The configured values, level-resolved and clamped into the advertised caps — the table a transfer runs with while tuning is off.
Sourcepub fn clamped_into(&self, caps: &Capabilities) -> TuneParams
pub fn clamped_into(&self, caps: &Capabilities) -> TuneParams
Clamp every dimension into the server’s advertised ranges (defensive against a server that shrank its caps since we cached params).
Sourcepub fn upload_in_flight(&self) -> u64
pub fn upload_in_flight(&self) -> u64
In-flight bytes for an upload: concurrency × window × chunk size.
Sourcepub fn download_in_flight(&self) -> u64
pub fn download_in_flight(&self) -> u64
In-flight bytes for a download: concurrency × window × chunk size.