[−][src]Struct clobber::config::Config
Settings for the load test
todo: Make write/read optional. (Enum?)
Fields
target: SocketAddr
Socket address (ip and port) of the host we'll be calling
connections: u32
Connections is the a key knob to turn when tuning a performance test. Honestly 'connections' isn't the best name; it implies a certain persistance that
rate: Option<u32>
Optional rate-limiting. Precisely timing high rates is unreliable; if you're seeing slower than expected performance try running with no rate limit at all.
duration: Option<Duration>
Optional duration. If duration is None, clobber will run indefinitely.
threads: Option<u32>
Number of OS threads to distribute work between. 0 becomes num_cpus.
connect_timeout: Option<u32>
Optionally time out requests at a number of milliseconds. Note: checking timeouts costs CPU cycles; max performance will suffer. However, if you have an ill-behaving server that isn't connecting consistently and is hanging onto connections, this can improve the situation.
read_timeout: Option<u32>
Optionally time out read requests at a number of milliseconds. Note: checking timeouts costs CPU cycles; max performance will suffer. However, if you have an ill-behaving server that isn't sending EOF bytes or otherwise isn't dropping connections, this can be essential to maintaing a high(ish) throughput, at the cost of more CPU load.
limit: Option<u32>
Absolute number of requests to be made. Should split evenly across threads.
repeat: u32
Repeats the outgoing message
Methods
impl Config
[src]
pub fn new(target: SocketAddr) -> Config
[src]
pub fn num_threads(&self) -> u32
[src]
Number of user-defined threads, or all the threads on the host.
pub fn connections_per_thread(&self) -> u32
[src]
Number of connection loops each thread should maintain. Will never be less than the number of threads.
pub fn connection_delay(&self) -> Duration
[src]
The amount a single connection should wait between loops in order to maintain the defined rate. Returns a default duration if there is no rate.
pub fn limit_per_connection(&self) -> Option<u32>
[src]
The number of iterations each connection loop should perform before stopping. Doesn't play nice with limits that are not divisible by the number of threads and connections.
Trait Implementations
Auto Trait Implementations
impl Unpin for Config
impl Sync for Config
impl Send for Config
impl UnwindSafe for Config
impl RefUnwindSafe for Config
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,