pub struct Config {
pub url: String,
pub iterations: Option<usize>,
pub connections: usize,
pub print_response: bool,
pub failed_body: Option<String>,
pub insecure: bool,
pub method: Method,
pub request_body: Option<String>,
pub header: Vec<String>,
pub hide_errors: bool,
pub duration: Option<Duration>,
pub ca_cert: Option<PathBuf>,
}
Expand description
Configuration of the load test runner
Fields§
§url: String
Target URL for the load test
iterations: Option<usize>
Number of requests to be sent
If this and --duration
(-d
) are specified, the tests will end when
the first of them is reached. If none is specified, a duration of 20
seconds is used.
connections: usize
Maximum number of HTTP connections to be kept opened concurrently
print_response: bool
Print the result of successful responses
failed_body: Option<String>
If the response matches the string specified in this parameter, the response will be considered to be a failure
insecure: bool
Do not validate (TLS) certificates
method: Method
HTTP method to use in the requests
request_body: Option<String>
Body of the HTTP request (only used if method is POST)
header: Vec<String>
Header entry for the HTTP request.
The value should be in a KEY:VALUE format. Multiple key-value pairs can be passed, e.g.: `-H Content-Type:application/json -H SomeKey:SomeValue
hide_errors: bool
Do not print errors
duration: Option<Duration>
Duration of the test.
Should be a number (integer or decimal) followed by a “s”, “m”, or “h”, for seconds, minutes and hours, respectively, without spaces. For example: “10s” (10 seconds), “1.5m” (1.5 minutes), “20h” (20 hours).
If this and --iterations
(-n
) are specified, the tests will end when
the first of them is reached. If none is specified, a duration of 20
seconds is used.
ca_cert: Option<PathBuf>
Path to a root CA certificate in PEM format, to be added to the request client’s list of trusted CA certificates.