Struct inquisitor_core::Config

source ·
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<String>,
}
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 --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.

ca_cert: Option<String>

Path to a root CA certificate in PEM format, to be added to the request client’s list of trusted CA certificates.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more