pub struct WrkBuilder { /* private fields */ }Expand description
Builder for Wrk.
Implementations§
Source§impl WrkBuilder
impl WrkBuilder
Sourcepub fn url(&mut self, value: String) -> &mut Self
pub fn url(&mut self, value: String) -> &mut Self
Url of the service to benchmark against. Use the full URL of the request. IE: http://localhost:1234/some/uri.
Sourcepub fn benchmarks(&mut self, value: Benchmarks) -> &mut Self
pub fn benchmarks(&mut self, value: Benchmarks) -> &mut Self
Set of benchmarks for the current instance.
Sourcepub fn benchmarks_history(&mut self, value: Benchmarks) -> &mut Self
pub fn benchmarks_history(&mut self, value: Benchmarks) -> &mut Self
Historical benchmarks data, indexed by dates.
Sourcepub fn history_dir(&mut self, value: PathBuf) -> &mut Self
pub fn history_dir(&mut self, value: PathBuf) -> &mut Self
Directory on disk where to store and read the historical benchmark data.
Sourcepub fn user_script(&mut self, value: Option<PathBuf>) -> &mut Self
pub fn user_script(&mut self, value: Option<PathBuf>) -> &mut Self
User defined LUA script to run through wrk.
**NOTE: This script MUST not override the wrk function done() as it already
overriden by this crate to allow wrk to spit out a parsable JSON output.
Sourcepub fn max_error_percentage(&mut self, value: u8) -> &mut Self
pub fn max_error_percentage(&mut self, value: u8) -> &mut Self
Max percentage of errors vs total request to conside a benchmark healthy.
Sourcepub fn benchmark_date(&mut self, value: Option<DateTime<Utc>>) -> &mut Self
pub fn benchmark_date(&mut self, value: Option<DateTime<Utc>>) -> &mut Self
Current benchmark date and time.
Trait Implementations§
Source§impl Clone for WrkBuilder
impl Clone for WrkBuilder
Source§fn clone(&self) -> WrkBuilder
fn clone(&self) -> WrkBuilder
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for WrkBuilder
impl RefUnwindSafe for WrkBuilder
impl Send for WrkBuilder
impl Sync for WrkBuilder
impl Unpin for WrkBuilder
impl UnwindSafe for WrkBuilder
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
Mutably borrows from an owned value. Read more