pub struct ChunkedBenchConfig {
pub target_url: String,
pub method: Method,
pub concurrency: u32,
pub duration: Duration,
pub chunk_size_bytes: usize,
pub total_size_bytes: usize,
pub chunk_interval_ms: u64,
pub headers: HashMap<String, String>,
pub skip_tls_verify: bool,
pub rps: Option<u32>,
pub no_keep_alive: bool,
}Expand description
Configuration for the native chunked-encoding bench.
Fields§
§target_url: StringTarget URL (e.g. http://localhost:3000/upload).
method: MethodHTTP method. POST/PUT/PATCH make sense; GET/HEAD don’t take a body.
concurrency: u32Number of concurrent workers (each holds its own connection / future).
duration: DurationTotal run duration.
chunk_size_bytes: usizeBytes per chunk emitted into the request body stream.
total_size_bytes: usizeTotal body size per request, in bytes.
chunk_interval_ms: u64Sleep between chunks, in milliseconds. 0 = back-to-back.
headers: HashMap<String, String>Extra headers to attach to every request. Transfer-Encoding: chunked
is set automatically by hyper because the body has no Content-Length.
skip_tls_verify: boolSkip TLS certificate verification (useful for test self-signed certs).
rps: Option<u32>Cap on request starts per second, shared by all workers. None =
each worker starts its next request as soon as the previous one ends.
The achieved rate can’t exceed concurrency / request_duration.
no_keep_alive: boolOpen a fresh TCP/TLS connection for every request (no pooling), so the connections-per-second rate equals the request rate.
Trait Implementations§
Source§impl Clone for ChunkedBenchConfig
impl Clone for ChunkedBenchConfig
Auto Trait Implementations§
impl Freeze for ChunkedBenchConfig
impl RefUnwindSafe for ChunkedBenchConfig
impl Send for ChunkedBenchConfig
impl Sync for ChunkedBenchConfig
impl Unpin for ChunkedBenchConfig
impl UnsafeUnpin for ChunkedBenchConfig
impl UnwindSafe for ChunkedBenchConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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> ⓘ
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 more